/geo-data

US zipcode and city list with latitude, longitude, and timezone.

Primary LanguagePython

geo-data

US zipcode and city list with latitude, longitude, and timezone.

Download [.zip, 2.5MB]

Usage

The usage is pretty basic.

python process.py --shapefiles shapefiles/tz_us --cities cities.csv --zipcodes zipcodes.csv --output sqlite.

Notice how we don't have an extension for shapefiles/tz_us. Since the timezone shapefile is composed of many individual files, omit the extension and the shapefile library will automatically load all the needed files.

If these instructions didn't really do it for you, there's also python process.py --help.

Note that this is a very resource-intensive script (O(m*n)), and will take quite a while to complete. (Two days on an AWS Medium EC2 instance I spun up.) And because it's written in Python, GIL will prevent it from using more than a single core.

Sources

This data is compiled using the following sources: