chekos
analyzing-census-data
Jupyter Notebook

PyCon 2019 Tutorial: Analyzing Census Data with Pandas

Last updated Jan 11, 2025
18
Stars
11
Forks
0
Issues
0
Stars/day
Attention Score
12
Language breakdown
Jupyter Notebook 99.8%
Python 0.2%
CSS 0.0%
Files click to expand
README

badge badge

Analyzing Census Data with Pandas

PyCon 2019


Materials for my Analyzing Census Data with Pandas workshop for PyCon 2019.

The tutorial

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.

Getting the materials

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:

GitHub Download

Setting up your environment

Only 2 packages are essential for this workshop:
  • Pandas
  • Jupyter (notebooks or lab)
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

The structure

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:
  • Work with compressed data with pandas.
  • Retrieve high-level descriptive analytics of your data.
  • Drop columns.
  • Slice data (boolean indexing).
  • Work with categorical data.
  • Work with weighted data.
  • Use python's pathlib library, making your code more reproducible across platforms.
  • Develop a reproducible data prep workflow for future projects.
On top of that, in the second notebook you will:
  • Aggregate data.
  • Learn about .groupby()
  • Learn about cross-sections .xs()
  • Learn about pivot_tables and crosstabs
  • Develop a reproducible data analysis workflow for future projects.
🔗 More in this category

© 2026 GitRepoTrend · chekos/analyzing-census-data · Updated daily from GitHub