Package: zipcodeR 0.4.1

zipcodeR: Data & Functions for Working with US ZIP Codes

Make working with ZIP codes in R painless with an integrated dataset of U.S. ZIP codes and functions for working with them. Search ZIP codes by multiple geographies, including state, county, city & across time zones. Also included are functions for relating ZIP codes to Census data, geocoding & distance calculations. New analyses can select an immutable modern data bundle through the next-generation API, while the historical interface remains compatible with version 0.3.5 for reproducible research.

Authors:Gavin Rozzi [aut, cre]

zipcodeR_0.4.1.tar.gz
zipcodeR_0.4.1.zip(r-4.7-any)zipcodeR_0.4.1.zip(r-4.6-any)zipcodeR_0.4.1.zip(r-4.5-any)
zipcodeR_0.4.1.tgz(r-4.6-any)zipcodeR_0.4.1.tgz(r-4.5-any)
zipcodeR_0.4.1.tar.gz(r-4.7-any)zipcodeR_0.4.1.tar.gz(r-4.6-any)
zipcodeR_0.4.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
zipcodeR/json (API)

# Install 'zipcodeR' in R:
install.packages('zipcodeR', repos = c('https://gavinrozzi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/gavinrozzi/zipcoder/issues

Datasets:

On CRAN:

Conda:

8.55 score 83 stars 357 scripts 2.0k downloads 34 exports 64 dependencies

Last updated from:430dc605cc. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK186
source / vignettesOK259
linux-releaseOK182
macos-releaseOK197
macos-oldrelOK195
windows-develOK118
windows-releaseOK106
windows-oldrelOK130
wasm-releaseOK129

Exports:download_comprehensive_datadownload_zip_datadownload_zip_data_bundlegeocode_zipgeocode_zip_ngget_cdget_cd_ngget_tractsget_tracts_ngis_zctais_zcta_ngnormalize_zipnormalize_zip_ngread_zip_data_bundlereverse_zipcodereverse_zipcode_ngsearch_cdsearch_cd_ngsearch_citysearch_city_ngsearch_countysearch_county_ngsearch_fipssearch_fips_ngsearch_radiussearch_radius_ngsearch_statesearch_state_ngsearch_tzsearch_tz_ngzip_data_provenancezip_data_versionzip_distancezip_distance_ng

Dependencies:askpassbitbit64blobcachemclassclassIntclicliprcpp11crayoncurlDBIdplyre1071fastmapgenericsgluehmshttrjsonliteKernSmoothlatticelifecyclemagrittrmemoisemimeopensslpillarpkgconfigprettyunitsprogressproxypurrrR6rappdirsrasterRcppreadrrlangRSQLitervests2selectrsfspstringistringrsysterratibbletidycensustidyrtidyselecttigristzdbunitsutf8uuidvctrsvroomwithrwkxml2

Legacy and next-generation data
Which interface should I use? | Start a new analysis by pinning a modern bundle | Use the _ng interface | Recording provenance in research outputs

Last update: 2026-09-01
Started: 2026-09-01

Frequently Asked Questions
Why are the longitude values negative? | Why is a valid ZIP code missing from zip_code_db? | How accurate is the city / county ("jurisdiction") information? | I get object 'zip_code_db' not found | How do I get county FIPS codes from a ZIP code? | Why does zipcodeR still install raster and tidycensus? | Where does the data come from? | Which API should a new project use?

Last update: 2026-09-01
Started: 2026-09-01

Introduction to zipcodeR
Basic search functions | Data | Searching for ZIP codes by state | Searching multiple states at once | Searching by county | Approximate matching of county names | Finding out more about your ZIP codes | Data: U.S. Real Estate Market | Reverse ZIP code search | Relating ZIP codes to Census data | Testing if a ZIP code is a ZCTA

Last update: 2022-10-03
Started: 2020-12-12

Geographic functions in zipcodeR
Calculating the distance between two ZIP codes | Geocoding a ZIP code | Searching for ZIP codes within a radius

Last update: 2021-04-15
Started: 2021-04-15

Readme and manuals

Help Manual

Help pageTopics
Download the comprehensive ZIP code databasedownload_comprehensive_data
Legacy in-place data downloaderdownload_zip_data
Download a versioned zipcodeR data bundledownload_zip_data_bundle
Returns that lat / lon pair of the centroid of a given ZIP codegeocode_zip
Geocode ZIP codes using an explicit data bundlegeocode_zip_ng
Get all congressional districts for a given ZIP codeget_cd
Get congressional districts using an explicit data bundleget_cd_ng
Get all Census tracts within a given ZIP codeget_tracts
Get Census tracts using an explicit data bundleget_tracts_ng
Returns true if the given ZIP code is also a ZIP code tabulation area (ZCTA)is_zcta
Test ZCTA membership using an explicit data bundleis_zcta_ng
Normalize ZIP codesnormalize_zip
Normalize ZIP codes with corrected boundary behaviornormalize_zip_ng
Read a versioned zipcodeR data bundleread_zip_data_bundle
Given a ZIP code, returns columns of metadata about that ZIP codereverse_zipcode
Reverse-geocode ZIP codes using an explicit data bundlereverse_zipcode_ng
Get all ZIP codes that fall within a given congressional districtsearch_cd
Search a congressional district using an explicit data bundlesearch_cd_ng
Search ZIP codes for a given city within a statesearch_city
Search a city using an explicit data bundlesearch_city_ng
Search ZIP codes for a countysearch_county
Search a county using an explicit data bundlesearch_county_ng
Returns all ZIP codes found within a given FIPS codesearch_fips
Search FIPS codes using an explicit data bundlesearch_fips_ng
Search for ZIP codes that are within a given radius from a pointsearch_radius
Search within a radius using an explicit data bundlesearch_radius_ng
Search for ZIP codes located within a given statesearch_state
Search a state using an explicit data bundlesearch_state_ng
Search all ZIP codes located within a given timezonesearch_tz
Search a timezone using an explicit data bundlesearch_tz_ng
ZCTA to Census Tract (2010) Crosswalkzcta_crosswalk
ZIP Code Databasezip_code_db
Inspect the provenance supplied with a zipcodeR data bundlezip_data_provenance
Report zipcodeR data-version metadatazip_data_version
Calculate the distance between two ZIP codes in mileszip_distance
Calculate ZIP-to-ZIP distance using an explicit data bundlezip_distance_ng
ZIP Code to Congressional District Relationship Filezip_to_cd