How to make a map of your data by county, city or district
Get the boundaries as GeoJSON, join your numbers on the area code, and colour by value. One get_boundaries call returns every county, city, ZIP, district or precinct inside a state or county, at a detail level that fits a web map.
Who this is for
- Dashboard and BI builders
- Reporters and researchers
- Anyone with a spreadsheet by county or district
Ask your agent
With Boundary Atlas added to Claude, ChatGPT, Cursor or Codex (free, no key; how):
Using Boundary Atlas, get Ohio's counties as GeoJSON at low detail and make a choropleth of this CSV by county FIPS.
Step by step
- Pick the level. county, place (city), zcta, congressional_district, state_senate_district, state_house_district or precinct.
- Get the shapes. get_boundaries(id="us:state:<FIPS>", children_level="county", detail="low"). Large sets come back as a download link that works for an hour.
- Join and colour. Join on code (FIPS for counties) and colour by value in MapLibre, Leaflet, Datawrapper, Flourish or QGIS.
- Trim water. clip_to_land (on by default) trims open water so coastal shapes look right.
Live example
Ohio's 88 counties in one call, light enough for a web map:
get_boundaries(id="us:state:39", children_level="county", detail="low")
Features carry id, code (the county FIPS) and name: join your data on code, then colour by value in MapLibre, Leaflet, Datawrapper, Flourish or QGIS.
Things to know
- Boundaries are simplified to about 10 m: right for maps, not for surveying.
More guides
- How to convert ZIP code data to counties (or cities, or districts)
- How to find the congressional and state legislative districts for an address
- How to list the ZIP codes in a city, county or congressional district
- How to assign leads and accounts to sales territories by city, county or district
- How to map election results by precinct
- How to match members or supporters to their legislative districts
- How to tell whether an address is inside city limits
- How to find the federal riding and polling division for a place in Canada
- How to find who represents an address in Congress and the state legislature
- How to find a city's or county's official website and code of ordinances