Forecasting gentrification in city neighborhoods, with R

Share Tweet

If you've lived in a big city, you're likely familiar with the impact of gentrification. For longtime residents of a neighbourhood, it can represent a decline in the culture and vibrancy of your community; for recent or prospective residents, it can represent a financial opportunity in rising home prices. For those that live in a gentrifying neighbourhood, it's one of those you-know-it-when-you-see-it things, but for economists and urban planners it can be difficult to identify. So a team of analysts at Urban Spatial to build a longitudinal model based on census tract data to quantify gentrification. Their motivation?

Neighborhoods change because people and capital are mobile and when new neighborhood demand emerges, incumbent residents rightfully worry about displacement.

Acknowledging these economic and social realities, policy makers have a responsibility balance economic development and equity. To that end, analytics can help us  understand how the wave of reinvestment moves across space and time and how to pinpoint neighborhoods where active interventions are needed today in order to avoid negative outcomes in the future.

They also provide a detailed data visualization tutorial showing how they used R to visualize the results, like this sequence of panels showing the dramatic rise in prices for homes in the Mission District of San Francisco over the last eight years.


The R full code behind this and other interesting charts is included, often making extensive use of the ggmap package.  

Zooming out from neighbourhoods to cities, the full report describes the analysts built a model to predict gentrification within "legacy" US cities (and even produced detailed maps within those cities showing where gentrification was likely to occur). At the city level, the impact is shown in rising or declining average housing values:

City bar chart

If you're into the economic aspect, check out the full report for lots of interesting analysis of housing trends in US cities. Or, if you just want to learn how all the charts and maps were made, click the link below to see the tutorial.

Urban Spatial: #Dataviz tutorial: Mapping San Francisco home prices using R (via Sharon Machlis)

Share Tweet