Mapping Gentrification
Now that you have determined which tracts were gentrifiable in 2000 and which were gentrifying between 2000 and 2010, you will create a choropleth map. You will create a basemap of the Census tracts from 2000, and add layers of the gentrifiable and gentrifying tracts with custom-selected colors.
Este ejercicio forma parte del curso
Analyzing US Census Data in Python
Instrucciones del ejercicio
- Create a basemap of
bk_2000with a fillcolorof"white"and anedgecolorof"lightgray" - Filter
bk_2000to plot only thegentrifiabletracts - Now filter
bk_2010(Note the year) to plot only thegentrifyingtracts using"red"
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Create a basemap
basemap = ____
# Plot gentrifiable tracts
gentrifiable_tracts = bk_2000[____]
gentrifiable_tracts.plot(ax = basemap, color = "lightgray")
# Plot gentrifying tracts
gentrifying_tracts = bk_2010[____]
gentrifying_tracts.plot(ax = basemap, ____)
plt.show()