Skip to content

From Zip Code to Core-Based Satistical Area (CBSA)

License

Notifications You must be signed in to change notification settings

macoj/zipcode2cbsa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

U.S. Zip Code to Core-Based Satistical Area (CBSA)

Usage as simple as:

import zip2cbsa
converter = zip2cbsa.Zip2CBSA()
cbsa, designation = converter.zip2cbsa(['32901'])
print cbsa, designation

results

37340 Metropolitan Statistical Area

It also works with lists:

zipcodes = [32901, 10033, 90003]
converter.zip2cbsa(zipcodes)

results

array([['37340', 'Metropolitan Statistical Area'],
       ['35620', 'Metropolitan Statistical Area'],
       ['31100', 'Metropolitan Statistical Area']], dtype=object)

This code is based on https://github.com/Datamine/CBSA-RUCA-Lookup.

About

From Zip Code to Core-Based Satistical Area (CBSA)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 71.3%
  • Python 28.7%