Session Ready
Exercise

Segregation Begets More Segregation

You have seen that there are relatively few tracts in Chicago with a mix of African-American and other races. How do these tracts evolve over time? tracts_cook is loaded, and you have already calculated the percent African-American in 2010. You will begin by doing the same for 1990, then calculate the percentage point change by subtracting this from the 2010 value. You will then use regplot to plot this change against the initial (1990) value.

In order to interpret the plot, you will add a red reference line to represent "no change". regplot also allows you to add a LOWESS curve (using lowess = True) to indicate the local trend in the data.

pandas and seaborn are loaded using the usual aliases.

Instructions
100 XP
  • Calculate the percent African-American of each tract in 1990
  • Calculate the percentage point change in African-American, by subtracting the 1990 value from the 2010 value
  • In order to focus on the racially mixed tracks, restrict tracts_cook to those tracts where pct_black_1990 is between 30% and 70%
  • Plot 1990-2000 change in Black percent (y-axis) vs percent Black in 1990 (x-axis); use lowess = True to add a smoothed trend curve