Skip to main content

GeoTIGER

GeoTIGER is a local geocoding option for US address data. Download Census TIGER/Line address ranges, prepare a local reference table, and geocode a Pandas table without sending the address data to an online geocoder.

It is an alternative for analysts who do not want to use an online geocoder or do not have Esri/ArcGIS Pro. For the local Esri approach, see Crime De-Coder's Geocoding Crime Data Locally tutorial. GeoTIGER is also a lightweight Python alternative to the PostGIS TIGER geocoder: it needs no PostgreSQL server or PostGIS extension, stores the reference in one embedded DuckDB file, accepts Pandas tables directly, and returns component scores, match methods, and phase timings for audit. PostGIS may still be the better fit when the data already live in PostgreSQL or a shared multi-user database service is required.

The download is the only network step. Preparation and geocoding are local. Street interpolation uses a projected state-plane CRS; returned matches keep WGS84 latitude/longitude.

Quick start

pip install geotiger
import pandas as pd

from geotiger import (
    GeoTIGERStore,
    Geocoder,
    download_tiger_ranges,
    prepare_ranges,
    state_plane_crs,
)

# Network step; cache=True lets pygris reuse the download.
ranges = download_tiger_ranges(
    state="NC",
    county="Durham",
    year=2024,
    cache=True,
)

# Defaults include intersection preparation and use a local projection.
prepared = prepare_ranges(
    ranges,
    state="NC",
    source="tiger_2024_durham",
)

with GeoTIGERStore("data/durham.duckdb") as store:
    store.ingest_candidates(prepared, replace=True)

# Input address data can be an in-memory DataFrame; it needs no coordinates.
inputs = pd.DataFrame([
    {"address": "601 N Mangum St", "city": "Durham", "state": "NC", "zip": "27701"},
])
with GeoTIGERStore("data/durham.duckdb") as store:
    result = Geocoder(store).geocode(inputs)

result.matches[["address", "match_status", "match_latitude", "match_longitude"]]

For a whole state, use county=None:

state_ranges = download_tiger_ranges("DE", county=None, year=2024, cache=True)
state_prepared = prepare_ranges(
    state_ranges,
    state="DE",
    source="tiger_2024_de",
)

For a large state, prepare counties one at a time and ingest them into the same DuckDB file to limit peak memory use.

Useful options

  • InterpolationConfig controls the projected CRS, endpoint/side offsets, and intersection preparation. include_intersections=True is the default.
  • GeocoderConfig(deduplicate_inputs=True) deduplicates repeated normalized inputs before parsing and candidate lookup, then expands the results back to every original row.
  • With strict_locality=True (the default), state/city/ZIP are locality blocks when supplied; default scoring therefore emphasizes street identity (0.62) and house-number proximity (0.30).
  • Street names, suffixes, and directionals are tagged with usaddress, then canonicalized and scored separately. Common ordinals and abbreviations (Ninth/9th, Mount/Mt), directional street names (South St), and numbered route forms are unified after tagging (including trailing directionals on US 70 HWY E and concurrent numbers such as US 15-501); a phonetic candidate block handles small spelling variants such as Ivey/Ivy. Suffixes such as Rd/Dr remain visible as low-weight evidence instead of preventing candidate retrieval. The default house-number window is one 100-block so range-end misses still retrieve the named street.
  • street_variant_fallback=False disables canonical-name and phonetic fallback. This is separate from street_fallback, which controls the broader legacy street-signature pass.
  • prepare_addresses and prepare_parcels add local address points or parcel representatives to the same reference schema. CombinedGeocoder combines individual addresses, parcels, and TIGER ranges, preferring individual addresses, then parcels, then TIGER for otherwise equivalent matches.
  • Local lookup aliases and a reviewed historical-address cache can bypass repeated candidate matching.

Demo notebooks

  • DC five-address demo: downloads and prepares DC TIGER data, geocodes five coordinate-free inputs, and renders a static offline map plus a Folium map with optional OpenStreetMap tiles.
  • Durham crime demo: combines Durham, Orange, and Wake County TIGER data into one geocoder and processes the large public Durham crime table locally.
  • Statewide TIGER demo: builds a whole Delaware reference with county=None, times 10,000 randomized statewide inputs with controlled errors, and maps a statewide sample.

To view and run the demos locally from the repository root:

git clone https://github.com/apwheele/geotiger.git
cd geotiger
uv sync --extra demo --extra dev
uv run jupyter lab

If JupyterLab does not render saved interactive output, trust that notebook locally and reopen it:

uv run jupyter trust notebooks/dc_five_addresses_demo.ipynb

Trust permits saved HTML/JavaScript output to render; use Restart Kernel and Run All Cells to verify the code on your own machine.

To execute one in place and save its outputs without opening JupyterLab:

uv run jupyter nbconvert --to notebook --execute --inplace notebooks/dc_five_addresses_demo.ipynb

The Durham unmatched review is in reports/durham_unmatched_review.md.

Privacy and testing

GeoTIGER does not call a geocoding API. After TIGER data is downloaded, the reference database and all geocoding runs are local. Maps are created without a default online basemap.

uv run pytest
uv run ruff check .

Pytest includes branch coverage and enforces an 80% package-wide minimum. For a browsable local report, run uv run pytest --cov-report=html and open htmlcov/index.html.

Timing reports are in reports/; result.timings.to_dict() provides timings for each run.

Metadata

Release files for geotiger 0.1.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 geotiger 0.1.0
File Size Uploaded Provenance Actions
geotiger-0.1.0.tar.gz 54.0 kB With provenance Details for geotiger-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geotiger 0.1.0
File Interpreter ABI Platform Actions
geotiger-0.1.0-py3-none-any.whl Python 3 none any Details for geotiger-0.1.0-py3-none-any.whl

Total release size: 105.9 kB

Release files / geotiger-0.1.0.tar.gz

Download URL geotiger-0.1.0.tar.gz
Size 54.0 kB
Tags Source
SHA-256 checksum
How to use checksums
adb78b8aae64b99e9745f93213c65936b735ca7e8a1bac06c76f282e23e8e751
BLAKE2b-256 checksum
How to use checksums
ace427b9e429773a4d701a58ed6a3038aece545026b38f66e469239373defa23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 21, 2026.

Transparency log

Release files / geotiger-0.1.0-py3-none-any.whl

Download URL geotiger-0.1.0-py3-none-any.whl
Size 51.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4848cf027b2ce679053258cb4f317e772784898ec2b15c8aa57c08d66057e4b
BLAKE2b-256 checksum
How to use checksums
1c34bcac809d8761f0b908ec405e7b655ba96376d1673820870e4c54c3d57e37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 21, 2026.

Transparency log

Security for geotiger 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for geotiger-0.1.0.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 21, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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