Home » Uncategorized

Making maps to visualize census data

Visualizing census data could not be easier thanks to few great packages in R. 

Not that in Python you could not do spatial analysis/visualization of census data, but certainly not as easily as in R because of some tailored rstats packages for this purpose.

Kyle Walker developed a package called tidycensus. This package allows for easy access, analysis and visualization of Census Bureau data on hundreds of variables.

To be able to use tidycensus all you’ll need is your own Census API Key. If you do not have one, get one.

The only other library you’ll need is tidyverse; and this is it! If you like interactive visualization of maps (i.e. zoom in zoom out etc.) you will need additional libraries and codes.

I created a demo using the package to visualize population and race variables for Virginia and Washington DC Metro Area. Check this out for the codes or DM in Twitter.

Making maps to visualize census data