Identifying Gentrifying Tracts
In this exercise, you will identify and map the tracts that were gentrifying between 2000 and 2010. To be classified as gentifying, tracts must have been gentrifiable in 2000 and meet these criteria:
- The percentage of the population with Bachelor's degrees or higher must be increasing faster than for the New York metro area.
- House values must have increased since 2000. In order to account for inflation, house values from 2000 will be multiplied by 1.2612.
The GeoDataFrame bk_2010
has been loaded for you. The column names are shown in the console. Because you will be comparing 2010 with 2000, it contains data from both years, in columns suffixed with "_2000"
and "_2010"
. It also has the column gentrifiable
that you created in the last exercise.
This exercise is part of the course
Analyzing US Census Data in Python
Exercise instructions
- Set
increasing_education
to True if the increase in the percentage of population with Bachelor's degrees from 2000 to 2010 is greater than the MSA-level increase - Set
increasing_house_value
to True if themedian_value_2010
is more than1.2612
times greater thanmedian_value_2000
- Using the
&
operator, setgentrifying
to True if a tract isgentrifiable
and hasincreasing_education
and hasincreasing_house_value
- Map the
gentrifying
tracts using a"YlOrRd"
colormap
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Increase in percent BA greater than MSA
bk_2010["increasing_education"] = ____
# Increase in house value
bk_2010["increasing_house_value"] = ____
# Identify gentryifying tracts
bk_2010["gentrifying"] = bk_2010["gentrifiable"] & ____
# Plot gentrifying tracts
bk_2010.plot(____)
plt.show()