New package on CRAN: zctaCrosswalk

[This article was first published on R – AriLamstein.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I am happy to announce that my new R package, zctaCrosswalk, is now on CRAN. This package contains the US Census Bureau’s 2020 ZCTA to County Relationship File, as well as convenience functions to translate between States, Counties and ZIP Code Tabulation Areas (ZCTAs). You can install the package like this:

install.packages("zctaCrosswalk")

This package is exciting because, in many ways, it supplants my package choroplethrZip, which I developed around 2016.

I spent a great deal of time documenting the package. Rather than walk through the package here, I will refer you to the vignettes I wrote. From R, you can view them like this:

browseVignettes("zctaCrosswalk")

For convenience, here is a link to the vignettes on CRAN:

  1. Introduction
  2. Workflow with tidycensus
  3. Developer Notes

This package was developed after posting an issue on the repo of Kyle Walker’s excellent tigris package (link). In short, while tidycensus/tigris lets you download and view data at the level of ZIP Code Tabulation Areas (ZCTAs), it only provides the data and map for the entire nation. That is, it does not allow you to filter down to ZCTAs in specific states or counties. The zctaCrosswalk package is designed with the modest goal of providing that functionality. Please read the second vignette (Workflow with tidycensus) to see an example of that workflow. The final example in that vignette teaches you how to create a map of the median income of ZCTAs in San Francisco County, which looks like this:

Having worked in this field for a while, my interest in education has increased. I would like more people to both understand the underlying data and be able to write packages like this. If this interests you, please read the third vignette (Developer Notes).

I would also like to thank my employer, MarketBridge, for allowing me to spend the time to create this package. If you are interested in working at a company that uses R and values contributing to open source software, I highly recommend you apply to one of our many job openings.

To leave a comment for the author, please follow the link and comment on their blog: R – AriLamstein.com.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)