← Africachartlink · choropleth
Africa by: countries
Map of Africa by country, one number per country
Also: Africa map · map of African countries · African choropleth · countries of Africa coloured by a value · Africa data map

Example: Population of Africa's countries, 2023 — Resident population in 2023 for the countries of Africa. Nigeria, Ethiopia and Egypt lead; the deepest shade is 100 million or more.
About this template
Data: one row per country with its ISO code (two-letter DE or three-letter DEU) or its English name, and a number. A country with no row stays grey. The whole continent, North Africa included, on an equal-area projection. Same design as the other world and continent maps.
A choropleth map of the regions of the "africa-countries" geography, each region filled by one number from your data (the "population" column). The view is cropped to longitude -20–52 and latitude -36–38.
A sequential colour scale from pale blue for the smallest values to deep navy blue for the largest; pinned to 1000000 to 100000000, 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 in compact form (1.2k, 3.4M), 1 decimal; on a white canvas (#ffffff) with near-black text — a light theme; 0.5-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 — country (string, "Country (ISO alpha-2 or alpha-3 code, or name)"), population (number, "Population, 2023") — and 53 rows in the example "Population of Africa's countries, 2023". Regions are named by ISO 3166-2 region codes or region names; 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_u9NvRlzRDa3YFl9Wq8yUm; buckets (with the values in classes and a swatch legend): ast_C1cI8u6W7mkWBiZGrUuuS; editorial (in the editorial house style — serif type on paper, a green ramp): ast_YhOn8Sw8l5D2pqTsKIGnb; categories (with a text category per region and a swatch legend): ast_GZfTtzJD34ONB4wFTEu4D; buckets-dark (with the values in classes and a swatch legend, on a dark canvas): ast_a81ywTGUdFX9oaMPavysH; surroundings (with the land around the place drawn in grey): ast_e8lNpfgDOykmApRYjZV95; categories-dark (with a text category per region and a swatch legend, on a dark canvas): ast_Fxh9dUcvRQz0w2Xq8pn7O; buckets-editorial (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_iBmjLdgyIk4ttNPOEXVKQ; dark-surroundings (on a dark canvas, with the land around the place drawn in grey): ast_1k8xJ8nlj4OlU78SBbEXE; buckets-surroundings (with the values in classes and a swatch legend, with the land around the place drawn in grey): ast_0j5HtaGNoh5DsfLk0MiIl; 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_lkDw8ObUTOBhnZVXNFUU1; editorial-surroundings (in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_MjLHDCE7mWyFksJEAor76; categories-surroundings (with a text category per region and a swatch legend, with the land around the place drawn in grey): ast_RmM1kVReoPSae7whswkfu; 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_4xVmEfMIMWNC1EHsMPf9z; 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_8tdYre6j0S18DKevgVotk; 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_H0mscy28aMkTroViIum8Q; 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_c4isCYS7UoyDdAmYV1bkK. 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 |
|---|---|---|
| country | string | Country (ISO alpha-2 or alpha-3 code, or name) |
| population | number | Population, 2023 |
53 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_itBRUjwAPnySxszHEdvW3",
"knobs": {
"theme": "light",
"dataType": "gradient",
"title": {
"text": "Your title"
},
"source": {
"text": "Where the numbers come from"
}
},
"data": {
"columns": [
{
"id": "country",
"type": "string"
},
{
"id": "population",
"type": "number"
}
],
"rows": [
[
"…"
]
]
},
"publish": true
}The recipe (the template's settings)
{
"chart": {
"bounds": [
-20,
-36,
52,
38
],
"domain": [
1000000,
100000000
],
"format": {
"kind": "number",
"compact": true,
"decimals": 1
},
"outline": {
"width": 0.5
},
"geography": "africa-countries"
},
"title": {
"text": "Population of Africa's countries, 2023"
},
"preset": "map-light",
"source": {
"url": "https://data.worldbank.org/indicator/SP.POP.TOTL",
"text": "World Bank, World Development Indicators — population, total (2023)"
},
"encoding": {
"value": {
"column": "population"
},
"region": {
"column": "country"
}
},
"description": {
"text": "Resident population in 2023 for the countries of Africa. Nigeria, Ethiopia and Egypt lead; the deepest shade is 100 million or more."
}
}map · choropleth · africa · countries · world-set
Similar templates
- Map of Europe by country, one number per country
- Map of South America by country, one number per country
- World map by country, one number per country
- Map of Europe by NUTS 3 region, one number per region
- Map of Europe by NUTS 2 region, one number per region
- Map of Europe by NUTS 1 region, one number per region
- Map of Slovakia by municipality, one number per municipality
- Map of Switzerland by municipality, one number per municipality
- All templates →