Open Source

I have written several R packages that deal with Mapping and Open Data.

Mapping Packages

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:

  1. Introduction
  2. US State Choropleths
  3. US County Choropleths

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:

  1. Creating Your Own Maps
  2. Mapping Countries
  3. Mapping International States / Provinces (i.e. Administrative Level 1 Maps)
  4. Mapping ZIP Codes (ZCTAs)
  5. Mapping US Census Tracts (California Only)
  6. Animated Choropleths

Open Data

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.

  1. Mapping US Census Data
  2. Mapping World Bank WDI Data
  3. Mapping State Unemployment Data
  4. Mapping County Unemployment Data
  5. Creating ZIP Code Choropleths of US Census Data with choroplethrZip
  6. Zip Code Demographics with choroplethrZip v1.3.0

Courses

I have created three courses about my open source work:

  1. Learn to Map Census Data in R
  2. Mapmaking in R with Choroplethr
  3. Shapefiles for R Programmers

Note that the last two courses are also a part of my membership site, Profitable Portfolios.

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.

Package NameVersionLocation
choroplethr3.5.3CRAN
choroplethrMaps1.0.1CRAN
choroplethrAdmin11.1.0CRAN
choroplethrZip1.5.0github
choroplethrCaCensusTract1.2.0github
rUnemploymentData1.1.0CRAN