Getting Started


Figure 1

To run the access test
1. visit https://broad.io/cb-python-access-test
2. click “Copy to Drive” and create your own copy of Python_workshop_data_access_test.ipynb
Click Copy to Drive


Figure 2

If you see this dialog box, click “Connect to Google Drive” Click "Connect to Google Drive"


Figure 3

Authorize access for the google account you’re using for this workshop. There will be several prompts to grant access. Authorize access to your google account


Figure 4

Once access has been granted, go back to the access test notebook, click the ▶️ symbol on the left hand side of the first code cell. You’ve successfully loaded data if you see a dataframe appear beneath the code cell the ▶️ symbol


Figure 5

Partial listing of example notebooks offered by Google colab

Figure 6

Are you still there prompt

Figure 7

View of newly created notebook

Variables and Types


Lists


Built-in Functions and Help


Libraries & Pandas


For Loops


Figure 1

Loop variable 'num' being assigned the value of each element in the list odds in turn and then being printed

Looping Over Data Sets


Using Pandas


Conditionals


Writing Functions


Tidy Data with Pandas


Figure 1

image showing variables in columns, observations in rows, and values in cellssan
Tidy Data

Data Visualisation


Figure 1

Line plot of zip code, ytd, year, and circulation numbers over time from the albany DataFrame

Figure 2

Line plot of the Albany Park branch circulation showing a big drop from 2013 to 2014.

Figure 3

Line plot of the Albany Park branch circulation with matplotlib styles applied.

Figure 4

Area plot of the Albany Park branch circulation.

Figure 5

histogram of the Albany branch circulation.

Figure 6

image showing the circulation of the Chinatown branch over ten years
Chinatown plot

Figure 7

image showing the circulation of the Uptown branch with labels
Uptown plot

Figure 8

a bar plot of the top five branch circulation figures
Top five circulation branches

Wrap-Up