Finished code from workshops
This page includes descriptions of, and links to, examples of the finished codes created in D2I's day-to-day Python workshops.
Workshop 1: simple plots and reading data from links
The code from the first day-to-day workshop D2I ran gets CSVs directly from the link on the DfE website into pandas. This involves using the zipfile and IO Bytes modules. Some simple conditional slicing of the dataframe is done before a custom seaborn bar plot is made. Find the GitHub for this code here.
Workshop 2: merges, plotting dates, and linear regression
The code from the second workshop gets CSVs directly from the same directory as the Python file and uses a Jupyter notebook. The code then merges tables from those CSVs to create a data set, and plots them using matplotlib. Some formatting is done using datetime and mdates so that the plot can be done as dates, and also scipy.stats can be used to make a linear regression of the data on the same plot. Find the GitHub for this code here.