Skip to main content
HomePython

Analyzing US Census Data in Python

Learn to use the Census API to work with demographic and socioeconomic data.

Start Course for Free
5 hours16 videos57 exercises6,245 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

Loved by learners at thousands of companies


Course Description

Data scientists in diverse fields, from marketing to public health to civic hacking, need to work with demographic and socioeconomic data. Government census agencies offer richly detailed, high-quality datasets, but the number of variables and intricacies of administrative geographies (what is a Census tract anyway?) can make approaching this goldmine a daunting process. This course will introduce you to the Decennial Census and the annual American Community Survey, and show you where to find data on household income, commuting, race, family structure, and other topics that may interest you. You will use Python to request this data using the Census API for large and small geographies. You will manipulate the data using pandas, and create derived data such as a measure of segregation. You will also get a taste of the mapping capabilities of geopandas.
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.
DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Decennial Census of Population and Housing

    Free

    Start exploring Census data products with the Decennial Census. Use the Census API and the requests package to retrieve data, load into pandas data frames, and conduct exploratory visualization in seaborn. Learn about important Census geographies, including states, counties, and tracts.

    Play Chapter Now
    Census Subject Tables
    50 xp
    Aggregate and Calculate Proportions
    100 xp
    Calculate Proportions
    100 xp
    Identify Extreme Values
    100 xp
    Using the Census API
    50 xp
    The Basic API Request
    100 xp
    The API Response and Pandas
    100 xp
    API to Visualization: Group Quarters
    100 xp
    Census Geographies
    50 xp
    Specific Places
    100 xp
    Congressional Districts by State
    100 xp
    Zip Code Tabulation Areas
    100 xp
  2. 4

    Exploring Census Topics

    In this chapter, you will apply what you have learned to four topical studies. Explore unemployment by race and ethnicity; commuting patterns and worker density; immigration and state-to-state population flows; and rent burden in San Francisco.

    Play Chapter Now
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.

datasets

Hispanic Origin & Race by State, 2010Household Internet Access by State, 2017Brooklyn Tract Demographics, 2000Brooklyn Tract Geometries, 2000Brooklyn Tract Demographics, 2010Brooklyn Tract Geometries, 2010

collaborators

Collaborator's avatar
Mari Nazary
Collaborator's avatar
Adrián Soto
Lee Hachadoorian HeadshotLee Hachadoorian

Asst. Professor of Instruction, Temple University

See More

What do other learners have to say?

FAQs

Join over 15 million learners and start Analyzing US Census Data in Python today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.