These charts were created for this article in Belt Magazine on urban density and commuting.
The density_commuting_clean.R script downloads and cleans the data for the charts from the U.S. Census and Wikipedia, using readxl to deal with .xlsx
files and rvest to scrape tables. As always, dplyr holds the whole thing together. The resulting clean data is included in the respository.
The density_commuting_charts.R script creates the final charts using ggplot2. The final charts are below: