Creating a Choropleth Map

1428

With Datawrapper, you can create maps for over 1,000 different regions, using the same API endpoints that you use for charts. In this tutorial, you'll learn to create & edit a choropleth map. To learn how to create locator maps, visit this article instead.

📘

You need an API Access Token

Everything you need to follow this tutorial is a Datawrapper account and an API Access Token. Both are available for free. You can create an API Access Token with the click of a button in your Datawrapper settings. Learn how to do so in this article.

Create a map

Let's start with a short POST request to create our map. To do so, we'll define the visualization type in the API request. (Defining the title is not necessary, but it can't hurt.)

curl --request POST \
  --url https://api.datawrapper.de/v3/charts \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: application/json' \
  --data '{ "title": "Literacy rates in Africa", "type":"d3-maps-choropleth"}'

This will give you back a response with your id. In our case, that's HpeMi. You should remember your map ID, because you will need it for many of your following API requests. For example, if your chart id was th4ns, you'll need to insert that in the examples below every time you'll see the placeholder <ID> – otherwise, your requests won't work.

That was easy! But we still need to decide on the data we want to display, and the kind of map we want to use to do so:

Decide on a basemap

Choropleth maps differ from charts and locator maps in one important way: they require a basemap for your data to be plotted on.

Basemaps contain the administrative borders that are used to display the data. Datawrapper offers over 3,000 basemaps out of the box, like Denmark ZIP codes, Quebec Electoral Districts, countries in Africa or US states. To retrieve a list of all available basemaps, you can use the following API endpoint:

curl --request GET \
  --url https://api.datawrapper.de/plugin/basemaps

The response lists all basemaps and their IDs. The beginning of it looks like this:

{
  "status": "ok",
  "data": [
    {
      "id": "world",
      "label": "World",
      "keys": [
        {
          "value": "id",
          "label": "ISO-Codes",
          "description": "The three-letter ISO-code of the country."
        },
        {
          "value": "ADMIN",
          "label": "Names",
          "description": "The written name of the country."
        },
        {
          "value": "WB_NAME",
          "label": "World Bank Names",
          "description": "The written name of the country."
        },
        {
          "value": "ADMIN_GER",
          "label": "Names (German)",
          "description": "The written name of the country in German."
        }
      ]
    },
    {
      "id": "africa",
      "label": "Africa",
      "keys": [
        {
          "value": "ADMIN",
          "label": "Names",
          "description": "The written name of the country."
        },
        {
          "value": "ADM0_A3",
          "label": "ISO ",
          "description": "iso  code of the country"
        }
      ]
    },
    {
      "id": "europe",
      "label": "Europe",
      ...
    },
    ...
    }
  ]
}

Custom basemap

You can also upload your own custom base map as a TopoJSON file. When uploading via API, a GeoJSON file will not work. You can use tools like mapshaper.org to easily convert GeoJSON files to TopoJSON files. You can also learn to put together a custom basemap in our Academy here.

You can then upload the map by making a PUT request to the API endpoint below. Your custom map JSON goes in the body of the request like so:

curl --request PUT \
  --url https://api.datawrapper.de/v3/charts/<ID>/assets/<ID>.map.json
	--header 'content-type: application/json' \
	--data \
	'{"type":"Topology","arcs":[[[9266,20023],[7,-35],[-63,-16],[3,-36],[-76,-36],[65,-22],[-27,-73],[-12,-119],[25,-18],[8,-53],[-14,-56],[33,-12],[-57,-88],[9,-75],[-73,-54],[-42,-15],[-17,-55],[-39,-3],[-32,-35],[-2,-44],[26,-91],[33,-45],[18,-59],[80,-46],[60,-63],[9,-90],[196,-116],[108,-425],[22,-88]],[[9514,18155],[-44,-22],[8,-35],[32,-38],[67,-133],[25,-112],[8,-74],[-18,-133],[34,-113],[-6,-40],[-43,-129],[26,-102],[14,-13],[-3,-60],[-15,-35],[-93,-38],[-34,-51],[171,-242],[8,-139],[45,-24],[9,-40],[46,-36],[80,25],[114,-49],[81,-54],[49,17],[106,-208]],[[10181,16277],[-280,-164],[-209,-123],[-405,-245],[-344,-214],[-163,-140],[-286,-250],[-428,-85]],[[8066,15056],[-241,-49],[-65,47],[38,86],[-17,112],[-61,31],[-112,24],[-63,40],[-33,37],[-21,-22],[-57,-5],[-70,51],[-17,53],[-120,41],[8,66],[-11,42],[-179,122],[-204,138],[-205,137],[-181,121],[-341,224],[-250,162],[-273,177]],[[5591,16691],[-231,146],[-292,181],[-250,153],[-272,166]],[[4546,17337],[0,97]],[[4546,17434],[0,294],[55,22],[66,55],[61,32],[105,73],[73,7],[53,36],[102,-17],[86,29],[109,-1],[74,15],[61,-36],[67,82],[12,34],[93,67],[92,41],[75,67],[48,16],[84,12],[55,19],[-3,41],[32,47],[-62,47],[1,45],[24,9],[0,72],[230,47],[-28,67],[7,22],[84,-3],[16,11],[141,7],[119,-23],[93,-5],[9,89],[56,36],[-104,61],[-44,61],[19,33],[-53,57],[22,69],[-38,57],[22,103],[-16,58],[-20,24],[24,28],[-43,36],[23,38],[-54,31],[-67,59]],[[6307,19505],[65,-4],[54,14],[59,42],[73,24],[28,61],[99,53],[44,-14],[83,53],[66,-33],[39,21],[29,50],[56,40],[229,91],[228,16],[79,19],[35,-12],[54,5],[73,49],[35,7],[41,-19],[23,17],[53,-11],[119,44],[87,-9],[149,1],[90,-33],[54,-39],[60,12],[24,27],[110,18],[72,29],[0,22],[61,17],[28,-31],[69,-5],[24,-21],[64,11],[33,42],[62,-8],[67,-24],[17,-30],[36,0],[75,29],[54,-16],[59,13]],[[16967,15856],[9,-114],[51,-109],[36,-178],[-13,-65],[22,-140],[-7,-73],[14,-26],[33,-168],[26,-40],[63,-7],[101,-81],[14,-50],[49,-19],[62,-46]],[[17427,14740],[-32,-30],[-30,-69],[-25,-26],[-67,0],[-65,-48],[-69,-13],[1,-22],[-33,-59],[-23,13],[-50,-10],[-29,11],[-6,-75],[-31,-79],[21,-31],[-40,-133],[-32,-68],[-43,-136],[-28,-20],[24,-230],[9,-20]],[[16879,13695],[-29,-77],[13,-42],[-22,-29],[-13,-55],[-33,-69],[-28,-96],[2,-72],[-24,12],[-78,-17],[-38,-17],[-59,-99],[-45,-90],[-57,-54],[11,-30],[-9,-52],[-29,-54],[14,-24],[-9,-70],[-53,-54],[-48,53],[-35,-24],[-47,-64],[-1,-54],[14,-52],[-27,-41],[-7,-47],[-32,-89],[2,-21]],[[16212,12367],[-59,0],[-3,35],[29,80],[1,42],[-55,77],[-85,89],[-72,22],[13,26],[-36,223],[11,32],[22,132],[-142,6],[2,-81],[-174,0],[78,-78],[0,-117],[14,-62],[-80,-80],[-48,-31],[-51,-91],[-128,-148],[-116,-6],[-18,-8],[-79,66],[-147,92],[-16,0],[-109,-57],[0,-93],[-125,0],[-28,-30]],[[14811,12407],[-47,-43],[-10,-39],[-199,-1],[-36,74]],[[14519,12398],[-210,4],[-118,-38],[-84,22],[-22,20],[-28,76],[-44,58],[-33,18],[1,54],[-33,18],[-75,-22],[-112,-10],[-18,-57],[-31,-53],[-25,-16],[-31,-45],[-1,-65],[-30,-45],[-23,-71],[10,-39],[-97,-79]],[[13515,12128],[-76,21],[-45,-3],[-77,29],[-13,47],[9,54],[30,10],[12,32],[-2,66],[19,33],[-8,62],[-96,158],[-86,69],[-35,61]],[[13147,12767],[31,81],[-13,56],[-42,-5],[-61,63],[19,118],[-42,-6],[4,33],[-20,68],[-13,10],[24,57],[-73,34],[-11,-23],[-56,-14],[-29,58],[45,86],[35,9],[43,51],[-57,121],[40,46],[83,44],[-19,36],[-16,96],[83,30],[-13,43],[27,17],[14,36],[34,19],[18,59],[-21,66],[54,47],[62,-8],[65,20],[112,-15],[0,219],[0,838]],[[13454,15157],[0,139],[273,0],[0,559]],[[13727,15855],[1442,0],[280,0],[299,0],[210,0],[246,0],[763,1]],[[13454,6680],[9,-106],[14,-39],[-29,-67],[2,-147],[25,-52],[-35,-49],[-15,-85],[41,-44],[-259,0],[-298,0],[0,-273],[0,-613],[30,-45],[14,-50],[46,-37],[163,-174],[82,-72],[54,-29]],[[13298,4798],[-254,-51],[-292,-58],[-56,25],[-66,-7],[-48,-22],[-72,16],[-58,33],[-58,-13],[-120,17],[-66,-6],[-44,14],[-102,1],[-89,65],[-41,54],[-312,0],[-263,0],[-255,0],[-316,0],[-31,-14],[-51,17],[-102,65],[-22,38],[-80,13],[-50,-5],[-100,-63],[-105,-8],[-42,26],[-78,-36],[-11,5]],[[10114,4904],[6,133],[12,7],[2,83],[-9,91],[4,31],[-20,32],[32,28],[46,65],[10,93],[42,108],[21,26],[22,131],[-10,26],[26,69],[26,23],[2,122],[34,44],[35,20],[54,60],[-11,40],[70,67],[40,-4],[35,27],[12,39],[38,39],[29,77],[10,52],[-8,53],[26,159],[-39,72],[13,27],[-65,75],[1,26],[-52,97],[-32,80],[-13,69],[-51,92],[65,76],[37,10],[13,27],[-18,58],[13,20],[-81,156],[-50,141],[-16,18],[-10,83],[-70,87],[-45,94],[-32,46],[60,8],[94,27],[38,36],[31,5]],[[10481,8075],[34,7],[38,-13],[19,16],[89,-3],[59,7],[73,-14],[97,-6],[130,13],[167,1],[34,-3],[183,6],[27,-8],[4,-40],[36,-42],[-14,-60],[34,-112],[30,-35],[15,-42],[-7,-46],[35,-32],[40,-65],[21,-14],[13,-44],[63,-96],[80,14],[64,-5],[26,27],[92,0],[-1,23],[67,0],[6,-23],[159,0],[-8,31],[17,54],[36,66],[-16,39],[17,88],[206,0],[5,24],[83,0],[-18,-61],[-1,-41],[336,0],[19,-78],[-22,-59],[-7,-47],[19,-36],[34,-103],[-3,-45],[-28,-128],[7,-47],[-19,-53],[23,-65],[53,-63],[32,-12],[15,-85],[24,-46],[-12,-31],[14,-66],[-45,-32],[11,-63],[16,-32],[43,4],[23,38],[58,-19],[37,13],[58,-17],[36,6],[58,44],[69,-18],[55,-2],[35,36]],[[10482,8410],[-75,-27],[-28,-45],[-71,-44],[20,-23],[0,-154],[-93,-8]],[[10235,8109],[-14,35],[24,34],[-25,84],[-41,60]],[[10179,8322],[104,75],[6,34],[34,1],[42,22],[24,39],[49,-32],[44,-51]],[[7892,12980],[-36,-69],[60,-89],[22,-55],[-6,-26],[25,-37],[2,-33],[-17,-51],[-39,8],[-16,-43],[24,-38],[-39,-79],[-55,-17],[-53,-104],[6,-38],[-20,-54],[-83,-9],[-14,-81],[9,-70],[-18,-56],[16,-31],[-21,-89],[15,-34],[0,-53],[17,-150],[-17,-74],[-6,-112]],[[7648,11496],[-45,14],[-30,24],[-21,-46],[-139,-18],[-60,-14]],[[7353,11456],[47,13],[-7,39],[-50,82],[14,78],[-2,226],[-1,334],[-20,47],[-42,52],[-10,72],[-3,108],[-98,62],[-61,45],[9,95],[18,22],[11,54]],[[7158,12785],[47,26],[20,48],[32,-1],[46,60],[42,-22],[75,14],[40,-5],[79,71],[26,61]],[[7565,13037],[16,22],[-20,37],[3,41],[72,13],[48,27],[103,-95],[28,-50],[45,-7],[32,-45]],[[13800,4752],[-9,-33],[23,-45],[27,-23],[28,-63],[72,-71],[9,-57],[33,-18],[5,-51],[23,-36],[32,-88],[40,-13],[30,-43],[43,-20],[39,-38],[136,-43],[39,-104],[88,-5],[14,-75],[-13,-86],[59,-66],[35,-78],[67,-4],[58,-19],[22,10],[82,-36],[52,-12],[-7,-55],[59,-17],[30,-38]],[[14916,3525],[-90,-6],[-30,-66],[-112,-37],[-45,3],[-51,-39],[-31,-38],[-30,-58],[-59,-50],[-30,5],[-12,-37],[-67,-18],[-47,-44],[-39,-20],[-41,-173],[-39,-14],[-52,-47],[-28,-42],[-151,-35],[8,-26],[-66,-181],[-18,-36],[-65,-37],[-81,12],[-39,-25],[-59,-3],[-112,29],[-25,28],[-37,-9],[-47,20],[-119,85],[-67,1],[-78,-41],[-45,-107],[-7,-62],[-47,-57],[-34,0],[-19,-28],[-43,-19],[-38,-64],[-69,-12],[-26,-52],[-77,8],[-77,-13],[-66,22],[-51,-22],[-23,23],[-5,89],[54,66],[13,32],[-18,86],[-32,38],[5,26],[-66,108],[-20,47],[-31,29],[-45,17],[-27,31]],[[12363,2812],[0,248],[0,241],[0,279],[273,0],[0,281],[0,183],[0,322],[0,241],[126,4],[218,42],[228,43],[56,-1],[6,-22],[61,-66],[6,-42],[48,14],[50,60],[70,48],[28,-3],[37,25],[42,-33],[39,46],[51,26],[42,-8],[54,14]],[[13798,4754],[2,-2]],[[7158,12785],[-112,3],[-176,37]],[[6870,12825],[-38,7],[-78,-47],[-277,1],[-341,0],[5,-18],[-34,-84],[48,-103],[-7,-52],[17,-67],[-16,-39],[27,-58]],[[6176,12365],[-20,-25],[-38,36],[-32,59],[-28,27],[-75,22],[-85,7],[-52,-12],[-39,-27],[-22,8],[-74,-66],[-35,31],[-51,-5],[-21,40],[-42,13],[-9,46],[-28,18],[-12,48],[-67,2],[-42,41]],[[5404,12628],[12,91],[15,26],[-19,61],[41,18],[18,27],[19,83],[-26,27],[-3,44],[42,45],[82,19],[33,-5],[60,72],[33,77],[-24,52],[65,4],[4,57],[-34,50],[60,55],[11,23],[81,-10],[72,-52],[29,26],[46,5],[-7,70],[7,38],[41,7],[40,-18],[24,7],[-7,47],[16,66],[48,23],[51,43],[50,-13],[51,-28],[30,12],[5,80],[82,7],[99,63],[61,16],[73,62],[33,20],[65,0],[23,-20],[34,18],[67,-25],[65,1]],[[6972,13899],[2,-67],[-20,-60],[65,-80],[-12,-28],[11,-33],[64,-94],[101,-37],[-2,-156],[33,0],[125,-102],[79,-8],[30,37],[50,-14],[31,-62],[-56,-32],[92,-126]],[[15238,9044],[-33,-70],[-4,-54],[22,-26],[24,16],[65,-42],[1,-62],[-41,-15],[-8,-37],[-49,-43],[-55,-79],[-28,-64],[-41,-45],[-67,-52],[-91,5]],[[14933,8476],[-10,78],[-41,69],[3,91],[-10,81],[12,70],[-69,75],[10,12]],[[14828,8952],[4,34],[26,8],[48,-17],[8,-43],[45,-6],[101,22],[8,54],[34,55],[38,-20],[62,34],[36,-29]],[[11138,11817],[-21,-30],[-58,-54],[-40,-122],[-27,-11],[-60,-136],[-52,-20],[-39,-42],[20,-35],[35,-5],[3,-109],[-26,-61],[32,-21],[19,-159],[45,-48],[34,-14],[22,-35],[-4,-77],[46,-85],[71,-76],[81,-97],[23,1],[50,-54],[1,-122],[32,-68]],[[11325,10337],[-29,-8],[-9,-54],[27,-82],[-73,21],[-33,36],[-74,18],[-40,-18],[-26,32],[-54,-12],[-125,61],[-46,-12],[-46,4],[-261,0]],[[10536,10323],[-13,28],[-137,-14],[-115,15],[-24,-7],[-71,11],[-63,-2],[-13,11],[-62,-5],[-38,-36]],[[10000,10324],[-310,-1],[-43,-3],[-52,24],[-8,28]],[[9587,10372],[0,43],[26,132],[16,31],[-27,67],[-67,66],[-13,123],[-22,5],[-25,-38],[-80,35],[-38,25],[2,33],[-27,47],[0,54],[-52,-27],[-51,7],[2,43],[28,43]],[[9259,11061],[0,24],[56,79],[3,68],[20,31],[-18,39],[5,46],[111,95],[22,47],[33,28],[65,16],[18,75],[26,-3],[78,75],[17,-43],[76,-4],[27,58],[47,-34],[13,-28],[49,-47],[29,-47],[63,-5],[60,45],[22,91],[68,34],[-9,40],[18,59],[30,18],[-7,38],[58,88],[15,130],[27,-8],[22,55],[40,-5],[62,65],[27,117],[-3,29],[35,42],[47,14],[15,63],[-7,36],[21,55],[50,27],[6,64],[17,69],[116,174],[47,-18],[106,67],[21,27],[-13,35],[7,91],[14,36],[-67,59],[-54,-2],[-40,200]],[[10750,13366],[102,-1],[30,-51],[-5,-30],[77,-44],[4,-48],[17,-21],[-5,-59],[46,-36],[-5,-39],[20,-28],[-14,-25],[21,-42],[-31,-78],[2,-52],[33,-125],[-3,-30],[93,-117],[47,-40],[-61,-12],[-54,18],[-64,1],[-45,-21],[-96,24],[-68,-4],[-57,-81],[22,-47],[76,-70],[-2,-22],[102,-108],[40,-4],[37,-38],[47,-17],[22,-84],[45,-115],[38,-33],[-6,-53],[-17,-17]],[[274,13853],[-49,15],[3,27],[50,11],[-4,-53]],[[504,13879],[-54,5],[-28,43],[31,43],[44,-34],[18,-32],[-11,-25]],[[672,14236],[40,2],[10,-45],[-34,-20],[-40,32],[24,31]],[[276,14366],[22,-20],[-22,-31],[-29,45],[29,6]],[[43,14438],[-31,-4],[-12,52],[69,28],[31,-24],[-57,-52]],[[13515,12128],[-17,-45],[11,-49],[43,-15],[33,9],[103,-30],[12,-35],[50,-43],[22,5],[32,-33],[1,-39],[-33,-22],[52,-64],[83,-41],[43,-13],[59,-50],[9,-40],[93,-49],[-30,-47],[26,-51],[38,-30],[7,-45],[68,-9],[18,-30],[39,-13],[55,-46],[16,-41],[-13,-32],[26,-62],[35,-36],[-3,-15]],[[14393,11117],[-5,18],[-90,35],[-46,-18],[-110,-26],[-86,52],[-108,-6],[-64,41],[-66,-28],[-6,-64],[-41,-3],[-27,-27],[-27,17],[-50,-24],[-28,2],[-15,31],[-38,23],[-94,-57],[-49,-6],[-49,-25],[-51,-6],[-45,-45],[-42,9],[-100,52],[-32,-26],[-30,-70],[-18,4],[-22,-80],[-21,-19],[-51,-4],[-75,35],[-38,0],[-34,18],[-45,-16],[-96,11],[-36,29],[-67,13],[-68,-8],[-35,29],[-2,32],[-30,36],[-32,14],[-107,78],[-76,17],[-42,-10],[-58,-49],[-25,-5],[-24,-47],[-49,-52],[-12,-40],[-65,-31],[27,-58],[3,-32],[-17,-63],[9,-82]],[[11988,10686],[-36,50],[-26,-19],[-130,-3],[-51,22],[-35,-3],[-36,17],[-29,-26],[-84,-17],[-83,3],[-41,-19],[-27,-92],[4,-89],[-89,-173]],[[11138,11817],[60,-2],[22,-22],[45,12],[23,26],[87,25],[38,49],[41,-29],[43,-57],[36,28],[56,9],[42,45],[72,24],[25,19],[68,-7],[30,15],[156,10],[19,46],[49,26],[62,94],[-16,33],[-42,32],[34,29],[62,15],[124,-3],[69,11],[36,22],[80,-3],[28,12],[20,46],[80,26],[57,83],[63,74],[36,2],[39,63],[47,15],[16,35],[-14,29],[21,81],[23,19],[76,3],[99,36],[97,-21]],[[10750,13366],[-123,176]],[[10627,13542],[-40,181],[2,32],[55,22],[-5,23],[36,24],[-5,40],[21,50],[28,31],[113,161],[61,63],[244,262],[15,309],[10,203],[43,339],[66,112],[-110,119],[-12,29],[21,23],[-92,131],[-24,17],[-2,139],[-53,281]],[[10999,16133],[273,123],[811,-408],[58,-30],[489,-246],[824,-415]],[[18774,6404],[-20,-13],[-54,40],[11,107],[37,-12],[-6,-48],[32,-74]],[[10179,8322],[-46,59],[0,53],[-25,29],[-91,79],[-53,62]],[[9964,8604],[12,71],[24,34],[53,28],[46,-44],[44,-21],[5,47],[46,63],[-12,31],[18,74],[-121,49],[21,38],[-18,40],[17,41],[34,-4],[48,13],[26,-27],[102,5],[16,28],[-1,61],[-21,63],[75,3],[33,-21],[12,-45],[33,-29],[9,-36],[46,-1],[45,-23],[36,-3],[69,89],[43,-69],[2,-29],[49,-3],[31,53],[-16,25],[26,25],[1,34],[35,27],[24,93],[-6,52],[9,30],[-20,98],[24,70],[-31,52],[-58,13],[-3,26],[-73,33],[9,93],[-10,23],[16,34],[34,29],[13,36],[28,-6],[44,28],[31,81],[-85,131],[-102,9],[-70,-42],[-82,10],[-1,25],[-31,49],[6,82],[36,52],[2,31]],[[11988,10686],[6,-64],[-35,-58],[-25,-75],[-42,-64],[-23,-54],[-26,-20],[0,-95],[-10,-25],[4,-89],[-32,-57],[-28,-83],[6,-123],[25,-53],[-51,-67],[-7,-61],[-21,-30],[12,-53],[-4,-60],[-73,-68],[-22,-44],[-67,-23],[-73,-54],[-74,-132],[-3,-29],[-39,-30],[-62,-68],[-2,-61],[13,-70],[-15,-59],[-1,-59],[11,-56],[-87,-186],[-93,-26],[-20,-52],[-80,-32],[-22,-40],[-55,-55],[-19,-40],[-51,-27],[-68,20],[6,56],[-18,27],[33,30],[-22,25],[-93,-15],[-27,-29],[-35,25],[-28,-9],[1,-70],[-87,-46],[-72,77],[-11,-25]],[[6176,12365],[8,-65],[-31,-34],[30,-33],[18,-52],[28,-175],[-33,-19],[-58,-87],[-25,-59],[-16,-96],[-13,-35],[-55,-90],[-7,-51],[21,-91],[20,-45],[23,-83],[18,-38],[52,-32],[10,-72],[-16,-16],[3,-49],[-91,-6]],[[6062,11137],[-188,32],[-55,14],[-209,-28],[-197,-17],[-105,-18],[-89,-40],[-106,-34],[-33,-19],[-52,-7],[-43,-37],[-35,-5],[-60,-38],[-32,-6]],[[4858,10934],[-10,9],[-6,144],[7,46],[52,70],[-22,26],[18,56],[-17,37],[-37,40],[-32,3],[-40,50],[6,30],[-51,34],[-45,-11],[-87,44],[-19,36],[60,55],[13,118],[-19,17],[-14,70],[-16,17]],[[4599,11825],[46,13],[24,-19],[39,77],[-12,10],[29,89],[-57,19],[-7,58],[49,18],[85,-35],[30,-1],[-35,109],[-48,5],[8,61],[35,29],[-37,31],[16,44],[-53,7],[-24,36],[13,84],[-10,47],[43,49]],[[4733,12556],[34,8],[58,79],[53,-7],[17,-50],[112,-25],[9,49],[73,-2],[2,75],[56,-19],[12,38],[46,10],[23,-103],[-20,-19],[59,-28],[38,49],[30,19],[69,-2]],[[10481,8075],[-48,13],[-42,-15],[-16,-28],[-36,21],[-53,-19],[-51,62]],[[14393,11117],[38,-37],[50,-28],[4,-51],[24,-15],[47,-1],[8,-36],[36,-19],[32,2],[26,-23],[26,27],[42,14],[16,33],[27,-16],[59,0],[45,-39],[28,11],[45,59],[38,20],[58,-30],[-7,-53],[40,-14],[37,-56],[21,-6],[18,-43],[85,-19],[16,-77],[52,18],[19,-48]],[[15323,10690],[22,-17],[-47,-100],[31,-63],[-33,-68],[-7,-42],[38,-28],[32,17],[89,-81],[-77,-102],[-87,-70],[-73,-73],[-43,-20],[-36,-77],[-46,-15],[-10,-109],[-21,-19],[-14,-60],[-22,-11],[-27,-264],[-18,-102],[19,-20],[-15,-36]],[[14978,9330],[-38,-33],[-24,0],[-60,-87],[7,-83],[-14,-37],[-33,-10],[-35,-34],[14,-77],[33,-17]],[[14933,8476],[-18,-78],[1,-74],[25,-51],[39,-112],[9,-49],[-34,-54],[10,-88],[44,-90],[50,-46],[33,-15],[49,-44],[35,-51],[26,-61],[8,-47],[57,-97],[33,-87]],[[15300,7432],[-65,-19],[-216,-27],[-201,-29],[-17,-71],[-67,-89],[-85,-63],[32,-19],[4,-32],[27,-45],[17,-59],[-14,-40],[3,-159],[17,-37],[-39,-48],[-22,-76],[3,-39],[-25,-64],[13,-100],[84,-42],[51,-60],[33,-53],[57,7],[57,-30],[8,67],[83,19],[0,-360],[-54,12],[9,48],[-32,3],[-23,-24],[-72,-36],[-57,21],[-18,57],[-46,77],[-52,9],[-24,41],[16,25],[-51,54],[-100,20],[-12,31],[-71,-13],[-40,42],[-16,62],[-61,38],[-5,58],[-45,-9],[-10,-68],[-34,-38],[-45,-7],[-68,25],[-38,-13],[-93,19],[-73,23],[-18,23],[-41,-15],[-7,28],[-37,15],[-13,34],[2,89],[-53,-16],[-64,-4],[-38,-14],[-39,-38],[-33,-3],[-33,26],[13,28],[-5,50],[-67,18],[-4,33],[-32,5]],[[18706,12914],[-80,-129]],[[18626,12785],[-48,-2],[-8,24],[-37,5],[-55,-31],[-86,-3],[-31,-13],[-52,22],[0,100],[-9,37],[17,66],[33,23],[99,138],[24,45]],[[18473,13196],[37,6],[37,-33],[20,3],[37,66],[65,25]],[[18669,13263],[63,-90],[17,-74],[-13,-39],[-51,-9],[-34,-39],[-77,-19],[8,-43],[94,2],[30,-38]],[[16212,12367],[8,-127],[-1,-125],[-32,-29],[-36,-5],[-33,-31],[-25,21],[-41,8],[-92,-17],[-7,-59],[-44,-69],[17,-45],[27,3],[47,-25],[28,12],[63,-16],[34,-25],[64,-67],[3,-39],[41,-29],[12,-32],[66,-26],[14,-44],[90,-41],[44,-44],[-14,-100],[9,-54],[37,-79],[46,-31],[8,-48],[50,24],[55,-7],[38,-21],[-12,-59],[0,-91],[36,-44]],[[16712,11006],[-428,0],[-105,-113]],[[16179,10893],[-132,-130],[-91,7],[-41,28],[-83,-30],[-86,-5],[-63,-39],[7,-29],[-68,23],[-9,34],[-31,25],[-72,-40],[-70,38],[-30,0],[-55,-28],[-32,-57]],[[10000,10324],[0,-328],[-362,0],[-18,-21],[-56,40],[-20,-2]],[[9544,10013],[-35,19],[-47,7],[27,67],[45,57],[-5,19],[55,69],[-12,50],[15,71]],[[9291,10765],[45,2],[11,-27],[-72,-128],[-64,20],[-6,30],[42,23],[10,55],[34,25]],[[17427,14740],[69,-109],[31,-68],[35,-133],[23,-60],[25,-169],[18,-49],[34,-25],[10,-79],[36,-1],[32,-77],[16,43],[33,20],[52,-38],[-18,-26],[36,-69],[36,-24],[49,25],[46,-13],[27,-55],[46,-8],[78,-28],[41,-59],[77,-96],[18,-37],[77,-23],[40,-61],[48,-20],[29,-101],[45,-4],[48,-59],[12,-37],[81,-6],[12,-31]],[[18473,13196],[-51,82],[-44,10],[-47,79],[-66,84],[-66,33],[-63,63],[-62,99],[-36,25],[-92,36],[-58,31],[-31,35],[-52,-34],[-74,49],[-49,-19],[-66,-12],[-30,48],[-97,-52],[-94,-15],[-51,72],[-68,20],[-28,42],[-105,-198],[-37,33],[-22,41],[-48,-11],[-13,-39],[-65,15],[-61,-3],[-18,-15]],[[18626,12785],[-77,-113],[40,-88],[51,-55],[19,-48],[46,-18],[12,-65],[27,-16],[25,-42],[42,-12],[98,-101],[235,-80],[207,-69],[378,-129],[266,0],[-170,-179],[-229,-239],[-162,-171],[-259,-271],[-263,12],[-158,-46],[-107,-62],[-20,-47],[-42,-39],[-79,-17],[-120,-7],[-48,-55]],[[18338,10828],[-23,-8],[-189,4],[-67,68],[-52,9],[-134,-56],[-92,-49],[-26,-55],[-59,-75],[-31,15],[-68,7],[-27,15],[-52,-6],[-104,33],[-21,-7],[-85,2],[-38,33],[-234,157],[-29,25],[-50,18],[-217,2],[-28,46]],[[9964,8604],[-48,35],[-3,24],[-36,42],[-66,53],[5,27],[-82,82],[-125,95],[-74,83],[-12,45],[-50,56],[-3,54],[-33,20],[-20,59],[-48,61],[-7,36],[-56,103],[59,58],[17,-20],[59,85],[16,129],[12,48],[57,-26],[23,23],[-50,22],[-46,92],[30,6],[35,-61],[29,-3],[-15,67],[3,35],[-21,45],[30,34]],[[2342,13362],[-14,83],[29,32],[33,-6],[7,40]],[[2397,13511],[295,0],[33,51],[32,-10],[32,16],[60,-2],[24,-39],[77,-7],[51,-52],[62,27],[54,4],[25,-29],[-12,-36],[-72,-11],[-23,-16],[-39,2],[-96,35],[-15,21],[-74,22],[-12,24],[-40,-17],[1,-26],[-35,-28],[-48,16],[-77,-17],[0,-49],[-239,0],[-19,-28]],[[6870,12825],[39,-10],[-16,-132],[55,-30],[44,-37],[16,-37],[7,-90],[-18,-59],[17,-39],[48,-50],[-29,-103],[19,-43],[-39,-40],[24,-39],[48,-30],[24,-56],[-26,-9],[-15,-47],[11,-63],[-23,-123],[33,-29],[-33,-137],[28,-23],[0,-31],[29,-53],[40,-31],[30,0],[22,-46],[31,-16]],[[7236,11422],[-33,-19],[-42,-72],[-176,-3],[-58,-23],[-17,-19],[-101,-36],[-37,-33],[-61,-22],[-30,-24],[-69,-5],[-42,-25],[-105,-24],[-79,-57],[-47,-19],[-49,43],[-48,16],[-180,37]],[[2353,13159],[87,6],[47,27],[42,4],[98,-13],[75,31],[68,41],[401,-1]],[[3171,13254],[21,-61],[-22,-57],[-56,-6],[-9,-21],[66,-41],[-2,-85],[-38,4],[-39,-22],[-73,7],[-69,-49],[-42,0],[-29,-39],[-34,-72]],[[2845,12812],[-76,39],[-40,49],[-14,18],[36,44],[-53,7],[-27,18],[24,33],[-11,25],[-46,-37],[-38,-14],[-45,7],[2,42],[-67,0],[-32,25],[40,42],[30,64],[-98,-20],[-19,-17],[-58,22]],[[4599,11825],[-51,39],[-14,-52],[-37,-45],[-5,-25],[-42,-4],[-47,17],[-10,24],[-49,8],[16,96],[-21,28],[4,30],[-29,57],[2,39],[-18,32],[-54,34],[-61,-31],[-35,24],[-43,-11]],[[4105,12085],[-28,1],[-46,-51],[-33,9],[14,56],[42,37],[-32,36],[0,67],[-39,10],[17,64],[-40,23],[-4,36],[-57,77],[-33,26],[-13,31],[-185,-1],[-5,-16],[-59,-19],[-29,15],[-56,-12],[-99,-163],[-38,-3],[-18,-53],[-82,-16]],[[3282,12239],[21,65],[-51,1],[6,80],[-50,7],[-22,68],[-24,-3],[-62,43],[-1,25],[-32,39],[-62,-2],[-41,16],[3,29],[-58,43],[34,84],[-46,18],[5,31],[-57,29]],[[3171,13254],[173,-11],[6,-46],[35,18],[99,-47],[30,6],[29,-23],[67,31],[105,-7],[69,13],[22,-8]],[[3806,13180],[-31,-55],[8,-23],[56,-39],[25,11],[41,48],[23,5],[39,-33],[15,-52],[17,-7],[46,64],[68,26],[151,-53],[19,41],[85,29],[-12,61],[55,-2],[53,-39],[-7,-35],[26,-21],[-4,-30],[32,-32],[-16,-83],[44,-11],[10,-25],[70,-32],[-24,-45],[-53,-59],[25,-17],[29,32],[53,-19],[-4,-101],[19,-61],[62,-20],[7,-47]],[[18338,10828],[-157,-230],[-92,-94],[-1,-180],[1,-263],[0,-214],[0,-362],[155,-215],[0,-15]],[[18244,9255],[-79,-90],[-34,6],[-44,-23],[-19,-44],[-21,-15],[-20,-56],[-44,-30],[-21,8],[-52,-15],[-49,-51],[-11,-146],[-35,-17],[-34,-79],[-11,-53],[-58,-104],[-18,-55],[-43,-57],[-51,-20]],[[17600,8414],[-218,156],[-169,121],[-11,38],[-42,30],[33,34],[-11,70],[-43,29],[-167,96],[-244,141],[-234,134],[-289,167],[-42,8]],[[16163,9438],[-1,151],[15,90],[-20,68],[51,68],[25,75],[79,88],[14,47],[46,31],[26,1],[9,63],[46,67],[10,66],[-13,19],[-20,115],[11,16],[-48,65],[-2,34],[-47,29],[-9,48],[-31,29],[-14,53],[15,81],[-43,12],[-49,51],[-16,30],[1,40],[-19,18]],[[14741,1717],[53,-33],[23,-33],[92,-49],[35,-73],[-43,-41],[-3,-37],[-31,-10],[-13,-52],[11,-17],[-84,-48],[-47,-13],[-80,-4],[-33,-61],[-33,-25],[-21,-54],[-86,14],[-57,60],[-50,32],[6,35],[-43,38],[-33,72],[-24,29],[74,33],[46,67],[41,36],[42,66],[46,19],[26,-7],[43,52],[27,-5],[47,30],[58,6],[11,-27]],[[4858,10934],[-54,3],[-62,38],[-84,18],[-162,95],[-49,18],[-73,48],[-76,85],[-55,41],[-73,70],[-9,21],[-82,58],[-86,27],[-33,22],[-13,41],[-55,33],[-79,35],[-12,41],[-27,21]],[[3774,11649],[45,43],[6,34],[36,19],[21,34],[75,48],[37,50],[23,9],[0,74],[23,25],[46,6],[19,94]],[[9514,18155],[92,29],[88,101],[26,55],[-5,48],[-39,91],[-2,24],[42,55],[65,16],[28,33],[1,28],[43,9],[51,52],[127,48],[41,46],[-30,41],[0,62],[21,76]],[[10063,18969],[23,-19],[55,-7],[98,-56],[43,-14],[101,-7],[136,33],[41,-5],[53,-27],[59,1],[103,-25],[82,-56],[76,-20],[124,-18],[39,-57],[11,-87],[37,-72],[34,-41],[91,-46],[103,-19],[91,-1],[164,-37],[170,-65],[69,-18],[139,-107],[69,-32],[68,-6],[111,40],[48,32],[77,89],[29,58],[-3,52],[-43,66],[-19,80],[11,65],[38,51],[83,73],[47,30],[137,61],[83,4],[63,39],[75,-6],[78,7],[85,-31],[168,-50],[14,-49],[-19,-36],[44,-33],[47,-10],[96,-2],[57,-18],[41,-27],[113,-7],[32,11],[90,-16],[40,-86]],[[13765,18548],[-21,-31],[-55,-38],[4,-67],[39,-109],[-25,-82],[-40,-42],[-23,-51],[32,-64],[22,-80],[-10,-24],[38,-83],[1,-323],[0,-399],[0,-1300]],[[10999,16133],[-220,-99],[-139,120],[-77,40],[-382,83]],[[20330,6300],[84,-34],[5,-78],[66,-60],[40,-50],[-3,-39],[45,-124],[22,-118],[-5,-54],[15,-15],[-2,-89],[38,-114],[38,-52],[2,-33],[-16,-66],[-55,-117],[-53,29],[-37,90],[4,32],[-47,0],[-32,-30],[27,-95],[-11,-42],[14,-28],[36,-21],[-12,-36],[7,-59],[-73,-116],[-44,-107],[18,-34],[12,-61],[-24,-74],[-26,-123],[-30,-67],[-58,-151],[-35,-102],[-20,-105],[-58,-135],[-27,-84],[-16,-77],[-41,-131],[-109,-288],[-10,-72],[-39,-160],[-18,-43],[-15,-86],[-48,-98],[-75,-218],[-52,-41],[-87,-37],[-77,5],[-96,-34],[-104,-65],[-37,-12],[-85,-7],[-62,52],[-63,30],[-98,13],[-10,27],[-54,24],[-25,27],[-2,33],[-26,37],[-1,37],[-67,75],[-4,200],[30,43],[-34,28],[-13,82],[-61,62],[-39,145],[10,93],[19,9],[4,58],[36,36],[1,42],[23,41],[31,1],[33,28],[27,100],[38,42],[13,41],[43,67],[70,84],[-31,64],[27,61],[-9,70],[-27,9],[-32,117],[3,20],[-56,127],[13,46],[-21,32],[5,74],[-20,18],[-7,77],[105,175],[28,32],[13,61],[-3,84],[63,-5],[29,-13],[47,21],[47,53],[34,17],[2,-60],[52,50],[47,1],[31,32],[38,-3],[55,40],[58,-2],[21,37],[134,102],[47,0],[110,154],[19,-39],[-32,-45],[43,-11],[20,62],[28,52],[-10,59],[18,41],[77,-2],[1,40],[-21,19],[13,32],[-35,9],[-9,35],[10,51],[46,16],[22,-18],[5,-45],[46,-8],[0,37],[57,28],[-17,34],[68,-9],[29,25],[1,69],[34,40],[-1,47],[-37,80],[32,12],[20,47],[33,9],[0,51],[44,38],[15,-52],[-37,-26]],[[16442,6489],[-94,0],[6,-45],[-24,-53],[-51,-79],[0,-24],[32,-79],[27,-132],[-5,-93],[13,-28],[73,0],[63,-60],[108,-132],[9,-24],[96,-116],[0,-62],[-22,-76],[16,-76],[-14,-166],[-78,-37],[-26,15],[-33,-29],[-13,-72],[-32,-24],[39,-41],[7,-34],[-5,-83],[-54,0],[-9,38],[28,21],[-9,28],[-39,7],[-69,80],[-39,24],[-6,29],[-40,16],[0,61],[-48,55],[50,50],[-2,52],[48,53],[-8,61],[13,19],[-19,99],[-53,72],[-119,-26],[-69,-39],[-17,35],[-36,25],[-42,88],[-21,25]],[[15974,5812],[-47,2],[-34,18],[-43,80],[63,120],[-12,24],[14,59],[-18,44],[26,40],[83,16],[52,55],[-50,2],[-29,64],[20,90],[-6,56],[-23,46],[49,76],[-26,42],[6,50],[54,18],[42,44],[-41,77],[6,30],[-60,38],[12,50],[-42,54],[-9,30],[-52,-7],[6,35],[-20,29]],[[15895,7094],[70,-30],[33,5],[30,-34],[88,9],[48,-36],[7,51],[20,10],[73,-69],[54,-66],[18,-92],[-7,-31],[30,-95],[-7,-96],[48,-61],[33,-26],[9,-44]],[[8066,15056],[-1,-315],[1,-285],[-45,-21],[0,-165],[-56,-175],[-45,-15],[-46,-42],[-3,-41],[-117,0],[-128,7],[-356,-28],[-95,-80],[-70,-6],[-56,12],[-77,-3]],[[3806,13180],[-11,53],[5,62],[14,31],[-46,62],[-1,27],[-28,39],[-66,18],[-47,46],[-6,29],[30,26],[-17,49],[7,48],[-10,32],[-54,58],[21,45],[-25,30]],[[3572,13835],[71,0],[47,39],[-9,76],[34,99],[18,-2],[60,35],[51,-66],[45,-29],[47,-56],[20,46],[45,38],[94,7],[51,-18],[88,0],[31,17],[79,2],[21,17],[266,1],[189,0],[369,-1],[219,4],[48,230],[-75,46],[-38,354],[-46,432],[-25,234],[-38,325],[-34,303],[-18,165],[-33,275],[-30,284],[472,-1]],[[3572,13835],[-58,36],[-3,26],[-106,61],[-30,83],[-79,43],[-17,74],[-18,39],[-40,20],[-87,-6],[-62,83],[-72,66],[-45,-8],[-41,10],[-80,-4],[-75,-22],[-133,-23],[-57,11],[-37,-10],[-18,22],[-40,-9],[-25,-68],[-16,-17]],[[2433,14242],[-26,-15],[-3,28],[23,104],[75,183],[28,90],[10,100],[-10,139],[-21,53],[-13,72],[-19,42],[-60,52],[-10,25],[69,120],[15,118],[-43,62],[-22,58],[-25,-21],[-39,34],[-28,69],[-46,50],[-16,-24],[-13,-69]],[[2259,15512],[-4,42],[35,113],[429,4],[312,0],[333,-3],[-22,334],[-18,60],[9,39],[32,39],[116,75],[56,7],[100,42],[-2,428],[1,278],[317,0],[260,0],[331,0],[2,367]],[[22620,3998],[-54,-3],[-14,64],[35,37],[16,40],[36,-1],[34,-62],[-22,-54],[-31,-21]],[[4546,17434],[-1,0]],[[4545,17434],[-398,2],[-396,-1]],[[3751,17435],[-434,1]],[[3317,17436],[44,38],[28,42],[68,8],[158,29],[168,69],[33,44],[82,75],[146,75],[79,78],[64,102],[53,53],[40,85],[9,69],[-48,53],[-29,6],[23,52],[-9,80],[11,53],[-10,33],[43,59],[1,21],[90,94],[25,51],[-7,92],[135,113],[65,82],[64,32],[210,72],[38,26],[126,64],[39,39],[71,104],[64,115],[101,257],[161,25],[5,-54],[21,-36],[87,-66],[67,-32],[89,-16],[116,32],[22,-18],[38,26],[33,-18],[69,-11],[63,24],[39,3],[17,-39],[91,-17],[38,18],[59,-17]],[[16442,6489],[189,6],[44,36],[38,-5],[68,-40],[24,-39],[51,12],[39,-16],[50,46],[168,-31],[100,48],[13,57],[30,13],[88,-8],[60,-37],[48,41],[59,28],[67,8],[32,-8],[104,64],[103,37],[108,84]],[[17925,6785],[37,5],[21,-99],[-31,-26],[17,-34],[-48,-74],[26,-23],[-13,-66],[20,-90],[-3,-84],[8,-37],[-13,-28],[43,-69],[-58,-46],[36,-51],[9,-73],[-16,-41],[19,-110],[12,-32],[-7,-62],[53,-48],[8,-111],[-40,-26],[15,-23],[-41,-39],[23,-35],[-31,-69],[-103,-112],[-43,-81],[-34,-22],[3,-38],[-200,-124],[-30,-46],[-20,1],[-153,-42],[-78,-39],[-84,-30],[-138,-74],[-58,-46],[-44,-64],[-123,-129],[-64,-99],[-88,-16],[-56,-36],[-93,-107],[-120,-99],[-58,-15],[7,-78],[-33,-73],[24,-39],[69,-47],[30,-68],[-7,-72],[12,-51],[39,-68],[17,-141],[42,12],[15,-62],[-11,-69],[5,-78],[19,-33],[-24,-40],[-4,-60],[-31,-103],[-8,-59],[39,17],[3,-73],[-95,-131],[-90,-46],[-301,-106],[-133,-57],[-109,-72],[-27,-61],[-39,-50],[21,-39],[45,-46],[33,55],[-16,-158],[0,-56]],[[15879,2224],[-147,0],[-60,7]],[[15672,2231],[1,83],[-17,63],[3,84],[-28,16]],[[15631,2477],[-12,34],[20,54],[-8,49],[17,93],[-12,125],[-4,105],[-20,32],[-11,67],[-30,19],[-20,73],[-34,38],[-2,85],[-67,212]],[[15448,3463],[19,13],[277,291],[-9,54],[41,63],[-6,81],[45,16],[56,77],[2,49],[39,27],[11,60],[-45,32],[-12,58],[-19,32],[20,19],[8,54],[-44,23],[-3,45],[68,46],[-19,47],[37,16],[9,30],[-30,107],[27,103],[-22,34],[22,38],[-16,47],[-40,69],[21,12],[17,50],[-75,9],[3,20],[-117,47],[-67,-2],[-95,67],[-71,13],[-33,36],[-46,13],[-43,-22],[-16,17],[-136,0],[-2,106]],[[15204,5360],[-12,77],[-26,25],[-17,71],[40,11],[119,49],[184,46],[57,31],[68,25],[185,57],[172,60]],[[13298,4798],[205,41],[80,0],[24,-15],[39,12],[93,-26],[31,-43],[28,-13]],[[12363,2812],[0,-239],[0,-492],[0,-294],[-124,-33],[-21,-45],[-54,-11],[3,-46],[-48,-16],[-47,31],[-82,4],[-58,-16],[-60,-4],[-75,41],[-83,1],[-51,12],[-1,42],[-26,26],[22,28],[-19,39],[-36,-3],[-4,32],[-32,28],[-50,-12],[-3,-28],[-37,-32],[15,-20],[-86,-57],[-9,-19]],[[11397,1729],[-35,23],[-80,79],[-87,75],[-46,69],[-5,28],[-66,97],[-13,95],[-40,64],[15,23],[-7,59],[-47,36],[8,67],[-41,90],[15,57],[-23,68],[21,58],[-36,102],[-41,48],[4,32],[-28,60],[-15,59],[16,26],[0,82],[-19,52],[16,36],[-26,83],[37,33],[-3,69],[-38,104],[-89,115],[-54,98],[-78,105],[-45,73],[-22,77],[-23,39],[-15,69],[-38,38],[-33,78],[-63,116],[-36,82],[-68,98],[-78,65],[-21,66],[-27,33],[-13,41],[-20,115],[4,93]],[[10627,13542],[-88,-3],[-35,-45],[-33,3],[-56,-21],[-8,-19],[-63,-35],[-38,-57],[-54,12],[-35,-8],[-69,44],[-131,34],[-198,-4],[-56,-20],[-70,-4],[-58,-30],[-94,-100],[-184,9],[-89,29],[-23,28],[-41,4],[-43,43],[-54,27],[-64,10],[-109,-64],[-54,0],[-21,-22],[-61,-12],[-68,102],[-72,79],[-35,19],[-39,-6],[-164,59],[-51,-16],[-20,-28],[-101,3],[-13,9],[-109,-29],[-63,-57],[-27,0],[1,-86],[-9,-47],[-46,-70],[-74,-60],[-7,-112],[10,-36],[-15,-23],[16,-45],[-20,-17]],[[9259,11061],[-63,-18],[-24,38],[-10,-25],[5,-74],[-71,2],[-96,-12],[-26,-14],[-65,0],[-40,46],[-8,-41],[-46,-26],[-246,-29],[-28,11],[-84,67],[-36,50],[-29,62],[-32,114],[-44,50],[-53,105],[-109,108],[-39,14],[-120,22],[-152,-2],[-15,-7],[-129,-1],[-51,-5]],[[14978,9330],[40,13],[40,-5],[7,-31],[72,36],[56,78],[26,1]],[[15219,9422],[26,-78],[32,-17],[43,-71],[-10,-80],[25,-38],[-12,-68],[-21,-19],[-64,-7]],[[8723,9748],[-32,-19],[-15,29],[4,48],[53,24],[16,-46],[-26,-36]],[[2397,13511],[-25,31],[38,40],[-13,46],[24,46],[-27,18],[-28,-47],[-25,-4],[-48,62],[-9,31],[-32,23],[-34,53],[-43,19],[16,23],[47,25],[73,93],[74,117],[30,71],[-4,31],[26,17],[-4,36]],[[2353,13159],[-23,41],[12,21],[-12,59],[12,82]],[[2397,13621],[-6,-39],[-43,-9],[-5,36],[54,12]],[[19591,7084],[-29,-3],[-30,-12],[-3,6],[66,20],[-4,-11]],[[3774,11649],[-43,31],[-83,43],[-146,54],[19,48],[-34,34],[-43,7],[-67,57],[15,50],[-25,34],[-38,-3],[-44,66],[33,26],[-21,41],[-1,39],[29,31],[-43,32]],[[3466,11849],[33,-16],[-22,-36],[-87,30],[76,22]],[[18706,12914],[63,-46],[45,-85],[62,-69],[118,-91],[75,-11],[42,12],[55,-3],[78,42],[23,27],[38,2],[96,56],[46,-24],[73,0],[52,-27],[59,16],[59,34],[77,57],[71,31],[37,0],[41,-24],[26,8],[99,4],[54,38],[83,16],[83,-24],[125,26],[37,32],[73,3],[69,14],[101,49],[27,54],[70,29],[131,-48],[-7,-37],[-36,-49],[-12,-82],[27,-20],[-17,-46],[2,-74],[28,-53],[-90,-57],[0,-89],[-26,-113],[11,-38],[-51,-69],[-2,-31],[-62,-66],[-25,-86],[-50,-74],[-5,-24],[-84,-76],[1,-52],[-38,-77],[-80,-117],[-50,-84],[-29,-76],[-13,-70],[-36,-79],[-83,-134],[-89,-119],[-94,-159],[-129,-150],[-78,-79],[-135,-153],[-97,-86],[-64,-74],[-55,-46],[-135,-81],[-79,-39],[-122,-77],[-95,-75],[-104,-97],[-44,-33],[-112,-108],[-138,-154],[-61,-60],[-45,-62],[-28,-25],[-52,-70],[-54,-59],[-113,-178]],[[14916,3525],[57,15],[53,0],[139,-57],[57,9],[122,4],[87,-16],[17,-17]],[[15631,2477],[-30,-12],[-123,77],[-28,-7],[-51,-49],[-45,-95],[-40,-51],[-2,-106],[47,-30],[-3,-23],[50,-52],[94,-32],[129,-1],[12,142],[31,-7]],[[15879,2224],[-7,-43],[-42,-116],[-28,-98],[-21,-117],[-26,-43],[-19,-60],[-99,-87],[-66,-23],[-115,-117],[-58,-75],[-26,-72],[-36,-36],[-76,-132],[-60,-88],[-111,-134],[-102,-78],[-55,-29],[-147,-164],[-262,-209],[-221,-139],[-175,-68],[-123,18],[-91,-25],[-15,-71],[-64,5],[-47,17],[-78,-10],[-30,-57],[-96,14],[-78,28],[-147,22],[-50,-6],[-24,-26],[-114,3],[-108,25],[-22,-15],[-68,-2],[-82,-52],[-17,-33],[-47,-9],[-44,11],[-67,-23],[-97,20],[-24,-30],[-42,6],[-59,-11],[-126,-95],[-39,18],[-62,-4],[-66,49],[-12,34],[-86,40],[-59,-10],[11,60],[-47,25],[-103,-21],[-1,29],[48,53],[-14,45],[-90,126],[-41,39],[-30,75],[30,32],[56,-12],[46,74],[-4,117],[-26,92],[-34,52],[-53,58],[-84,126],[-88,158],[-65,200],[-53,113],[-6,34],[-58,59],[-10,43],[-30,25]],[[7353,11456],[-117,-34]],[[9266,20023],[52,9],[52,45],[176,57],[53,-1],[-22,-43],[22,-13],[56,37],[38,-20],[-8,-44],[44,-44],[-12,-31],[65,-4],[140,91],[23,-60],[-33,-27],[-56,-88],[-64,-16],[-24,-40],[-3,-45],[48,-77],[53,-13],[3,-23],[53,-17],[-2,-84],[28,-24],[-59,-76],[-2,-23],[-51,-64],[-99,-66],[-68,-28],[-28,-37],[18,-70],[96,-85],[78,22],[13,-65],[92,23],[-4,-36],[27,-30],[-3,-32],[105,-12]],[[9856,19175],[38,-4],[32,-27],[-47,-34],[-44,27],[21,38]],[[16163,9438],[-289,0],[-295,0],[-271,0],[-38,-17],[-51,1]],[[17600,8414],[-26,-98],[7,-22],[-39,-109],[-46,-98],[-11,-67],[21,-20],[-4,-51],[18,-29],[65,-38],[36,-61],[52,-21],[22,-41],[-9,-41],[-30,-11],[-22,-45],[-17,-73],[6,-39],[32,-53],[-5,-49],[-40,-39],[11,-70],[42,-62],[-4,-61],[59,-59],[5,-54],[40,-124],[2,-47],[45,-42],[40,-11],[2,-23],[44,-3],[36,-29],[-7,-39]],[[15895,7094],[-60,35],[-52,6],[-30,38],[-45,-4],[-30,20],[-44,-4],[-13,39],[-58,4],[-41,23],[-4,36],[-30,20],[-118,13],[-60,79],[-10,33]],[[17776,7527],[-44,-40],[-22,9],[47,52],[19,-21]],[[17660,8006],[29,-12],[14,-58],[-41,11],[-33,30],[-26,-4],[-8,96],[47,-3],[18,-60]],[[17748,8347],[35,-20],[-6,-59],[-25,-67],[-35,8],[30,64],[-20,66],[21,8]],[[15204,5360],[-124,-6],[-39,9],[-162,-43],[-57,-50],[-28,-1],[-14,-50],[-17,-106],[-145,-60],[-36,-29],[-84,-39],[-55,-82],[-23,-47],[-60,-46],[-85,-101],[-112,-28],[-11,17],[-96,28],[-32,-26],[-61,2],[-7,23],[-57,14],[-69,-3],[-30,16]],[[13765,18548],[12,-35],[58,-7],[134,35],[165,-37],[131,-15],[28,-17],[72,-3],[29,-43],[63,-11],[43,13],[19,-33],[112,-11],[33,5],[88,-28],[66,-44],[37,-1],[112,42],[133,89],[38,-7],[36,22],[16,32],[53,1],[144,38],[122,-42],[84,21],[95,-65],[34,-5],[76,-60],[53,-4],[52,14],[43,-15],[63,20],[24,-10],[154,37],[54,31],[43,-110],[34,-70],[11,-74],[19,-12],[59,-157],[21,-87],[-45,-51],[-27,-104],[-5,-59],[-56,-110],[4,-96],[-51,-62],[-44,9],[-88,62],[-54,77],[-36,19],[-57,63],[2,51],[-13,64],[-81,65],[-37,58],[-15,75],[-38,69],[-53,-77],[-5,-26],[68,-68],[20,-65],[-13,-35],[58,-72],[11,-45],[41,-29],[45,-68],[81,-65],[28,-40],[-32,-10],[8,-42],[91,-111],[-1,-42],[29,-48],[-1,-72],[24,-22],[62,-123],[53,-91],[27,-25],[59,-124],[26,-37],[60,-115],[18,-66],[60,-56],[32,-49],[7,-46],[-7,-54],[10,-28],[-7,-51],[23,-80],[34,-82],[54,-57],[81,-15],[72,-87],[88,-51],[29,-45]],[[2259,15512],[-14,20],[42,278],[40,90],[34,37],[49,7],[20,56],[18,16],[25,89],[28,18],[-9,40],[66,100],[-5,13],[62,75],[0,50],[115,98],[44,50],[42,19],[35,41],[17,94],[-2,71],[35,70],[17,63],[37,60],[7,54],[80,68],[39,6],[88,49],[41,33],[71,163],[36,96]],[[14519,12398],[-25,53],[0,96],[317,-7],[0,-133]]],"transform":{"scale":[0.0036670848612234,0.0035845525528885396],"translate":[-25.336420058638737,-34.83172999963972]},"objects":{"regions":{"type":"GeometryCollection","geometries":[{"arcs":[[0,1,2,3,4,5,6,7]],"type":"Polygon","properties":{"DW_NAME":"Algeria","GERMAN_NAME":"Algerien","DW_STATE_CODE":"DZA","cx":2.827329771258445,"cy":27.4217828306779}},{"arcs":[[8,9,10,11,12,13,14,15,16,17]],"type":"Polygon","properties":{"DW_NAME":"Sudan","GERMAN_NAME":"Sudan","DW_STATE_CODE":"SDN","cx":29.277197600433126,"cy":16.353001744759045}},{"arcs":[[[18,19,20,21]],[[22,23,24]]],"type":"MultiPolygon","properties":{"DW_NAME":"Angola","GERMAN_NAME":"Angola","DW_STATE_CODE":"AGO","cx":17.995091156715464,"cy":-12.176671096618563}},{"arcs":[[25,26,27,28,29]],"type":"Polygon","properties":{"DW_NAME":"Benin","GERMAN_NAME":"Benin","DW_STATE_CODE":"BEN","cx":2.3644621338951466,"cy":10.341052997948744}},{"arcs":[[30,31,32,33]],"type":"Polygon","properties":{"DW_NAME":"Botswana","GERMAN_NAME":"Botswana","DW_STATE_CODE":"BWA","cx":24.193965473016107,"cy":-22.09560137112344}},{"arcs":[[-29,34,35,36,37,38]],"type":"Polygon","properties":{"DW_NAME":"Burkina Faso","GERMAN_NAME":"Burkina Faso","DW_STATE_CODE":"BFA","cx":-1.4791294163881006,"cy":12.634983587643621}},{"arcs":[[39,40,41]],"type":"Polygon","properties":{"DW_NAME":"Burundi","GERMAN_NAME":"Burundi","DW_STATE_CODE":"BDI","cx":29.900534381375497,"cy":-3.3568352109789745}},{"arcs":[[42,43,44,45,46,47,48]],"type":"Polygon","properties":{"DW_NAME":"Cameroon","GERMAN_NAME":"Kamerun","DW_STATE_CODE":"CMR","cx":12.477327002880392,"cy":4.562433170087493}},{"arcs":[[[49]],[[50]],[[51]],[[52]],[[53]]],"type":"MultiPolygon","properties":{"DW_NAME":"Cape Verde","GERMAN_NAME":"Kap Verde","DW_STATE_CODE":"CPV","cx":-23.61859867263473,"cy":15.050321245544293}},{"arcs":[[-15,54,55,56,-43,57]],"type":"Polygon","properties":{"DW_NAME":"Central African Republic","GERMAN_NAME":"Zentral­afrikanische Republik","DW_STATE_CODE":"CAF","cx":21.66945740109075,"cy":6.981994370463537}},{"arcs":[[-16,-58,-49,58,59,60]],"type":"Polygon","properties":{"DW_NAME":"Chad","GERMAN_NAME":"Tschad","DW_STATE_CODE":"TCD","cx":18.66283240479021,"cy":15.157769869641506}},{"arcs":[[61]],"type":"Polygon","properties":{"DW_NAME":"Comoros","GERMAN_NAME":"Komoren","DW_STATE_CODE":"COM","cx":43.34074354189058,"cy":-11.733443525505836}},{"arcs":[[-25,62,63,-44,-57,64]],"type":"Polygon","properties":{"DW_NAME":"Congo","GERMAN_NAME":"Kongo, Republik","DW_STATE_CODE":"COG","cx":15.918432411650187,"cy":0.12365902568997389}},{"arcs":[[-37,65,66,67,68,69]],"type":"Polygon","properties":{"DW_NAME":"Côte d'Ivoire","GERMAN_NAME":"Elfenbeinküste","DW_STATE_CODE":"CIV","cx":-5.493756686053643,"cy":7.576849528501334}},{"arcs":[[-22,70,-23,-65,-56,71,72,73,-41,74,75]],"type":"Polygon","properties":{"DW_NAME":"Democratic Republic of Congo","GERMAN_NAME":"Kongo, Demokratische Republik","DW_STATE_CODE":"COD","cx":23.52148439002254,"cy":-2.249781721391863}},{"arcs":[[76,77,78,79]],"type":"Polygon","properties":{"DW_NAME":"Djibouti","GERMAN_NAME":"Dschibuti","DW_STATE_CODE":"DJI","cx":42.32243787412855,"cy":11.50777692056966}},{"arcs":[[-12,80,81,82,-72,-55,-14,-13]],"type":"Polygon","properties":{"DW_NAME":"South Sudan","GERMAN_NAME":"Südsudan","DW_STATE_CODE":"SSD","cx":30.441004142075975,"cy":7.217570552233177}},{"arcs":[[[-46,83,84]],[[85]]],"type":"MultiPolygon","properties":{"DW_NAME":"Equatorial Guinea","GERMAN_NAME":"Äquatorialguinea","DW_STATE_CODE":"GNQ","cx":10.467238110715058,"cy":1.585691866607568}},{"arcs":[[-10,86,-79,87]],"type":"Polygon","properties":{"DW_NAME":"Eritrea","GERMAN_NAME":"Eritrea","DW_STATE_CODE":"ERI","cx":38.21491904578336,"cy":15.969389811812757}},{"arcs":[[-11,-88,-78,88,89,-81]],"type":"Polygon","properties":{"DW_NAME":"Ethiopia","GERMAN_NAME":"Äthiopien","DW_STATE_CODE":"ETH","cx":39.12673930270418,"cy":8.042158998432312}},{"arcs":[[-45,-64,90,-84]],"type":"Polygon","properties":{"DW_NAME":"Gabon","GERMAN_NAME":"Gabun","DW_STATE_CODE":"GAB","cx":11.504828992930387,"cy":-0.6095863518855003}},{"arcs":[[91,92]],"type":"Polygon","properties":{"DW_NAME":"The Gambia","GERMAN_NAME":"Gambia","DW_STATE_CODE":"GMB","cx":-16.04831675096484,"cy":13.383104439591893}},{"arcs":[[-36,93,94,-66]],"type":"Polygon","properties":{"DW_NAME":"Ghana","GERMAN_NAME":"Ghana","DW_STATE_CODE":"GHA","cx":-0.9798406997888534,"cy":7.8452121636641}},{"arcs":[[95,96,97]],"type":"Polygon","properties":{"DW_NAME":"Guinea-Bissau","GERMAN_NAME":"Guinea-Bissau","DW_STATE_CODE":"GNB","cx":-14.85152568745571,"cy":12.080373877184082}},{"arcs":[[-69,98,99,100,-97,101,102]],"type":"Polygon","properties":{"DW_NAME":"Guinea","GERMAN_NAME":"Guinea","DW_STATE_CODE":"GIN","cx":-10.00317764204821,"cy":10.61567238395453}},{"arcs":[[-82,-90,103,104,105,106]],"type":"Polygon","properties":{"DW_NAME":"Kenya","GERMAN_NAME":"Kenia","DW_STATE_CODE":"KEN","cx":37.857542844161124,"cy":0.5028699295905952}},{"arcs":[[107]],"type":"Polygon","properties":{"DW_NAME":"Lesotho","GERMAN_NAME":"Lesotho","DW_STATE_CODE":"LSO","cx":28.23740961145457,"cy":-29.490771791976478}},{"arcs":[[-68,108,109,-99]],"type":"Polygon","properties":{"DW_NAME":"Liberia","GERMAN_NAME":"Liberia","DW_STATE_CODE":"LBR","cx":-9.347666939391903,"cy":6.401738882981876}},{"arcs":[[-2,110,111,112,-17,-61,113]],"type":"Polygon","properties":{"DW_NAME":"Libya","GERMAN_NAME":"Libyen","DW_STATE_CODE":"LBY","cx":18.035929196615132,"cy":26.63021224576619}},{"arcs":[[114]],"type":"Polygon","properties":{"DW_NAME":"Madagascar","GERMAN_NAME":"Madagaskar","DW_STATE_CODE":"MDG","cx":46.69638915715427,"cy":-18.288544707154024}},{"arcs":[[115,116,117]],"type":"Polygon","properties":{"DW_NAME":"Malawi","GERMAN_NAME":"Malawi","DW_STATE_CODE":"MWI","cx":33.66403376177229,"cy":-13.464083434249602}},{"arcs":[[-4,118,-38,-70,-103,119,120]],"type":"Polygon","properties":{"DW_NAME":"Mali","GERMAN_NAME":"Mali","DW_STATE_CODE":"MLI","cx":-2.0244542039325233,"cy":18.705810288257407}},{"arcs":[[-5,-121,121,122,123]],"type":"Polygon","properties":{"DW_NAME":"Mauritania","GERMAN_NAME":"Mauretanien","DW_STATE_CODE":"MRT","cx":-9.730971788500044,"cy":19.313316004556782}},{"arcs":[[124]],"type":"Polygon","properties":{"DW_NAME":"Mauritius","GERMAN_NAME":"Mauritius","DW_STATE_CODE":"MUS","cx":57.58672281833181,"cy":-20.30438357395986}},{"arcs":[[-7,125,126,127,128]],"type":"Polygon","properties":{"DW_NAME":"Morocco","GERMAN_NAME":"Marokko","DW_STATE_CODE":"MAR","cx":-6.376002852038734,"cy":31.87362644832663}},{"arcs":[[-116,129,130,131,132,133,134,135]],"type":"Polygon","properties":{"DW_NAME":"Mozambique","GERMAN_NAME":"Mosambik","DW_STATE_CODE":"MOZ","cx":37.84358603071265,"cy":-13.874831233196563}},{"arcs":[[-20,136,-33,137,138]],"type":"Polygon","properties":{"DW_NAME":"Namibia","GERMAN_NAME":"Namibia","DW_STATE_CODE":"NAM","cx":17.12092334772961,"cy":-20.608321115550968}},{"arcs":[[-3,-114,-60,139,-30,-39,-119]],"type":"Polygon","properties":{"DW_NAME":"Niger","GERMAN_NAME":"Niger","DW_STATE_CODE":"NER","cx":9.522371655308508,"cy":17.444971778893937}},{"arcs":[[-26,-140,-59,-48,140]],"type":"Polygon","properties":{"DW_NAME":"Nigeria","GERMAN_NAME":"Nigeria","DW_STATE_CODE":"NGA","cx":7.611491372984878,"cy":9.538786108620315}},{"arcs":[[-42,-74,141,142]],"type":"Polygon","properties":{"DW_NAME":"Rwanda","GERMAN_NAME":"Ruanda","DW_STATE_CODE":"RWA","cx":29.687231854941658,"cy":-1.9828127378319618}},{"arcs":[[143]],"type":"Polygon","properties":{"DW_NAME":"São Tomé and Príncipe","GERMAN_NAME":"São Tomé und Príncipe","DW_STATE_CODE":"STP","cx":6.603150482399392,"cy":0.2392259474631649}},{"arcs":[[[-93,144,-122,-120,-102,-96,145]],[[146]]],"type":"MultiPolygon","properties":{"DW_NAME":"Senegal","GERMAN_NAME":"Senegal","DW_STATE_CODE":"SEN","cx":-14.906303014577043,"cy":15.217454963015353}},{"arcs":[[147]],"type":"Polygon","properties":{"DW_NAME":"Seychelles","GERMAN_NAME":"Seychellen","DW_STATE_CODE":"SYC","cx":46.460670793896966,"cy":-9.429749759813367}},{"arcs":[[[-100,-110,148]],[[149]]],"type":"MultiPolygon","properties":{"DW_NAME":"Sierra Leone","GERMAN_NAME":"Sierra Leone","DW_STATE_CODE":"SLE","cx":-11.811726570090993,"cy":8.625528951511663}},{"arcs":[[-77,150,-104,-89]],"type":"Polygon","properties":{"DW_NAME":"Somalia","GERMAN_NAME":"Somalia","DW_STATE_CODE":"SOM","cx":43.64453149453595,"cy":2.8195835466225274}},{"arcs":[[-32,151,-134,152,-132,153,-138],[-108]],"type":"Polygon","properties":{"DW_NAME":"South Africa","GERMAN_NAME":"Südafrika","DW_STATE_CODE":"ZAF","cx":23.23629478621064,"cy":-30.402168240095058}},{"arcs":[[-133,-153]],"type":"Polygon","properties":{"DW_NAME":"Eswatini","GERMAN_NAME":"Swasiland","DW_STATE_CODE":"SWZ","cx":31.491063238084173,"cy":-26.53607518651033}},{"arcs":[[-28,154,-94,-35]],"type":"Polygon","properties":{"DW_NAME":"Togo","GERMAN_NAME":"Togo","DW_STATE_CODE":"TGO","cx":1.0794533368278023,"cy":8.837325749124636}},{"arcs":[[[-1,155,-111]],[[156]]],"type":"MultiPolygon","properties":{"DW_NAME":"Tunisia","GERMAN_NAME":"Tunesien","DW_STATE_CODE":"TUN","cx":9.030577329412917,"cy":33.700257607271766}},{"arcs":[[-73,-83,-107,157,-142]],"type":"Polygon","properties":{"DW_NAME":"Uganda","GERMAN_NAME":"Uganda","DW_STATE_CODE":"UGA","cx":32.44218559021444,"cy":0.9066975834682043}},{"arcs":[[[-40,-143,-158,-106,158,-130,-118,159,-75]],[[160]],[[161]],[[162]]],"type":"MultiPolygon","properties":{"DW_NAME":"Tanzania","GERMAN_NAME":"Tansania","DW_STATE_CODE":"TZA","cx":34.80260884075084,"cy":-5.872197474497886}},{"arcs":[[-19,-76,-160,-117,-136,163,-34,-137]],"type":"Polygon","properties":{"DW_NAME":"Zambia","GERMAN_NAME":"Sambia","DW_STATE_CODE":"ZMB","cx":26.42053891228679,"cy":-14.691992483670376}},{"arcs":[[-31,-164,-135,-152]],"type":"Polygon","properties":{"DW_NAME":"Zimbabwe","GERMAN_NAME":"Simbabwe","DW_STATE_CODE":"ZWE","cx":29.944202564603376,"cy":-18.92506839315396}},{"arcs":[[-18,-113,164]],"type":"Polygon","properties":{"DW_NAME":"Arab Republic of Egypt","GERMAN_NAME":"Ägypten","DW_STATE_CODE":"EGY","cx":29.260527370732003,"cy":26.43365946731778}},{"arcs":[[-6,-124,165,-128,-127,-126]],"type":"Polygon","properties":{"DW_NAME":"Western Sahara","GERMAN_NAME":"Westsahara","DW_STATE_CODE":"ESH","cx":-13.423268500961704,"cy":24.58044181736703}}]},"disputed_areas":{"type":"GeometryCollection","geometries":[{"type":"LineString","arcs":[-127],"properties":{"id":null,"layer":"disputed_areas","path":"/home/anna/Desktop/core/libs/basemaps/maps/world/src/2019/disputed_areas.shp"},"id":null},{"type":"LineString","arcs":[-128],"properties":{"id":null,"layer":"disputed_areas","path":"/home/anna/Desktop/core/libs/basemaps/maps/world/src/2019/disputed_areas.shp"},"id":null},{"type":"LineString","arcs":[12,166],"properties":{"id":null,"layer":"disputed_areas","path":"/home/anna/Desktop/core/libs/basemaps/maps/world/src/2019/disputed_areas.shp"},"id":null}]}}}'

Decide on a map key

For each basemap, you will find one or several keys. Keys are a crucial part of creating choropleth maps with Datawrapper. Their purpose is to match your dataset to the correct regions on the map. For example, for the world map, you can upload your dataset if it contains either ISO codes, the respective names of the countries according to the World Bank standard or the Natural Earth Data standard, or German names.

Let's say we want to create a map of Africa using the ISO code of the countries. According to the API response above, the ADM0_A3 key contains the ISO code of the countries. To retrieve all of them, you can make a request like this:

curl --request GET \
  --url https://api.datawrapper.de/plugin/basemaps/africa/ADM0_A3

The response will contain information about that particular key, and an array with all possible values:

{
  "status": "ok",
  "data": {
    "value": "ADM0_A3",
    "label": "ISO ",
    "description": "iso  code of the country",
    "values": [
      "ETH",
      "SDS",
      "SOM",
   		...
      "COM",
      "STP",
      "CPV"
    ]
  }
}

Using this data, we can ensure that the dataset we upload will match correctly with the data format that our basemap expects.

Upload the data

To create a map, all we still need is the actual data. We will upload the literacy rate in African countries, that we got from Our World in Data. We can prepare the data as a CSV.

📘

You will need to upload at least two columns – one with the key and one with the values. But you can upload as many columns as you like. For example, you might want to fill the tooltips on your map with additional information that you get from an extra column you've uploaded.

We prepare three columns: the country names, the ISO codes and our values:

country,code,literacy-rate
Angola,AGO,71.2
Burundi,BDI,85.5
Benin,BEN,38.4
Burkina Faso,BFA,37.7
Botswana,BWA,88.2
Central African Republic,CAF,36.8
Cote de Ivoire,CIV,43.3
Cameroon,CMR,75
Democratic Republic of Congo,COD,77.2
Congo,COG,79.3
Comoros,COM,78.1
Cape Verde,CPV,88.5
Algeria,DZA,79.6
Egypt,EGY,75.8
Eritrea,ERI,73.8
Ethiopia,ETH,49
Gabon,GAB,83.2
Ghana,GHA,76.6
Guinea,GIN,30.5
Gambia,GMB,55.6
Guinea-Bissau,GNB,59.8
Equatorial Guinea,GNQ,95.2
Kenya,KEN,78
Liberia,LBR,47.6
Libya,LBY,91.4
Lesotho,LSO,79.4
Morocco,MAR,71.7
Madagascar,MDG,64.7
Mali,MLI,33.1
Mozambique,MOZ,58.8
Mauritania,MRT,52.1
Malawi,MWI,66
Namibia,NAM,90.8
Niger,NER,19.1
Nigeria,NGA,59.6
Rwanda,RWA,71.2
Sudan,SDN,58.6
Senegal,SEN,55.6
Sierra Leone,SLE,48.4
Sao Tome and Principe,STP,91.7
Swaziland,SWZ,87.5
Chad,TCD,40
Togo,TGO,66.5
Tunisia,TUN,81.1
Tanzania,TZA,80.4
Uganda,UGA,73.8
South Africa,ZAF,94.6
Zambia,ZMB,85.1
Zimbabwe,ZWE,86.9

Now that we have some data, let's upload it. Make sure to replace our ID with your own one in this and all following requests!

curl --request PUT \
  --url https://api.datawrapper.de/v3/charts/<ID>/data \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: text/csv' \
  --data "country,code,literacy-rate
Angola,AGO,71.2
Burundi,BDI,85.5
Benin,BEN,38.4
Burkina Faso,BFA,37.7
...
Tanzania,TZA,80.4
Uganda,UGA,73.8
South Africa,ZAF,94.6
Zambia,ZMB,85.1
Zimbabwe,ZWE,86.9"

(You might need to get rid of the ' in Cote d'Ivoire to run the query successfully.)

Once we've uploaded the data, we can update the chart with the correct basemap and key to ensure the data gets displayed. We'll use a PATCH request to do so:

curl  --request PATCH \
  --url https://api.datawrapper.de/v3/charts/<ID> \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: application/json' \
  --data \
  '{
    "metadata": {
      "axes": {
          "keys": "code",
          "values": "literacy-rate"
      },
      "visualize": {
          "basemap": "africa",
          "map-key-attr": "ADM0_A3"
      }
    }
  }'

Note that metadata.visualize.basemap is set to the map name africa, and metadata.visualize.basemap.map-key-attr is set to the key name ADM0_A3.

Also, metadata.axes are set to the corresponding columns in our dataset, code and literacy-rate. Using these settings, the map will now render correctly. We can check if this is the case when we paste our ID in the URL https://app.datawrapper.de/map/HpeMi/visualize.

Custom basemap properties in metadata

If you’ve used a custom basemap, the basemap should be custom_upload and you’ll need to include these additional properties:

  • set metadata.visualize.basemapProjection to the desired map projection. Availble projections are as follows; geoAzimuthalEqualArea, geoNaturalEarth1, geoConicEquidistant, geoConicConformal, geoAlbersUsa.
  • set metadata.visualize.basemapRegions to the name of map layer or the topology object. In this case, that would be regions.
curl  --request PATCH \
  --url https://api.datawrapper.de/v3/charts/<ID> \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: application/json' \
  --data \
  '{
    "metadata": {
      "visualize": {
          "basemap": "custom_upload",
          "basemapProjection": "geoAzimuthalEqualArea",
          "basemapRegions": "regions"
      }
    }
  }'

Edit the map

Now we can already publish our map (to do so, jump to the next section). But we can also add some settings to our map before we do so, like tooltips, colors, or the URL to the data source. They will all go into the property metadata.

📘

Play around to find all metadata properties

We won't have the capacity to explain every single property within metadata for choropleth maps. To learn the names of the properties (to then change them with API requests), consider creating a map within the Datawrapper app. You can change settings there, and then pull the property information for this chart from the API to learn what the changed settings are called.

Let's use the following PATCH request to give the map a proper description and source:

curl  --request PATCH \
  --url https://api.datawrapper.de/v3/charts/<ID> \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: application/json' \
  --data \
  '{
    "metadata": {
      "describe": {
          "source-name": "Our World in Data",
          "source-url": "https://ourworldindata.org/literacy",
          "intro": "Share of the population older than 14 years that is able to read and write, in African countries, 2015"
      }
    }
}'

We can add as many PATCH requests as we want to add or overwrite settings.

For example, to add tooltips, we'll add a property called metadata.visualize.tooltip with yet another PATCH request:

curl  --request PATCH \
  --url https://api.datawrapper.de/v3/charts/<ID> \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'content-type: application/json' \
  --data \
  '{
    "metadata": {
      "visualize": {
        "tooltip": {
          "body": "{{ literacy_rate }}% of adults in this country can read.",
          "title": "{{ country }}",
          "fields": {
            "code": "code",
            "country": "country",
            "literacy_rate": "literacy-rate"
          }
        }
      }
    }
}'

Publish the map

To publish the map, run the following request. Afterwards, you can check if the map got published when opening the following URL: https://www.datawrapper.de/_/HpeMi/. In both cases, make sure you replace our map ID (HpeMi) with your own.

curl --request POST \
  --url https://api.datawrapper.de/charts/<ID>/publish \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>'

And that's it! We successfully published a choropleth map. You will find the embed codes in the response to the last query. Learn more about how to publish visualizations with our API and how to read the response to a publish query.

This is what our final map looks like:

1702