Skip to main content

zipcode-coordinates-tz

CI Build License PyPI Version versions

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:

Development

Setup Python Environment:

Run scripts/console.sh

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)

Source distribution for zipcode-coordinates-tz 0.5.0
File Size Uploaded
zipcode_coordinates_tz-0.5.0.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zipcode-coordinates-tz 0.5.0
File Interpreter ABI Platform
zipcode_coordinates_tz-0.5.0-py3-none-any.whl Python 3 none any Details

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}

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page