Summer Carpentry Series: Introduction to Python Programming

University of California, Santa Barbara

Online

Wednesdays and Thursdays: August 19, 20, 26, and 27, and September 2

9:00 am - 12:00 pm

Instructors: Kristi Liu, Sanjeev Kolli, Ian Lessing, Torin White

Helpers: Qiancheng Zhao, Jon Jablonski, Sharon Solis

Registration is full, please join the waitlist or next workshop!

Some adblockers block the registration window. If you do not see the registration box below, please check your adblocker settings.

General Information

Data Carpentry develops and teaches workshops on the fundamental data skills needed to conduct research. Its target audience is researchers who have little to no prior computational experience, and its lessons are domain specific, building on learners' existing knowledge to enable them to quickly apply skills learned to their own research. 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 "Good Enough 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: Wednesdays and Thursdays: August 19, 20, 26, and 27, and September 2. Add to your Google Calendar.

Requirements: Participants must bring a laptop 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 dedicated to providing a positive and accessible learning environment for all. Please notify the instructors in advance of the workshop if you require any accommodations or if there is anything we can do to make this workshop more accessible to you.

Contact: Please email library-collaboratory@ucsb.edu 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.


Collaborative Notes

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


Surveys

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

Pre-workshop Survey

Post-workshop Survey


Schedule

Day 1: August 19

Before starting Pre-workshop survey
09:00 Workshop Introduction
09:20 Introduction to Python
09:45 Coffee Break
10:00 Python Basics
11:05 Coffee Break
11:20 Part 1: Python Control Structures
Scripts Torin: Basic Python
Scripts Ian: Control Structures

Day 2: August 20

09:00 Review of Day 1
09:15 Part 2: Python Control Structures
10:00 Coffee Break
10:15 Creating Reusable Code
11:05 Coffee Break
11:20 Part 1: Processing Data from a File
Scripts Sanjeev: Loop Functions

Day 3: August 26

09:00 Review of Week 1
09:20 Part 2: Processing Data from a File
10:00 Coffee Break
10:15 Dates and Time
10:50 Coffee Break
11:05 Processing JSON Data
Scripts Torin: JSON Data
Scripts Torin: Date and Times

Day 4: August 27

09:00 Review of Day 3
09:15 Reading Data from a File Using Pandas
09:45 Coffee Break
10:00 Extracting Rows and Columns
10:40 Coffee Break
10:55 Aggregations
11:35 Part 1: Joining Pandas Dataframes
Scripts Greg: Intro to Pandas

Day 5: September 2

09:00 Review of Week 2
09:20 Part 2: Joining Pandas Dataframes
09:45 Coffee Break
10:00 Long and Wide Dataframes
10:45 Coffee Break
11:00 Data Visualization with Matplotlib
Before Signing Off Post-workshop survey

Syllabus


Setup

To participate in the Data Carpentry workshop, you will need access to the software described below. In addition, you will need to download and unzip this folder. We suggest you save this to your desktop for easy access.

Python and Jupyter Notebooks

Anaconda installation

Download and install Anaconda. Remember to choose the installer for Python 3.x. Anaconda does not include the plotting package plotnine. To install this package, open your terminal application and type:

conda install -c conda-forge plotnine

Installing this package takes some time so it would be prudent to install plotnine before the workshop

After installing Anaconda and the workshop packages, launch a Jupyter notebook by typing this command from the terminal:

jupyter notebook

The notebook should open automatically in your browser. If it does not or you wish to use a different browser, open this link: http://localhost:8888.

For a brief introduction to Jupyter Notebooks, please consult our Introduction to Jupyter Notebooks page.

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.

The setup instructions for the Data Carpentry Social Sciences workshops (with Python) can be found at the workshop overview site.