zipcode-coordinates-tz
A Python package that enables converting a US Zip Code into a timezone. This is done through the querying of the USPS API, then joining it with the zipcode-coordinates-tz data from the US Census, and finally taking the coordinates and using timezonefinder to determine the timezone.
Dependencies:
- Geocoding Services Web Application Programming Interface (API)
- ZIP Codes by Area and District codes
- timezonefinder
Development
Setup Python Environment:
The first time run
uvx pre-commit install
If you need to relock:
Run scripts/lock.sh
Run code
Run scripts/console.sh uv run jupyter notebook
API Usage:
from zipcode_coordinates_tz import census, postal, timezone
df_postal_locales = await postal.get_locales()
df_postal_locales = df_postal_locales.loc[df_postal_locales.State == "NJ"]
df_postal_locales = await census.get_coordinates(df_postal_locales)
df_postal_locales = timezone.fill_timezones(df_postal_locales, fill_missing=True)
print(df_postal_locales)
As a CLI
python -m zipcode_coordinates_tz save NJ.json --state NJ --timezones --fill
Installation
To install zipcode-coordinates-tz from PyPI, use the following command:
$ pip install zipcode-coordinates-tz
You can also clone the repo and run the following command in the project root to install the source code as editable:
$ pip install -e .
Documentation
The documentation for zipcode-coordinates-tz can be found here or in the project's docstrings.
Metadata
Release files for zipcode-coordinates-tz 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zipcode_coordinates_tz-0.5.0.tar.gz | 20.3 kB | Without provenance | Details for zipcode_coordinates_tz-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zipcode_coordinates_tz-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for zipcode_coordinates_tz-0.5.0-py3-none-any.whl |
Total release size: 39.1 kB
Release files / zipcode_coordinates_tz-0.5.0.tar.gz
| Download URL | zipcode_coordinates_tz-0.5.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b9b69552b00dafec87513718b5efbb9206be2420991256ddd4ae066402fe34d
|
|
BLAKE2b-256 checksum How to use checksums |
b3ffc4bca5f8b43b18e955634a3396e4a11712168a73a29cc491f2fd43c36eaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / zipcode_coordinates_tz-0.5.0-py3-none-any.whl
| Download URL | zipcode_coordinates_tz-0.5.0-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86cda91a38da9a68af6c661850ee793dd2801e092f2177a4165c9259b63306e0
|
|
BLAKE2b-256 checksum How to use checksums |
2d69d8f02e2874e4d6ed3ecc94dc3ce75f76e4a76b29be083812d1837682df65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for zipcode-coordinates-tz 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.