Python Tutorial: Census Subject Tables
Key Takeaways
This video tutorial covers analyzing US Census data in Python, using libraries such as Pandas, Seaborn, and GeoPandas to access and visualize census data, including the decennial census and the American Community Survey.
Full Transcript
welcome to analyzing u.s. census data in Python my name is Lee Hatcher dorium I am a geographer teaching graduate courses in geographic information systems and geospatial analysis in this course you will learn how to access and analyze United States census data most governments need to know the number and characteristics of their population in the u.s. a census is taken every 10 years by the Census Bureau the Bureau of the Department of Commerce often we just refer to the census when we mean the decennial census of population and housing but the Census Bureau produces many other data products in this course you will also learn about the annual American Community Survey but once you learn the census API you can use it to explore other products including the current population survey a monthly survey used to calculate official unemployment figures the economic survey a survey of businesses conducted every five years or the annual survey of state and local government finances which can be used to study taxes and service provision by sub-national governments this course assumes knowledge of core Python object types as well as programming concepts such as package imports control flow and list comprehensions it also assumes an understanding of pandas dataframes which we will work with a lot you will create some simple visualizations with Seabourn and geo pandas but no previous experience is assumed the decennial census counts as near as possible all persons and housing in the United States it covers demographic topics such as age and sex and housing topics such as home ownership and persons per room people living in group quarters are counted separately vacant housing units are also counted the American Community Survey is an annual survey of approximately 1.5 percent of housing units that covers a large number of economic and social topics which we will explore throughout this course the data is released in subject tables devoted to specific topics we will familiarize ourselves with the subject tables by working with table p5 Hispanic or Latino origin by race the column identifier x' begin p 0 0 5 4 the subject table followed by a column index of 1 to 17 column 1 is the total population it is broken down into two categories not Hispanic or Latino in column two Hispanic or Latino in column ten these columns are broken down further into seven racial groupings indented columns add up to they're out dented parent for example columns three to nine add up to column two we've created a pandas dataframe named States with data from table p5 you can examine the first few rows with States dot head each row is a state in the US the variable codes have been replaced with descriptive column names and the state name appears as the row index we will use Seaborn imported here with the alias SNS for data visualization SNS dot set is used to set the visualization style we will invoke SNS dot set with no parameters to set Seaborn's default style and use it exclusively throughout this course SNS bar plot naturally creates a bar plot x equals total puts total population on the x-axis how does the function know what total means total is understood as a column name in the source specified by the data parameter states y equals states index labels the vertical y-axis using the data frames index the axis labels are a bit crowded but we're not going to spend much time on plot customization in this course check out these other data camp courses if you want to go further enough preamble
Original Description
Want to learn more? Take the full course at https://learn.datacamp.com/courses/analyzing-us-census-data-in-python at your own pace. More than a video, you'll learn hands-on coding & quickly apply skills to your daily work.
---
Welcome to Analyzing US Census Data in Python.
My name is Lee Hachadoorian. I am a geographer teaching graduate courses in Geographic Information Systems and geospatial analysis.
In this course, you will learn how to access and analyze United States census data. Most governments need to know the number and characteristics of their population.
In the US, a census is taken every 10 years by the Census Bureau, a bureau of the Department of Commerce. Often we just refer to "the Census" when we mean the Decennial Census of Population and Housing. But the Census Bureau produces many other data products.
In this course, you will also learn about the annual American Community Survey. But once you learn the Census API, you can use it to explore other products,
including the Current Population Survey--a monthly survey used to calculate official unemployment figures; the Economic Survey--a survey of businesses conducted every five years; or the Annual Survey of State and Local Government Finances, which can be used to study taxes and service provision by subnational governments.
This course assumes knowledge of core Python object types, as well as programming concepts such as package imports, control flow, and list comprehensions.
It also assumes an understanding of Pandas data frames, which we will work with a lot. You will create some simple visualizations with seaborn and geopandas, but no previous experience is assumed.
The Decennial Census counts, as near as possible, all persons and housing in the United States. It covers demographic topics such as age and sex, and housing topics such as homeownership and persons per room. People living in group quarters are counted separately. Vacant housing units are also counted.
The American Community
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from DataCamp · DataCamp · 46 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
▶
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SQL Server Tutorial: Date manipulation
DataCamp
R Tutorial: Intermediate Interactive Data Visualization with plotly in R
DataCamp
R Tutorial: Adding aesthetics to represent a variable
DataCamp
R Tutorial: Moving Beyond Simple Interactivity
DataCamp
Python Tutorial: Why use ML for marketing? Strategies and use cases
DataCamp
Python Tutorial: Preparation for modeling
DataCamp
Python Tutorial: Machine Learning modeling steps
DataCamp
R Tutorial: The prior model
DataCamp
R Tutorial: Data & the likelihood
DataCamp
R Tutorial: The posterior model
DataCamp
R Tutorial: An Introduction to plotly
DataCamp
R Tutorial: Plotting a single variable
DataCamp
R Tutorial: Bivariate graphics
DataCamp
Python Tutorial: Customer Segmentation in Python
DataCamp
Python Tutorial: Time cohorts
DataCamp
Python Tutorial: Calculate cohort metrics
DataCamp
Python Tutorial: Cohort analysis visualization
DataCamp
R Tutorial: Building Dashboards with flexdashboard
DataCamp
R Tutorial: Anatomy of a flexdashboard
DataCamp
R Tutorial: Layout basics
DataCamp
R Tutorial: Advanced layouts
DataCamp
Python Tutorial: Time Series Analysis in Python
DataCamp
Python Tutorial: Correlation of Two Time Series
DataCamp
Python Tutorial: Simple Linear Regressions
DataCamp
Python Tutorial: Autocorrelation
DataCamp
R Tutorial: The gapminder dataset
DataCamp
R Tutorial: The filter verb
DataCamp
R Tutorial: The arrange verb
DataCamp
R Tutorial: The mutate verb
DataCamp
R Tutorial: What is cluster analysis?
DataCamp
R Tutorial: Distance between two observations
DataCamp
R Tutorial: The importance of scale
DataCamp
R Tutorial: Measuring distance for categorical data
DataCamp
Python Tutorial: Plotting multiple graphs
DataCamp
Python Tutorial: Customizing axes
DataCamp
Python Tutorial: Legends, annotations, & styles
DataCamp
Python Tutorial: Introduction to iterators
DataCamp
Python Tutorial: Playing with iterators
DataCamp
Python Tutorial: Using iterators to load large files into memory
DataCamp
SQL Tutorial: Introduction to Relational Databases in SQL
DataCamp
SQL Tutorial: Tables: At the core of every database
DataCamp
SQL Tutorial: Update your database as the structure changes
DataCamp
Python Tutorial: Classification-Tree Learning
DataCamp
Python Tutorial: Decision-Tree for Classification
DataCamp
Python Tutorial: Decision-Tree for Regression
DataCamp
Python Tutorial: Census Subject Tables
DataCamp
Python Tutorial: Census Geography
DataCamp
Python Tutorial: Using the Census API
DataCamp
R Tutorial: A/B Testing in R
DataCamp
R Tutorial: Baseline Conversion Rates
DataCamp
R Tutorial: Designing an Experiment - Power Analysis
DataCamp
R Tutorial: Introduction to qualitative data
DataCamp
R Tutorial: Understanding your qualitative variables
DataCamp
R Tutorial: Making Better Plots
DataCamp
SQL Tutorial: OLTP and OLAP
DataCamp
SQL Tutorial: Storing data
DataCamp
SQL Tutorial: Database design
DataCamp
Python Tutorial: Introduction to spaCy
DataCamp
Python Tutorial: Statistical Models
DataCamp
Python Tutorial: Rule-based Matching
DataCamp
Related AI Lessons
⚡
⚡
⚡
⚡
n8n Automation Repurpose Video Content: The 2025 Production Guide
Dev.to AI
You’re Still Paying $200/Month for AI Tools You Could Replace With a Free Local Setup Tonight
Medium · Data Science
Top 10 AI Tools Every College Student Should Know in 2026
Medium · AI
Answer Calculator: Step-by-Step Math Help
Medium · Machine Learning
🎓
Tutor Explanation
DeepCamp AI