Map Data

Visualize Geographic Data with Ease

Subscribers get access to the map builder application which allows you to upload and edit data in various file formats and dynamically generate maps. You can then download the completed map as a high-resolution image file for reports. Learn more.

We also offer time series data handling which lets you view your geographic over time and download the animation as a GIF or MP4 movie file.

Data Inputs
Try it Out

    Accepted Files:

  • File TXT TXT
  • File RTF RTF
  • File CSV CSV
  • File TSV TSV
  • File XML XML
  • File JS JS
  • File JSON JSON
  • File PHP PHP
  • File XLS XLS
  • File XLSX XLSX
  • File ODS ODS

See map files for formats

. Types of Data

Our data analytics software tries to automatically detect the data type you upload. There are four major types of data that our platform can understand; text, numbers, dates and coordinates.

Text

  • This is a string of alpha-numeric characters such as words or phrases.

Numeric

  • These are integer only values that contain no alphabetic text.

* Date

  • This is a special type of text column based on various date formats.

* Coordinates

  • This is a special type of number column based on various coordinate formats.
Column Types
Country Identifiers
Country Alpha3 Alpha2 Numeric
Flag Afghanistan AFG AF
Flag Akrotiri WSB AK
Flag Aland Islands ALA AX
Flag Albania ALB AL
Flag Algeria DZA DZ
Flag American Samoa ASM AS
Flag Andorra AND AD
Flag Angola AGO AO
Flag Anguilla AIA AI
Flag Antarctica ATA AQ
Flag Antigua and Barbuda ATG AG
Flag Argentina ARG AR
Flag Armenia ARM AM
Flag Aruba ABW AW
Flag Ashmore and Cartier Islands ATC Z7
Flag Australia AUS AU
Flag Austria AUT AT
Flag Azerbaijan AZE AZ
Flag Bahamas BHS BS
Flag Bahrain BHR BH
Flag Bajo Nuevo Bank BJN Z4
Flag Bangladesh BGD BD
Flag Barbados BRB BB
Flag Belarus BLR BY
Flag Belgium BEL BE
Flag Belize BLZ BZ
Flag Benin BEN BJ
Flag Bermuda BMU BM
Flag Bhutan BTN BT
Flag Bolivia BOL BO
Flag Bonaire BES BQ
Flag Bosnia and Herzegovina BIH BA
Flag Botswana BWA BW
Flag Bouvet Island BVT BV
Flag Brazil BRA BR
Flag British Antarctic Territory BAT IA
Flag British Indian Ocean Territory IOT IO
Flag British Virgin Islands VGB VG
Flag Brunei BRN BN
Flag Bulgaria BGR BG
Flag Burkina Faso BFA BF
Flag Burundi BDI BI
Flag Cabo Verde CPV CV
Flag Cambodia KHM KH
Flag Cameroon CMR CM
Flag Canada CAN CA
Flag Cayman Islands CYM KY
Flag Central African Republic CAF CF
Flag Chad TCD TD
Flag Chile CHL CL
Flag China CHN CN
Flag Christmas Island CXR CX
Flag Clipperton Island CLP Z5
Flag Cocos (Keeling) Islands CCK CC
Flag Colombia COL CO
Flag Comoros COM KM
Flag Cook Islands COK CK
Flag Coral Sea Islands CSI Z6
Flag Costa Rica CRI CR
Flag Croatia HRV HR
Flag Cuba CUB CU
Flag Curacao CUW CW
Flag Cyprus CYP CY
Flag Czechia CZE CZ
Flag Democratic Republic of the Congo COD CD
Flag Denmark DNK DK
Flag Dhekelia ESB DH
Flag Djibouti DJI DJ
Flag Dominica DMA DM
Flag Dominican Republic DOM DO
Flag Ecuador ECU EC
Flag Egypt EGY EG
Flag El Salvador SLV SV
Flag Equatorial Guinea GNQ GQ
Flag Eritrea ERI ER
Flag Estonia EST EE
Flag Eswatini SWZ SZ
Flag Ethiopia ETH ET
Flag Falkland Islands FLK FK
Flag Faroe Islands FRO FO
Flag Fiji FJI FJ
Flag Finland FIN FI
Flag France FRA FR
Flag French Guiana GUF GF
Flag French Polynesia PYF PF
Flag French Southern and Antarctic Lands ATF TF
Flag Gabon GAB GA
Flag Gambia GMB GM
Flag Georgia GEO GE
Flag Germany DEU DE
Flag Ghana GHA GH
Flag Gibraltar GIB GI
Flag Greece GRC GR
Flag Greenland GRL GL
Flag Grenada GRD GD
Flag Guadeloupe GLP GP
Flag Guam GUM GU
Flag Guantanamo Bay USG ZZ
Flag Guatemala GTM GT
Flag Guernsey GGY GG
Flag Guinea GIN GN
Flag Guinea-Bissau GNB GW
Flag Guyana GUY GY
Flag Haiti HTI HT
Flag Heard Island and McDonald Islands HMD HM
Flag Holy See VAT VA
Flag Honduras HND HN
Flag Hong Kong HKG HK
Flag Hungary HUN HU
Flag Iceland ISL IS
Flag India IND IN
Flag Indonesia IDN ID
Flag Iran IRN IR
Flag Iraq IRQ IQ
Flag Ireland IRL IE
Flag Isle of Man IMN IM
Flag Israel ISR IL
Flag Italy ITA IT
Flag Ivory Coast CIV CI
Flag Jamaica JAM JM
Flag Jan Mayen SJM SJ
Flag Japan JPN JP
Flag Jersey JEY JE
Flag Jordan JOR JO
Flag Kashmir KAS KS
Flag Kazakhstan KAZ KZ
Flag Kenya KEN KE
Flag Kiribati KIR KI
Flag Kosovo XKX XK
Flag Kuwait KWT KW
Flag Kyrgyzstan KGZ KG
Flag Kyzylorda KAB KY
Flag Laos LAO LA
Flag Latvia LVA LV
Flag Lebanon LBN LB
Flag Lesotho LSO LS
Flag Liberia LBR LR
Flag Libya LBY LY
Flag Liechtenstein LIE LI
Flag Lithuania LTU LT
Flag Luxembourg LUX LU
Flag Macao MAC MO
Flag Madagascar MDG MG
Flag Malawi MWI MW
Flag Malaysia MYS MY
Flag Maldives MDV MV
Flag Mali MLI ML
Flag Malta MLT MT
Flag Marshall Islands MHL MH
Flag Martinique MTQ MQ
Flag Mauritania MRT MR
Flag Mauritius MUS MU
Flag Mayotte MYT YT
Flag Mexico MEX MX
Flag Micronesia FSM FM
Flag Moldova MDA MD
Flag Monaco MCO MC
Flag Mongolia MNG MN
Flag Montenegro MNE ME
Flag Montserrat MSR MS
Flag Morocco MAR MA
Flag Mozambique MOZ MZ
Flag Myanmar MMR MM
Flag Namibia NAM NA
Flag Nauru NRU NR
Flag Nepal NPL NP
Flag Netherlands NLD NL
Flag New Caledonia NCL NC
Flag New Zealand NZL NZ
Flag Nicaragua NIC NI
Flag Niger NER NE
Flag Nigeria NGA NG
Flag Niue NIU NU
Flag Norfolk Island NFK NF
Flag North Korea PRK KP
Flag North Macedonia MKD MK
Flag Northern Cyprus CYN ZC
Flag Northern Mariana Islands MNP MP
Flag Norway NOR NO
Flag Oman OMN OM
Flag Pakistan PAK PK
Flag Palau PLW PW
Flag Palestine PSE PS
Flag Panama PAN PA
Flag Papua New Guinea PNG PG
Flag Paraguay PRY PY
Flag Peru PER PE
Flag Philippines PHL PH
Flag Pitcairn Islands PCN PN
Flag Poland POL PL
Flag Portugal PRT PT
Flag Puerto Rico PRI PR
Flag Qatar QAT QA
Flag Republic of the Congo COG CG
Flag Reunion REU RE
Flag Romania ROU RO
Flag Russia RUS RU
Flag Rwanda RWA RW
Flag Saba BES BQ
Flag Saint Barthelemy BLM BL
Flag Saint Helena, Ascension and Tristan da Cunha SHN SH
Flag Saint Kitts and Nevis KNA KN
Flag Saint Lucia LCA LC
Flag Saint Martin MAF MF
Flag Saint Pierre and Miquelon SPM PM
Flag Saint Vincent and the Grenadines VCT VC
Flag Samoa WSM WS
Flag San Marino SMR SM
Flag Sao Tome and Principe STP ST
Flag Saudi Arabia SAU SA
Flag Scarborough Reef SCR Z3
Flag Senegal SEN SN
Flag Serbia SRB RS
Flag Serranilla Bank SER Z1
Flag Seychelles SYC SC
Flag Sierra Leone SLE SL
Flag Singapore SGP SG
Flag Sint Eustatius BES BQ
Flag Sint Maarten SXM SX
Flag Slovakia SVK SK
Flag Slovenia SVN SI
Flag Solomon Islands SLB SB
Flag Somalia SOM SO
Flag Somaliland SOL ZS
Flag South Africa ZAF ZA
Flag South Georgia and the South Sandwich Islands SGS GS
Flag South Korea KOR KR
Flag South Sudan SSD SS
Flag Spain ESP ES
Flag Spratly Islands PGA Z1
Flag Sri Lanka LKA LK
Flag Sudan SDN SD
Flag Suriname SUR SR
Flag Svalbard SJM SJ
Flag Sweden SWE SE
Flag Switzerland CHE CH
Flag Syria SYR SY
Flag Taiwan TWN TW
Flag Tajikistan TJK TJ
Flag Tanzania TZA TZ
Flag Thailand THA TH
Flag Timor-Leste TLS TL
Flag Togo TGO TG
Flag Tokelau TKL TK
Flag Tonga TON TO
Flag Trinidad and Tobago TTO TT
Flag Tunisia TUN TN
Flag Turkey TUR TR
Flag Turkmenistan TKM TM
Flag Turks and Caicos Islands TCA TC
Flag Tuvalu TUV TV
Flag Uganda UGA UG
Flag Ukraine UKR UA
Flag United Arab Emirates ARE AE
Flag United Kingdom GBR GB
Flag United States USA US
Flag United States Minor Outlying Islands UMI UM
Flag Uruguay URY UY
Flag US Virgin Islands VIR VI
Flag Uzbekistan UZB UZ
Flag Vanuatu VUT VU
Flag Venezuela VEN VE
Flag Vietnam VNM VN
Flag Wallis and Futuna WLF WF
Flag Western Sahara ESH EH
Flag Yemen YEM YE
Flag Zambia ZMB ZM
Flag Zimbabwe ZWE ZW
Coordinate Data

Our platform allows the handling of many different types of coordinate data formats.

For Decimal Degrees a negative is assigned to southern latitudes and western longitudes.

  • Decimal Degrees (DD)
  • North
  • South
  • Latitude
  • 35 N
  • 35
  • -35 S
  • -35
  • Decimal Degrees (DD)
  • East
  • West
  • Longitude
  • 35 E
  • 35
  • -35 W
  • -35
Example Conversion
N 53 03 47.7 53.06325
s53 03 47.7 -53.06325
E53 03 47.7 53.06325
w53 03 47.7 -53.06325
53 03 47.7 n 53.06325
53 03 47.7S -53.06325
53 03 47.7e 53.06325
W 53 03 47.7 -53.06325
N53 03 47.7 53.06325
s.53.03.47.7 -53.06325
E53.03.47.7 53.06325
w53..03..47.7 -53.06325
n53.03.47.7 53.06325
53.03.47.7 S -53.06325
53.03.47.7e 53.06325
53..03..47.7W -53.06325
N.53.03.47.7 53.06325
s53.03.47.7 -53.06325
E-53-03-47.7 53.06325
w53-03-47.7 -53.06325
n53--03--47.7 53.06325
S53-03-47.7 -53.06325
53-03-47.7 e 53.06325
53-03-47.7W -53.06325
53--03--47.7N 53.06325
s-53-03-47.7 -53.06325
E53-03-47.7 53.06325
53.06325w -53.06325
53.06325 53.06325
53.06325 s -53.06325
53.06325 N 53.06325
-53.06325 -53.06325
53 03 47.7 53.06325
-53 03 47.7 -53.06325
53 03 47.7W -53.06325
-53º 03' 47.7" -53.06325
53º 03' 47.7" 53.06325
53º 03' 47.7"s -53.06325
N 144 35 26 144.59055555556
s144 35 26 -144.59055555556
E 144 35 26 144.59055555556
144 35 26w -144.59055555556
N144.35.26 144.59055555556
144.35.26s -144.59055555556
-144 35 26 -144.59055555556
144º 35' 26"w -144.59055555556
45°43'51''N 45.730833333333
009°44'23''E 9.7397222222222
50° 5' N 50.083333333333
-8°56'O -8.9333333333333
Javascript Data Addition
Javascript Badge

The easiest way to add data to your maps is through a Javascript array. JavaScript arrays are special types of objects used to store multiple values in a single variable. Data within the array can be categorized into two types; strings and numbers.

Strings are values contained within quotation marks and can be any alpha-numeric characters. Numbers are integers without quotation marks and a common mistake people will make is to put them around the number which can cause errors. The proper syntax format for a Javascript array is provided:

var series = ["USA",5];

If you need to add data for more than one location then you need to create an array of arrays such as:

var series = [["USA",5],["CAN",7],["MEX",9],["RUS",11],["AUS",13]];

<!DOCTYPE html>

<html>

<head>

<title>Data Map | World Map</title>

</head>

<body>

<h1>Data Map</h1>

<div id="map" style="width: 100%; max-width: 700px; height: 350px; float: left; position: relative;"></div>

<script src="https://world-map.org/cartography/scripts/d3.js"></script>

<script src="https://world-map.org/cartography/scripts/d3-topojson.js"></script>

<script src="https://world-map.org/cartography/datamaps/world/world.min.js"></script>

<script>

var series = [["USA",5],["CAN",7],["MEX",9],["RUS",11],["AUS",13]];

var dataset = {};

var onlyValues = series.map(function(obj){return obj[1];});

var minValue = Math.min.apply(null, onlyValues),

maxValue = Math.max.apply(null, onlyValues);

var paletteScale = d3.scale.linear()

.domain([minValue,maxValue])

.range(["#EFEFFF","#02386F"]);

series.forEach(function(item){

var name = item[0],

value = item[1];

dataset[name] = {

numberOfThings: value, fillColor: paletteScale(value)

};

});

new Datamap({

element: document.getElementById('map'),

projection: 'mercator',

fills: { defaultFill: '#F5F5F5' },

data: dataset,

geographyConfig: {

borderColor: '#DEDEDE',

highlightBorderWidth: 2,

highlightFillColor: function(geo) {return geo['fillColor'] || '#F5F5F5';},

highlightBorderColor: '#B7B7B7',

popupTemplate: function(geo, data) {

if (!data) { return ; }

return ['<div class="hoverinfo">',

'<p><strong>', geo.properties.name, '</strong></p>',

'<p>Count: <strong>', data.value, '</strong></p>',

'</div>'].join('');

}

}

});

</script>

</body>

</html>

Code Copied!

References: W3 Schools: Javascript Arrays

PHP Data Addition
PHP Badge

You can also add data to your maps via PHP if you are using the proper .php file type. This involves copying the Javascript code directly into the PHP file and then adding PHP code onto of it.

This code then generates and assigns your data in the same format as it would look in Javascript even though it is being generated by the server at the time of page load.

Data for PHP addition comes from a PHP array. The documentation for this data type can be found here.

<?php

$data = array(

"USA" => array("value" => 3,"country" => "United States"),

"CAN" => array("value" => 4,"country" => "Canada")

);

?>

<script>

var election = new Datamap({

scope: 'world',

responsive: true,

element: document.getElementById('map'),

geographyConfig: {

popupTemplate: function(geography, data) {

return '<div class="hoverinfo">

<p style="font-weight: bold">'+geography.properties.name+'</p>

<p>Avg. Temp: '+data.temperature+'</p>

</div>'

},

highlightFillColor: 'EDDE45'

},

fills: {

defaultFill: '#EDE5E2',

MIN: "#1565cb",

LOW: "#1565cb",

MED: "#A9C0DE",

HIGH: "#f46e43",

veryHigh: "#d73026",

MAX: "#67001e",

},

data:{

<?php

include ''.$_SERVER['DOCUMENT_ROOT'].'/data/temperature.php';

foreach($GLOBALS['temperature'] as $key => $value):

// print_r($value);

$alpha3 = $value['alpha3'];

$temperature = $value['temperature'];

// echo '

<p>"'.$alpha3.'":{fillKey:"MAX", numberOfThings: '.$temperature.'},

</p>';

if($temperature >= -30 && $temperature

<= 5):

$fill = 'LOW';

elseif($temperature >= 6 && $temperature

<= 14):

$fill = 'MED';

elseif($temperature >= 15 && $temperature

<= 24):

$fill = 'HIGH';

elseif($temperature >= 25 && $temperature

<= 29):

$fill = 'veryHigh';

elseif($temperature >= 30 && $temperature

<= 50):

$fill = 'Max';

endif;

echo '"'.$alpha3.'":{fillKey:"'.$fill.'", temperature: '.$temperature.'},';

endforeach;

?>

}

})

</script>

AJAX Data Addition

AJAX addition of data is the most complex and involves the usage of both Javascript and PHP as discussed above as well as introducing a third type of data structure called JSON. AJAX can be utilized via Javascript or jQuery.

ajax.js

<script>

var value = 9;

$("document").ready(function(){

/* Get Submission Data & Serialize */

var data = {value: value};

data = $(this).serialize()+"&"+$.param(data);

/* AJAX Call */

$.ajax({

type: "POST",

cache: false,

url: ""+window.location.protocol+"//"+window.location.host+"/response.php",

dataType: "json",

data: data,

beforeSend: function() {

console.log(data);

},

success: function(data) {

console.log(data);

},

error: function() {

console.log("AJAX Error");

}

});

});

</script>

Warning! Requires jQuery

response.php

<?php>

echo json_encode($return, JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK); die;

?>

Dynamically Updating Map Data

A final method of adding data is to update the map once it has been generated. While we recommend erasing the map each time you want to create a new one this is an alternative method for those who may need it.

map.updateChoropleth({

USA: colors(Math.random() * 10),

RUS: colors(Math.random() * 100),

AUS: {fillKey: 'defaultFill'},

});