CYBERAUTOMATIONSStart a project
Data pipelinePhase 2 of 5 complete

Ranking 393 US metros on what you keep, not what you earn

A cache-first geospatial pipeline that joins public wage, rent, tax and broadband data in DuckDB Spatial, then ranks 393 US metro areas by income left after housing and tax plus internet quality.

metro areas scored
393
tests passing
106
income models
2

The problem

Job boards and listing sites rank listings, not places. None of them answers the question a remote-eligible worker actually has: which metro leaves the most money after rent and tax, and still has internet good enough to work from?

The data to answer it is public and free (federal wage surveys, fair market rents, Census boundaries, open speed test data), but it has never been joined. Paid listing APIs add a second problem: a careless map can burn a month of quota in an afternoon.

The approach

  1. Cache-first is an absolute rule. Data moves from the network to raw files, then to GeoParquet on disk, then to maps. Nothing is ever drawn straight from an API.
  2. A core package owns the ingest machinery (sources, cache, quota ledger) and installs on its own. A separate app package owns scoring and the command line.
  3. DuckDB Spatial joins wages, rents and metro boundaries. The join covers 393 metro areas, with each metro's wage figure tagged high, medium or low confidence depending on how directly it was reported.
  4. Scoring lives in a TOML file. Net compensation carries 65% of the weight, broadband speed 25% and latency 10%. Retuning the ranking is a config edit with no code change.
  5. Two income models are built in. The local model uses each metro's median wage. The remote model holds pay fixed, because a remote salary does not move when you do. The two models produce completely different rankings, which was the main finding.
  6. Licensing is enforced in code. Every source declares whether commercial use is allowed, and the commercial profile refuses to load any source that fails that check.
  7. A staged funnel protects quota: the cheap national ranking runs first, and listing-level API calls are only spent in metros the ranking already selected.

How it flows

Command lineIngestDisk cacheDuckDB SpatialScoringFetch public dataCheck licence and quotaRaw files, then GeoParquetJoin wages, rents and metro bordersRead from disk only393 metro areasApply TOML weightsRanked list and map
  1. Command line to Ingest: Fetch public data
  2. Ingest: Check licence and quota
  3. Ingest to Disk cache: Raw files, then GeoParquet
  4. Command line to DuckDB Spatial: Join wages, rents and metro borders
  5. Disk cache to DuckDB Spatial: Read from disk only
  6. DuckDB Spatial to Scoring: 393 metro areas
  7. Scoring: Apply TOML weights
  8. Scoring to Command line: Ranked list and map
From public data to a ranked list. Nothing is drawn straight from an API. Solid arrows are requests, dashed arrows are replies.
Show this diagram as Mermaid text
sequenceDiagram
    participant P0 as Command line
    participant P1 as Ingest
    participant P2 as Disk cache
    participant P3 as DuckDB Spatial
    participant P4 as Scoring
    P0->>P1: Fetch public data
    P1->>P1: Check licence and quota
    P1->>P2: Raw files, then GeoParquet
    P0->>P3: Join wages, rents and metro borders
    P2-->>P3: Read from disk only
    P3->>P4: 393 metro areas
    P4->>P4: Apply TOML weights
    P4-->>P0: Ranked list and map

Tech stack

Language
Python
Joins
DuckDB with the Spatial extension
Storage
GeoParquet on local disk
Geometry
GeoPandas, Census cartographic boundary files
Maps
GeoLibre project files and HTML export
Config
TOML scoring file
Tests
pytest
Public data
BLS wage survey, HUD fair market rents, Census boundaries, Ookla open data, state tax table

Results

  • 393 metro areas are scored and mapped from cached local data, with 106 tests passing.
  • The national map file is 6.1 MB, with 1.55 MB of inlined map data, far under the 50 MB limit of the map viewer.
  • With the local income model the top four are Seattle, San Jose, New Haven and Boulder. With the remote model they are Morristown TN, Johnson City TN, Owensboro KY and Punta Gorda FL.
  • A staleness bug in the tax source was caught and fixed: verified rates sat on disk while the store kept old placeholders. Re-ranking with the correct rates moved San Jose from fourth to second.
  • Known limits, stated plainly: 150 of the 393 metros use a fallback occupation for wages, rent is a federal policy figure rather than a market rent, and the remote wage sample is still too small to act on.

Every figure on this page comes from the project's own code, tests or notes. Where there is no measured number, we describe the outcome in words.

Demo

scoring.toml and CLI
[income]
model = "local"        # or "remote": pay is fixed and does not move with you

[weights]
# Weights are relative and get normalized, so they need not sum to 1.
net_comp = 0.65
broadband = 0.25
latency = 0.10

[broadband]
saturate_mbps = 500.0    # download speed above this adds nothing

$ geo-personal refresh [--force] [--source NAME]
$ geo-personal rank [--top N] [--model local|remote] [--csv PATH]
$ geo-personal map [--column score] [--no-html]
The scoring weights file and the command line, both taken from the project.

A rendered metro ranking map and sample ranking output are being prepared.

Source code

The source is being prepared for public release. Until then, contact us for a walkthrough of Geo-Intel.

Service

Custom research and data tools

Market, job and property dashboards built on real, refreshed data.

See all custom build services

More builds

Last updated 2026-11-10

Want something like this on your data?

Tell us what you want automated. If it fits, we will tell you exactly what it looks like and what it costs.