PyCon 2019 Tutorial: Analyzing Census Data with Pandas
Materials for my Analyzing Census Data with Pandas workshop for PyCon 2019.
This tutorial is meant to be followed using mybinder.org but if you choose to download the materials and follow along these are the instructions.
The easiest way to get a copy of this repository is to clone it if you know git
git clone https://github.com/chekos/analyzing-census-data.git
But you can also download it straight from GitHub:
Only 2 packages are essential for this workshop:
You can either pip
install them:
pip install pandas jupyterlab
or use conda to install them
conda install -c conda-forge pandas jupyterlab
Once you have the materials and python
packages necessary, head over to the exercises directory and launch Jupyter Lab
cd analyzing-census-data
cd exercises
jupyter lab
This tutorial will guide you through a typical data analysis project utilizing Census data acquired from IPUMS. It’s split into 2 notebooks:
In the first notebook you will:
pathlib
library, making your code more reproducible across platforms.On top of that, in the second notebook you will:
.groupby()
.xs()
pivot_table
s and crosstabs