Software Carpentry: Plotting and Programming with Python

ICR Online - teams

Online

Mon Sep 02, 2024

9:00 am - 5:00 pm

Instructors: Rachel Alcraft

Helpers: tbc

General Information

The Carpentries project comprises the Software Carpentry, Data Carpentry, and Library Carpentry communities of Instructors, Trainers, Maintainers, helpers, and supporters who share a mission to teach foundational computational and data science skills to researchers.

Want to learn more and stay engaged with The Carpentries? Carpentries Clippings is The Carpentries' biweekly newsletter, where we share community news, community job postings, and more. Sign up to receive future editions and read our full archive: https://carpentries.org/newsletter/

Software Carpentry aims to help researchers get their work done in less time and with less pain by teaching them basic research computing skills. This hands-on workshop will cover basic concepts and tools, including program design, version control, data management, and task automation. Participants will be encouraged to help one another and to apply what they have learned to their own research problems.

For more information on what we teach and why, please see our paper "Best Practices for Scientific Computing".

Who: The course is aimed at graduate students and other researchers. You don't need to have any previous knowledge of the tools that will be presented at the workshop.

Where: This training will take place online. The instructors will provide you with the information you will need to connect to this meeting.

When: Mon Sep 02, 2024; 9:00 am - 5:00 pm Add to your Google Calendar.

Requirements: Participants must have access to a computer with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Accessibility: We are committed to making this workshop accessible to everybody.

We are dedicated to providing a positive and accessible learning environment for all. We do not require participants to provide documentation of disabilities or disclose any unnecessary personal information. However, we do want to help create an inclusive, accessible experience for all participants. We encourage you to share any information that would be helpful to make your Carpentries experience accessible. To request an accommodation for this workshop, please fill out the accommodation request form. If you have questions or need assistance with the accommodation form please email us.

Glosario is a multilingual glossary for computing and data science terms. The glossary helps learners attend workshops and use our lessons to make sense of computational and programming jargon written in English by offering it in their native language. Translating data science terms also provides a teaching tool for Carpentries Instructors to reduce barriers for their learners.

Contact: Please email rachel.alcraft@icr.ac.uk for more information.

Roles: To learn more about the roles at the workshop (who will be doing what), refer to our Workshop FAQ.


Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct. This document also outlines how to report an incident if needed.


Surveys

Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey


Schedule

Plotting and Programming with Python Index Page

Morning

09:00-09:15 Setup Instructions + Pre-workshop survey Setup, ensure everything works, fill out survey
09:15-09:30 1. Running and QuittingHow can I run Python programs?
09:30-09:50 2. Variables and AssignmentHow can I store data in programs?
09:50-10:10 3. Data Types and Type ConversionWhat kinds of data do programs store?
How can I convert one type to another?
10:10-10:35 4. Built-in Functions and HelpHow can I use built-in functions?
How can I find out what theydo?
What kind of errors can occur in programs?
10:35-10:50Morning Coffee
10:50-11:10 5. LibrariesHow can I use software that other people have written?
How can I find out what that software does?
11:10-11:30 6. Reading Tabular Data into DataFramesHow can I read tabular data?
11:30-12:00 7. Pandas DataFramesHow can I do statistical analysis of tabular data?
12:00-12:30 8. PlottingHow can I plot my data?
How can I save my plot for publishing?

Afternoon

12:30-13:30Lunch
13:30-13:509. ListsHow can I store multiple values?
13:50-14:1510. For LoopsHow can I make a program do many things?
14:15-14:4011. ConditionalsHow can programs do different things for different data?
14:40-14:5512. Looping Over Data SetsHow can I process many data sets with a single command?
14:55-15:10Afternoon Coffee
15:10-15:3513. Writing FunctionsHow can I create my own functions?
15:35-16:0514. Variable ScopeHow do function calls actually work?
How can I determine where errors occurred?
16:05-16:2515. Programming StyleHow can I make my programs more readable?
How do most programmers format their code?
How can programs check their own operation?
16:25-16:4516. Wrap-UpWhat have we learned?
What else is out there and where do I find it?
16:4520. Post-workshop SurveyHow did the class go?

Setup

To participate in a Software Carpentry workshop, you will need access to software and data as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Data

Please check the "Getting the Data section of" page of the lesson homepage for instructions to follow to obtain the data you will need to follow the lesson.

Install the videoconferencing client

This will run on ICR teams, the link is in your calendar invite.

Set up your workspace

Like other Carpentries workshops, you will be learning by "coding along" with the Instructors. To do this, you will need to have both the window for the tool you will be learning about (a terminal, RStudio, your web browser, etc..) and the window for the Zoom video conference client open. In order to see both at once, we recommend using one of the following set up options:

This blog post includes detailed information on how to set up your screen to follow along during the workshop.

Python

Python is a popular language for research computing, and great for general-purpose programming as well. Installing all of its research packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer.

Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.6 is fine).

We will teach Python using the Jupyter Notebook, a programming environment that runs in a web browser (Jupyter Notebook will be installed by Anaconda). For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).

  1. Open https://www.anaconda.com/download/success with your web browser.
  2. Download the Anaconda for Windows installer with Python 3. (If you are not sure which version to choose, you probably want the 64-bit Graphical Installer Anaconda3-...-Windows-x86_64.exe)
  3. Install Python 3 by running the Anaconda Installer, using all of the defaults for installation except make sure to check Add Anaconda to my PATH environment variable.

Video Tutorial

  1. Open https://www.anaconda.com/download/success with your web browser.
  2. Download the Anaconda Installer with Python 3 for macOS (you can either use the Graphical or the Command Line Installer).
  3. Install Python 3 by running the Anaconda Installer using all of the defaults for installation.

Video Tutorial

  1. Open https://www.anaconda.com/download/success with your web browser.
  2. Download the Anaconda Installer with Python 3 for Linux.
    (The installation requires using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.)
  3. Open a terminal window and navigate to the directory where the executable is downloaded (e.g., `cd ~/Downloads`).
  4. Type
    bash Anaconda3-
    and then press Tab to autocomplete the full file name. The name of file you just downloaded should appear.
  5. Press Enter (or Return depending on your keyboard). You will follow the text-only prompts. To move through the text, press Spacebar. Type yes and press enter to approve the license. Press Enter (or Return) to approve the default location for the files. Type yes and press Enter (or Return) to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).
  6. Close the terminal window.