I have written several R packages that deal with Mapping and Open Data.
The main package I developed is choroplethr, which is a play on the words “choropleth map” and “R”. Choroplethr is easy to use, and originally only handled US States and Counties. You can learn the basics of choroplethr from the following articles:
After creating the initial version of choroplethr I got several requests to “hook it up to other maps”. That is, provide the same ease of use as choropleth, but for maps like countries of the world and US Zip Codes. I did this by first making choroplethr work with arbitrary shapefiles, and then hooking it up to a handful of other maps:
- Creating Your Own Maps
- Mapping Countries
- Mapping International States / Provinces (i.e. Administrative Level 1 Maps)
- Mapping ZIP Codes (ZCTAs)
- Mapping US Census Tracts (California Only)
- Animated Choropleths
I enjoy using choroplethr to analyze government datasets (i.e. “open data”). The following articles explain my work to simplify analyzing open data with choroplethr.
- Mapping US Census Data
- Mapping World Bank WDI Data
- Mapping State Unemployment Data
- Mapping County Unemployment Data
- Creating ZIP Code Choropleths of US Census Data with choroplethrZip
- Zip Code Demographics with choroplethrZip v1.3.0
I have created three courses about my open source work:
Getting the Code
While this work is conceptually one body of work, for technical reasons it spans six different R packages. To add to the complexity, some of these packages are available on CRAN, and some are only available on github. The following chart lists each R package, the current version, and the location of the package.