these-united-states
A Python library for performing reverse geocoding of the United States of America.
Overview
These-united-states provides a simple, class-based interface to shapefiles from the United States Census Bureau defining boundaries of U.S. states and territories. States may be queried via full state name, abbreviation, or by coordinates (latitude/longitude pairs). State objects contain some metadata, including the bounding box, area, and polygons defining the state's boundaries.
Example
>>> import united_states
>>> us = united_states.UnitedStates()
>>> us.from_coords(29.881888, -82.726846)
[State(abbr='FL', name='Florida', bbox=BBox(left=-87.634896, bottom=24.396307999999998, right=-79.974306, top=31.000968))]
>>> us.by_abbr['WA']
State(abbr='WA', name='Washington', bbox=BBox(left=-124.848974, bottom=45.543541, right=-116.916071, top=49.002435999999996))
>>> us.by_name['Alaska']
State(abbr='AK', name='Alaska', bbox=BBox(left=-179.231086, bottom=51.175092, right=179.859681, top=71.439786))
Command-line interface
These-united-states is also usable from the command-line, with the appropriate extras installed.
$ pip install "these-united-states[cli,plot]"
$ python -m united_states 29.881888,-82.726846
(29.881888, -82.726846) Florida
$ python -m united_states --help
Usage: united_states [OPTIONS] [POINT]...
Lookup U.S. states by coordinate (reverse geocoding).
Options:
-b, --bbox / --no-bbox Print state bounding boxes in listing (implies
-l/--list).
-d, --dc / --no-dc Include the District of Columbia.
-x, --exclude TEXT Exclude states by abbreviation or name.
-h, --help Show this message and exit.
-i, --include TEXT Include states by abbreviation or name.
-l, --list / --no-list List included states.
-o, --oconus / --no-oconus Include states outside the continental U.S.
-p, --plot / --no-plot Plot the results (requires matplotlib).
-s, --seed FLOAT Seed random number generator for color plot
selection.
-t, --other / --no-other Include Puerto Rico and the Island Areas.
Options may be given multiple times. Options taking arguments are additive.
Multiple abbreviations or names may be provided in a single option using a
comma-separated list.
License
Metadata
Release files for these-united-states 1.3.1.26
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 |
|---|---|---|---|---|
| these_united_states-1.3.1.26.tar.gz | 10.6 kB | With provenance | Details for these_united_states-1.3.1.26.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| these_united_states-1.3.1.26-py3-none-any.whl | Python 3 | none | any | Details for these_united_states-1.3.1.26-py3-none-any.whl |
Total release size: 9.9 MB
Release files / these_united_states-1.3.1.26.tar.gz
| Download URL | these_united_states-1.3.1.26.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c373abe9ba50ac8c70b153742ef7ad91e381b756a47dd9771ca09a874c7ec24
|
|
BLAKE2b-256 checksum How to use checksums |
3135a437a8855801cc15ef6419ace3312b7ece81ebe0fcdbaeef934c3a43276e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / these_united_states-1.3.1.26-py3-none-any.whl
| Download URL | these_united_states-1.3.1.26-py3-none-any.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83e43041c266b09926ca7fc084e86a6a52d4e767cd46d32a51acc87ed438271e
|
|
BLAKE2b-256 checksum How to use checksums |
6b5c03420fced364d1d548108421e5fbb84590a4d8b0aca9cb0923aa96f91702
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for these-united-states 1.3.1.26
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for these_united_states-1.3.1.26.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA 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.