Choropleth Map Maker for Countries and US States
Operator: Abdulla Al Fahad. How tools are built and checked
A choropleth is only as good as the match between your place names and the map's shapes: a country spelled differently, an ISO code in the wrong column, or a territory the map does not draw leaves a silent white hole. This page draws world countries or the 50 US states and DC from a two-column table, colours them by class or by gradient, and lists every name that failed to match and why.
The map downloads one thing: the boundary file for the map you choose, about 108 KB for the world at 110m detail, 756 KB at 50m and 82 KB for the US states, fetched from jsDelivr and cached by the browser. Your table stays on the page.
Key features
- World countries at 110m or 50m detail and US states, from world-atlas 2.0.2 and us-atlas 3.0.1
- Countries matched by name, ISO code or numeric code with common alternative names; states by name, USPS or FIPS code
- Quantile, equal-width, Fisher-Jenks natural breaks, your own break values, or a continuous gradient
- Eight sequential palettes from ColorBrewer and viridis, reversible, with 3 to 9 classes
- A legend with the number of places in each class, optional titles, a hover readout and native tooltips
- SVG, PNG at 2x, matched-values CSV and unmatched-names CSV exports
Which names and codes match, how classes are chosen and what the downloaded boundary file holds
One column names the place and another holds a number; the page guesses both from the headers. Values may carry thousands commas, a currency symbol or a trailing percent sign. A place listed twice can take the first value, the last, the sum or the average. Blank values and text in the value column are listed in the report.
Countries match by ISO 3166 alpha-2, alpha-3 or numeric code, by full name, or by common forms such as UK, Russia, South Korea, Dem. Rep. Congo, Türkiye and Eswatini. Kosovo, N. Cyprus and Somaliland are drawn and match by name. NA in capitals is read as Namibia, while na and n/a count as blank. States match as Texas, TX, 48, DC or District of Columbia. The state file is us-atlas's states-albers-10m, which holds 51 shapes: the 50 states and DC. Puerto Rico, Guam and the other territories are named in the report but not drawn.
How it works
The TopoJSON boundary file is decoded on the page. Its arcs are delta-encoded and quantised, shared by neighbouring shapes, and stitched into rings; a polygon with a hole is drawn with the even-odd rule.
Quantile classes put an equal number of places in each class, equal width divides the range between the smallest and largest value evenly, and natural breaks choose the cut points that minimise the squared deviation inside classes.
World shapes use the Equal Earth projection, an equal-area projection by Šavrič, Patterson and Jenny (2018), so land area is comparable across the map. US states keep the Albers layout of us-atlas, with Alaska and Hawaii moved below the lower 48.
Typical uses
- A reporter colouring EU unemployment rates for a story, using quantile classes so every class holds a similar number of countries.
- A teacher mapping the median rents of 12 states in orange, from a table that also has a Puerto Rico row, which the report names as not drawn.
- An NGO analyst who has a country column of mixed names and ISO codes and needs the unmatched report to clean it up.
- A student building a slide map and downloading the SVG to edit labels in a vector editor.
Building one
- Drop or paste the table: country or state in one column, a number in another.
- Choose World or US states, the detail level for the world, and confirm the place and value columns.
- Pick a scale: quantile, equal width, natural breaks, your own breaks or a continuous gradient.
- Choose a palette and the number of classes, and reverse the colours if low values should be dark.
- Read the matching report and correct names in your file where needed.
- Download the SVG, the PNG or the values CSV.
Example
A world map of internet users in percent for 22 countries, five quantile classes, Blues palette
country,internet_users_pct
United States,93
Canada,94
Brazil,81
Argentina,87
United Kingdom,97
France,85
Germany,92
Nigeria,55
Egypt,72
South Africa,75
Dem. Rep. Congo,23
India,52
China,76
Japan,83
"Korea, Republic of",98
Australia,96
Russia,88
Turkiye,83
IDN,66
MEX,76
Kenya,40
Atlantis,50Classes and matching report
21 of 22 rows matched, including the code IDN and "Korea, Republic of"; Atlantis: not recognised as a country name or ISO code
Quantile class edges: 23 to 66, 66 to 76, 76 to 85, 85 to 93, 93 to 98
Places per class: 5, 4, 4, 4, 4
Equal width gives 1, 2, 2, 7, 9 places per class, natural breaks 1, 3, 5, 6, 6Tips for best results
- Choose quantile classes to show rank and equal width to show magnitude. On the example the top class holds nine of 21 countries at equal width but only four at quantile.
- Use the 50m detail when your data includes small states such as Singapore, Malta or the Maldives; the 110m file leaves them out and says so in the report.
- Pick the sequential palette for values that run from low to high, and reverse it when a high value is the bad outcome and should look dark.
- Type break values you can explain in a caption, such as 50, 75 and 90 percent, instead of the computed edges.
Things to check before you rely on it
Choropleths colour whole areas, so large, thinly populated countries dominate the picture even when the value is a rate. Pair the map with the values CSV.
Equal Earth is equal-area but distorts shape near the poles and edges; Antarctica is hidden by default for that reason.
A place listed twice is not an error: the chosen rule (last, first, sum or average) is applied silently, and the report only counts how many places were repeated.
The map needs an internet connection the first time, to fetch the boundary file; if that download fails, the page offers a retry instead of a blank map.
Common errors and how to fix them
- The report lists "Atlantis" as not recognised as a country name or ISO code.
- Correct the spelling or use the ISO alpha-2 or alpha-3 code; the unmatched list names the row so you can fix it in the file.
- The report says a name such as Singapore is a real country, but too small or not drawn at this detail level.
- Switch the world map to 50m detail, which draws Singapore, Malta and the Maldives. If the name still fails at 50m, it is a code or spelling the matcher does not know.
- Enter break values as increasing numbers separated by commas, for example 20, 40, 60, 80.
- Custom breaks must increase and fall inside the data range.
- The report says Puerto Rico is a US territory, and that the boundary file draws the 50 states and DC only.
- The Albers state file this page loads has no territory shapes, so those rows cannot be coloured. Leave them out of the map table or chart them elsewhere.
Best practices
- Quote any country name that contains a comma, such as "Korea, Republic of", in your CSV.
- Keep two to five classes for a general audience, and state the class edges in the legend title or caption.
Matching names and codes
Names are compared after removing accents, punctuation and a leading the, so Côte d'Ivoire, Cote d'Ivoire and cote divoire land on the same shape. Codes are matched exactly. The matcher knows each country under its ISO name, its map name and the usual short forms.
Classes against gradients
Classed maps make a few distinct colours easy to read against a legend. A continuous gradient shows every difference, but readers cannot look up a shade. The gradient option uses the same palettes and runs from the smallest to the largest matched value.
Frequently asked questions
Why is Antarctica hidden?
Equal Earth stretches it into a band along the bottom and it carries no data in most files. Tick Draw Antarctica to include it.
Is the map saved with my data inside?
The SVG holds the shapes, colours and legend text, plus each region's name and value in its tooltip, so share it only if those values are not confidential.
Can I map counties or regions inside one country?
Not yet: the maps are world countries and US states. For other regions, the point-in-polygon tool here assigns your points to your own GeoJSON boundaries.