Code Monkey home page Code Monkey logo

analyzing-census-data's Introduction

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:

  1. Pandas
  2. 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:

  1. Data Preparation
  2. Data Analysis

In the first notebook you will:

  1. Work with compressed data with pandas.
  2. Retrieve high-level descriptive analytics of your data.
  3. Drop columns.
  4. Slice data (boolean indexing).
  5. Work with categorical data.
  6. Work with weighted data.
  7. Use python's pathlib library, making your code more reproducible across platforms.
  8. Develop a reproducible data prep workflow for future projects.

On top of that, in the second notebook you will:

  1. Aggregate data.
  2. Learn about .groupby()
  3. Learn about cross-sections .xs()
  4. Learn about pivot_tables and crosstabs
  5. Develop a reproducible data analysis workflow for future projects.

TODO:

  • add "basics" notebook

analyzing-census-data's People

Contributors

chekos avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.