Output Charts

Docs · Visuals

Map JSON format.

Countries or US states coloured by a value, from the lowest to the highest, with the name and the number on hover.

Try it

Edit the example and the visual redraws. Mistakes show the same messages the API returns.

The visual
Map

Loading map

Change any number or label. The chart follows.

Fields

The map document
FieldTypeRule
regionRequiredstringworld or us-states. The world map has every country with an ISO code and a shape; the US map has the 50 states and DC.
idKeyRequiredstringThe key in each row that holds the region's code. Up to 80 characters.
valueKeyRequiredstringThe key in each row that holds the number. Up to 80 characters. Must differ from idKey.
labelKeyOptionalstringThe key in each row for a label the tooltip shows instead of the region's name. Up to 80 characters.
formatOptionalstringnumber (the default), compact or percent. A percent value is a fraction: 0.25 shows as 25%.
prefixOptionalstringShown before the value in the tooltip and the legend, such as "$". Up to 80 characters.
suffixOptionalstringShown after the value, such as " h". Up to 80 characters.
dataRequiredarrayOne row per region at most; may be empty.
Each row in data
FieldTypeRule
<idKey>RequiredstringThe region's code: an ISO 3166-1 alpha-2 code such as DE on the world map (alpha-3 is accepted too), a USPS code such as CA on the US map (the two-digit FIPS code is accepted too). Case does not matter.
<valueKey>RequirednumberThe number the colour and the tooltip show.
<labelKey>OptionalstringRequired when labelKey is set. Up to 80 characters; may be empty.

Good to know

  • A code that appears twice is an error naming the repeat. A real code with no shape on the map (Puerto Rico and the territories on the US map; Guadeloupe, Gibraltar and other territories drawn as part of their country on the world map) is refused with the region's name: drop the row, or count it under the country it belongs to.
  • The colour runs from the dashboard scheme's surface to its first series colour, lowest value to highest. A region with no row is drawn in a neutral tone and its tooltip says No data.
  • A map is full width by default and 700 pixels tall, and the whole region always fits inside the tile; a third of the width is the narrowest it goes. Append merges rows by region, so a few changed regions can be sent without the rest.

Codes

What goes under idKey for each region, with the alternative that is also accepted and the name the tooltip shows.

World map (235 countries)
World map: region is world
CodeAlso acceptedName
ADANDAndorra
AEAREUnited Arab Emirates
AFAFGAfghanistan
AGATGAntigua and Barbuda
AIAIAAnguilla
ALALBAlbania
AMARMArmenia
AOAGOAngola
ARARGArgentina
ASASMAmerican Samoa
ATAUTAustria
AUAUSAustralia
AWABWAruba
AXALAÅland Islands
AZAZEAzerbaijan
BABIHBosnia and Herzegovina
BBBRBBarbados
BDBGDBangladesh
BEBELBelgium
BFBFABurkina Faso
BGBGRBulgaria
BHBHRBahrain
BIBDIBurundi
BJBENBenin
BLBLMSaint Barthélemy
BMBMUBermuda
BNBRNBrunei
BOBOLBolivia
BRBRABrazil
BSBHSBahamas
BTBTNBhutan
BWBWABotswana
BYBLRBelarus
BZBLZBelize
CACANCanada
CDCODDR Congo
CFCAFCentral African Republic
CGCOGRepublic of the Congo
CHCHESwitzerland
CICIVIvory Coast
CKCOKCook Islands
CLCHLChile
CMCMRCameroon
CNCHNChina
COCOLColombia
CRCRICosta Rica
CUCUBCuba
CVCPVCape Verde
CWCUWCuraçao
CYCYPCyprus
CZCZECzechia
DEDEUGermany
DJDJIDjibouti
DKDNKDenmark
DMDMADominica
DODOMDominican Republic
DZDZAAlgeria
ECECUEcuador
EEESTEstonia
EGEGYEgypt
EHESHWestern Sahara
ERERIEritrea
ESESPSpain
ETETHEthiopia
FIFINFinland
FJFJIFiji
FKFLKFalkland Islands
FMFSMMicronesia
FOFROFaroe Islands
FRFRAFrance
GAGABGabon
GBGBRUnited Kingdom
GDGRDGrenada
GEGEOGeorgia
GGGGYGuernsey
GHGHAGhana
GLGRLGreenland
GMGMBGambia
GNGINGuinea
GQGNQEquatorial Guinea
GRGRCGreece
GSSGSSouth Georgia
GTGTMGuatemala
GUGUMGuam
GWGNBGuinea-Bissau
GYGUYGuyana
HKHKGHong Kong
HMHMDHeard Island and McDonald Islands
HNHNDHonduras
HRHRVCroatia
HTHTIHaiti
HUHUNHungary
IDIDNIndonesia
IEIRLIreland
ILISRIsrael
IMIMNIsle of Man
ININDIndia
IOIOTBritish Indian Ocean Territory
IQIRQIraq
IRIRNIran
ISISLIceland
ITITAItaly
JEJEYJersey
JMJAMJamaica
JOJORJordan
JPJPNJapan
KEKENKenya
KGKGZKyrgyzstan
KHKHMCambodia
KIKIRKiribati
KMCOMComoros
KNKNASaint Kitts and Nevis
KPPRKNorth Korea
KRKORSouth Korea
KWKWTKuwait
KYCYMCayman Islands
KZKAZKazakhstan
LALAOLaos
LBLBNLebanon
LCLCASaint Lucia
LILIELiechtenstein
LKLKASri Lanka
LRLBRLiberia
LSLSOLesotho
LTLTULithuania
LULUXLuxembourg
LVLVALatvia
LYLBYLibya
MAMARMorocco
MCMCOMonaco
MDMDAMoldova
MEMNEMontenegro
MFMAFSaint Martin
MGMDGMadagascar
MHMHLMarshall Islands
MKMKDNorth Macedonia
MLMLIMali
MMMMRMyanmar
MNMNGMongolia
MOMACMacau
MPMNPNorthern Mariana Islands
MRMRTMauritania
MSMSRMontserrat
MTMLTMalta
MUMUSMauritius
MVMDVMaldives
MWMWIMalawi
MXMEXMexico
MYMYSMalaysia
MZMOZMozambique
NANAMNamibia
NCNCLNew Caledonia
NENERNiger
NFNFKNorfolk Island
NGNGANigeria
NINICNicaragua
NLNLDNetherlands
NONORNorway
NPNPLNepal
NRNRUNauru
NUNIUNiue
NZNZLNew Zealand
OMOMNOman
PAPANPanama
PEPERPeru
PFPYFFrench Polynesia
PGPNGPapua New Guinea
PHPHLPhilippines
PKPAKPakistan
PLPOLPoland
PMSPMSaint Pierre and Miquelon
PNPCNPitcairn Islands
PRPRIPuerto Rico
PSPSEPalestine
PTPRTPortugal
PWPLWPalau
PYPRYParaguay
QAQATQatar
ROROURomania
RSSRBSerbia
RURUSRussia
RWRWARwanda
SASAUSaudi Arabia
SBSLBSolomon Islands
SCSYCSeychelles
SDSDNSudan
SESWESweden
SGSGPSingapore
SHSHNSaint Helena, Ascension and Tristan da Cunha
SISVNSlovenia
SKSVKSlovakia
SLSLESierra Leone
SMSMRSan Marino
SNSENSenegal
SOSOMSomalia
SRSURSuriname
SSSSDSouth Sudan
STSTPSão Tomé and Príncipe
SVSLVEl Salvador
SXSXMSint Maarten
SYSYRSyria
SZSWZEswatini
TCTCATurks and Caicos Islands
TDTCDChad
TFATFFrench Southern and Antarctic Lands
TGTGOTogo
THTHAThailand
TJTJKTajikistan
TLTLSTimor-Leste
TMTKMTurkmenistan
TNTUNTunisia
TOTONTonga
TRTURTürkiye
TTTTOTrinidad and Tobago
TWTWNTaiwan
TZTZATanzania
UAUKRUkraine
UGUGAUganda
USUSAUnited States
UYURYUruguay
UZUZBUzbekistan
VAVATVatican City
VCVCTSaint Vincent and the Grenadines
VEVENVenezuela
VGVGBBritish Virgin Islands
VIVIRUnited States Virgin Islands
VNVNMVietnam
VUVUTVanuatu
WFWLFWallis and Futuna
WSWSMSamoa
XKUNKKosovo
YEYEMYemen
ZAZAFSouth Africa
ZMZMBZambia
ZWZWEZimbabwe

Not on this map, refused by name: Antarctica (AQ), Caribbean Netherlands (BQ), Bouvet Island (BV), Cocos (Keeling) Islands (CC), Christmas Island (CX), French Guiana (GF), Gibraltar (GI), Guadeloupe (GP), Martinique (MQ), Réunion (RE), Svalbard and Jan Mayen (SJ), Tokelau (TK), Tuvalu (TV), United States Minor Outlying Islands (UM), Mayotte (YT).

US states map (51 states)
US states map: region is us-states
CodeAlso acceptedName
AK02Alaska
AL01Alabama
AR05Arkansas
AZ04Arizona
CA06California
CO08Colorado
CT09Connecticut
DC11District of Columbia
DE10Delaware
FL12Florida
GA13Georgia
HI15Hawaii
IA19Iowa
ID16Idaho
IL17Illinois
IN18Indiana
KS20Kansas
KY21Kentucky
LA22Louisiana
MA25Massachusetts
MD24Maryland
ME23Maine
MI26Michigan
MN27Minnesota
MO29Missouri
MS28Mississippi
MT30Montana
NC37North Carolina
ND38North Dakota
NE31Nebraska
NH33New Hampshire
NJ34New Jersey
NM35New Mexico
NV32Nevada
NY36New York
OH39Ohio
OK40Oklahoma
OR41Oregon
PA42Pennsylvania
RI44Rhode Island
SC45South Carolina
SD46South Dakota
TN47Tennessee
TX48Texas
UT49Utah
VA51Virginia
VT50Vermont
WA53Washington
WI55Wisconsin
WV54West Virginia
WY56Wyoming

Not on this map, refused by name: American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Puerto Rico (PR), United States Virgin Islands (VI).

Example

{
  "region": "world",
  "idKey": "country",
  "valueKey": "signups",
  "format": "number",
  "data": [
    { "country": "US", "signups": 412 },
    { "country": "GB", "signups": 138 },
    { "country": "DE", "signups": 96 },
    { "country": "IN", "signups": 87 },
    { "country": "CA", "signups": 64 },
    { "country": "BR", "signups": 41 },
    { "country": "AU", "signups": 33 },
    { "country": "JP", "signups": 19 }
  ]
}

Send it from your code

Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.

Next: Bar chart JSON format