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

Connected

Exercise

Population Decline in Segregated Neighborhoods

While some urban areas have gentrified, other areas are being abandoned. Does the racial makeup of a neighborhood affect population change? In this exercise you will plot population gain or loss between 1990 and 2010 (in percentage terms) against the percent African-American of each tract in 1990.

When you examine the histogram of percent population change, you will notice that a small number of tracts have increased by 200%, 500%, 1000% or more! These are generally new developments in very low populations tracts, and will make interpreting our next plot difficult, so you will filter them out before proceeding.

tracts_cook is still loaded for you. pandas and seaborn are loaded using the usual aliases.

Instructions 1/2

undefined XP
    1
    2
  • Calculate the percent population change from 1990 to 2010 as 100 times the population difference divided by the base year (1990) population
  • Call sns.distplot on the new pct_pop_change column; make sure to set kde to False