This coming academic year I’ll be working on some papers that explore the shifting demographic composition of US suburbs. As part of this I’m developing some tools to help me quickly and interactively explore data, which I’ll be sharing as I go.

I’ve written an R script that contains a function to produce interactive maps of African-American population change in large metro areas between 2000 and 2010. To reproduce, grab the 2000 and 2010 Census files from Brown University’s Longitudinal Tract Database as well as the core-based statistical areas definition file from the links I’ve provided, and put them in your working directory. Also, make sure you have the tigris, dplyr, readxl, stringr, and leaflet packages installed. Then, source my script with:

library(devtools)

source_gist("6dc92e92eb61b5875b7d")
## DEFINEDNAME: 00 00 00 1e 0b 00 00 00 00 00 00 00 00 00 00 43 42 53 41 5f 43 53 41 5f 4d 44 49 56 5f 43 4f 4d 50 4f 4e 45 4e 54 53 5f 30 39 5f 31 30 3d 00 00 0b 00 00 00 0b 00 00 00 
## DEFINEDNAME: 00 00 00 1e 0b 00 00 00 00 00 00 00 00 00 00 43 42 53 41 5f 43 53 41 5f 4d 44 49 56 5f 43 4f 4d 50 4f 4e 45 4e 54 53 5f 30 39 5f 31 30 3d 00 00 0b 00 00 00 0b 00 00 00

and you’ll get access to a function, map_change, that will create an interactive map of tract-level black population change for your chosen metro area. Don’t use it for metro areas too small, as I haven’t quite optimized it yet, and it won’t behave perfectly for areas with smaller black populations. I’m also not sold on the best way to visualize tract-level change over time, especially as many suburban tracts went from nearly no blacks in 2000 to thousands in 2010. Any opinions on this are welcome!

Let’s take a look at a few large metros - all of which experienced population losses in traditionally-black neighborhoods in the 2000s and saw significant black population gains in selected suburban areas.

Dallas-Fort Worth:

map_change("Dallas")