← The United Stateschartlink · choropleth
The United States by: congressional districts · counties · metro areas · states · 3-digit ZIP code areas
Map of the United States by congressional district, one number per district, with the state borders
Also: congressional district map · map every House district by a value · House election results map · district-level choropleth with state borders · map of America by congressional district · 119th Congress district map

Example: How every congressional district voted in 2024 — Winning margin in the 2024 House election, by district: the winner's share minus the runner-up's, red for a Republican winner and blue for a Democrat; the deepest shades are 50 points or more. An unopposed seat counts as a full margin, and a race between two candidates of one party shows as that party's margin. Puerto Rico and the District of Columbia elect non-voting members and stay grey.
About this template
Data: one row per district with the state and district number, CA-05 style (two digits; CA-5 and the Census code 0605 are accepted too), and a number. At-large seats are AK-AL, DE-AL, ND-AL, SD-AL, VT-AL and WY-AL. Boundaries are the 119th Congress (2025 to 2027). The District of Columbia and Puerto Rico have non-voting seats and are drawn too. A district with no row stays grey. State borders are drawn on top. Same design as the state, county and metro maps, so the four can sit side by side.
A choropleth map of the congressional districts of the 119th Congress (435 voting districts plus the District of Columbia and Puerto Rico, by state and number), each region filled by one number from your data (the "margin" column). The borders of the US states and Puerto Rico are drawn on top of the regions in dark navy blue, 0.5 units wide, so the finer regions read inside their larger units.
A diverging colour scale: deep navy blue for the most negative values through warm light grey at zero to deep red for the most positive; pinned to -50 to 50, so values beyond the ends take the end colour and the colour bar says ≤ and ≥; a gradient colour bar below the map, with its labels underneath; values formatted with a forced plus or minus sign, 0 decimals, a "pts" suffix; on a white canvas (#ffffff) with near-black text — a light theme; 0.25-unit hairline outlines between regions.
The title and description are left-aligned above the chart. Font: Inter (the default); a source line with a link sits at the bottom, with the chartlink badge in the corner.
Data: 2 columns — district (string, "District (state-number, e.g. CA-05; at-large AK-AL)"), margin (number, "Winning margin (points, Republican positive)") — and 435 rows in the example "How every congressional district voted in 2024". Regions are named by state and district number, CA-05 style (at-large seats AK-AL); a region with no row stays unfilled in grey, and an unknown code fails loudly with the nearest matches. Your data keeps the same column ids and every other setting comes from the template; an agent can change any of them.
Other looks of this template — dark (on a dark canvas): ast_Hi7ISGFEUDW1qu3XJJvZ8; buckets (with the values in classes and a swatch legend): ast_u2UH4qsj53VuKA2C8OdPU; editorial (in the editorial house style — serif type on paper, a green ramp): ast_ibaHbJL4zvPRrvu3FIWun; categories (with a text category per region and a swatch legend): ast_BBxxHGqLPlk6kkkNV7KO8; buckets-dark (with the values in classes and a swatch legend, on a dark canvas): ast_o6ID2oOgMoWsccxGbVc1w; surroundings (with the land around the place drawn in grey): ast_txjGU0rrXJBzkbvvI763x; categories-dark (with a text category per region and a swatch legend, on a dark canvas): ast_bZbgavaHJKasKRkDQ6xli; buckets-editorial (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_J4vma4vSOWXzF7dfVHpFb; dark-surroundings (on a dark canvas, with the land around the place drawn in grey): ast_UbP3OOg8xM3XtxAD16Gek; buckets-surroundings (with the values in classes and a swatch legend, with the land around the place drawn in grey): ast_Mtv2kGWVA5NM4COyToOcU; categories-editorial (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_TihJZ24yEhspyn34wY5fG; editorial-surroundings (in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_WXGXNIPg95YZtcNHflECl; categories-surroundings (with a text category per region and a swatch legend, with the land around the place drawn in grey): ast_aTQQWkSnm8T5g2VC4y1bS; buckets-dark-surroundings (with the values in classes and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_WY5GwsfDK7aU3ymJyLlcQ; categories-dark-surroundings (with a text category per region and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_A7uRytDyB1su51MENkVi2; buckets-editorial-surroundings (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_uGGOongpFNpocsCSbBGXT; categories-editorial-surroundings (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_DY9Gqi7HkaRIPnuoZKydp. On the page, switch with the toggles; an agent passes that id as the template instead.
Use it with your agent
Copy the prompt, paste it into Claude, ChatGPT, Cursor or any agent with the chartlink MCP server or API, and give it your numbers. It rebuilds this exact design with your data and hands back an embed, a PNG and a page.
The prompt in full
Data this template expects
| column id | type | in the example |
|---|---|---|
| district | string | District (state-number, e.g. CA-05; at-large AK-AL) |
| margin | number | Winning margin (points, Republican positive) |
435 rows in the example. Your data keeps these column ids; everything else about the chart comes from the template.
For agents: the API call
POST https://chartlink.app/api/assets
{
"template": "ast_9qDMS5Haakw3QoVrc0vnw",
"knobs": {
"theme": "light",
"dataType": "gradient",
"title": {
"text": "Your title"
},
"source": {
"text": "Where the numbers come from"
}
},
"data": {
"columns": [
{
"id": "district",
"type": "string"
},
{
"id": "margin",
"type": "number"
}
],
"rows": [
[
"…"
]
]
},
"publish": true
}The recipe (the template's settings)
{
"chart": {
"scale": "diverging",
"domain": [
-50,
50
],
"format": {
"kind": "number",
"sign": true,
"suffix": " pts",
"decimals": 0
},
"borders": {
"color": "#1f2937",
"width": 0.5,
"geography": "us-states-pr"
},
"outline": {
"width": 0.25
},
"geography": "us-districts"
},
"title": {
"text": "How every congressional district voted in 2024"
},
"preset": "map-light",
"source": {
"url": "https://github.com/fivethirtyeight/election-results",
"text": "FiveThirtyEight, 2024 House results from state election boards"
},
"encoding": {
"value": {
"column": "margin"
},
"region": {
"column": "district"
}
},
"description": {
"text": "Winning margin in the 2024 House election, by district: the winner's share minus the runner-up's, red for a Republican winner and blue for a Democrat; the deepest shades are 50 points or more. An unopposed seat counts as a full margin, and a race between two candidates of one party shows as that party's margin. Puerto Rico and the District of Columbia elect non-voting members and stay grey."
}
}map · choropleth · united-states · congressional-districts · districts · house · election · state-borders · us-set
Similar templates
- Map of the United States by 3-digit ZIP code area, one number per area, with the state borders
- Map of the United States by county, one number per county, with the state borders
- Map of the United States by metropolitan area, one number per metro, with the state borders
- Map of the United States by state, one number per state
- Map of Madrid by district, one number per district
- Map of Berlin by district, one number per district
- Map of India by district, one number per district
- Map of the United Kingdom by parliamentary constituency, one number per seat, with the nation borders
- All templates →