1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing US Census Data in Python

Exercise

Worker Population

In this exercise you will create a map comparing worker and residential population densities in the New York Metropolitan Area. You will use geopandas, which you saw in a previous chapter. The New York metro area county geometries are in the geopandas DataFrame geo_nyma, which is displayed in the plot window. The additional demographic info is loaded in the DataFrame nyma_counties.

pandas and geopandas are loaded using the usual aliases.

Instructions

100 XP
  • Merge geo_nyma with nyma_counties on columns state and county
  • Calculate worker and residential densities in square kilometers as 1000**2 times the worker and residential populations, divided by geo_nyma.area
  • Plot the residential density by setting the column parameter to the appropriate column
  • Do the same for worker density