Analyzing US Census Data in Python
Lee Hachadoorian
Asst. Professor of Instruction, Temple University
state | State FIPS
county | County FIPS
tract | Tract FIPS
geometry | Geometry column
mhi | Median Household Income (tract)
mhi_msa | Median Household Income (NY Metro Area)
median_value | Median House Value (tract)
median_value_msa | Median House Value(NY Metro Area)
pct_recent_build | Percent of housing built between 1980 and 1999 (tract)
pct_recent_build_msa | Percent of housing built between 1980 and 1999 (NY Metro Area)
pct_ba | Percentage of 25 year olds with BA or higher (tract)
pct_ba_msa | Percentage of 25 year olds with BA or higher(NY Metro Area)
bk_2000[["tract", "mhi", "mhi_msa"]].head()
tract mhi mhi_msa
0 051200 31393 50795
1 051300 30000 50795
2 051400 32103 50795
3 051500 36107 50795
4 051600 25148 50795
bk_2000["low_mhi"] = bk_2000["mhi"] < bk_2000["mhi_msa"]
bk_2000.plot(column = "low_mhi", cmap = "Blues")
Analyzing US Census Data in Python