Monday, 6 July 2026

Creating World Map Visualizations in Apache Superset

  

A World Map visualization is a geographic chart used to display data across countries or regions on a map of the world. It helps users quickly understand global patterns, regional differences, and geographic trends by visually representing values using colors, bubbles, gradients, or markers.

 

In tools like Apache Superset, world maps are commonly used for:

 

·      Population analysis

·      Sales by country

·      GDP comparison

·      Internet usage statistics

·      Climate and environmental data

·      Business expansion tracking

·      Healthcare and demographic studies

 

Instead of reading rows in a table, users can immediately identify:

 

·      Which countries have higher values

·      Which regions dominate globally

·      Geographic clusters and trends

·      Comparisons between continents

 

For example:

·      India and China may appear darker because of larger populations

·      Smaller countries may appear lighter

 

Understanding the Dataset for World Map Visualization

In this tutorial, we will use a global population dataset containing country-wise demographic and economic information.

 

countries_population.csv

country,continent,population_2020,population_2021,population_2022,population_2023,gdp_billions,urbanization_percent
India,Asia,1380004385,1393409038,1406631776,1428627663,3385,36
China,Asia,1439323776,1444216107,1425887337,1425671352,17700,65
United States,North America,331002651,331893745,333287557,339996563,26854,83
Indonesia,Asia,273523615,276361783,279134505,281190067,1389,58
Pakistan,Asia,220892340,225199937,231402117,240485658,376,38
Brazil,South America,212559417,214326223,215313498,216422446,2126,87
Nigeria,Africa,206139589,211400708,216746934,223804632,477,54
Bangladesh,Asia,164689383,166303498,169384897,172954319,460,40
Russia,Europe,145934462,145102755,144713314,144444359,2240,75
Mexico,North America,128932753,130262216,131562772,132639429,1810,81
Japan,Asia,125836021,125681593,124947156,123294513,4231,92
Ethiopia,Africa,114963588,117876227,120812698,126527060,156,22
Philippines,Asia,109581078,111046913,112508994,117337368,437,48
Egypt,Africa,102334404,104258327,106156692,112716598,398,43
Vietnam,Asia,97338579,98168829,99460895,100300000,430,39
Germany,Europe,83783942,83129285,83369843,83294633,4456,78
Turkey,Asia,84339067,84680273,85341241,85816199,1154,77
Iran,Asia,83992949,85028759,86022837,89172767,388,76
Thailand,Asia,69799978,69950850,70178203,71801279,548,52
United Kingdom,Europe,67886011,68207114,68497907,69108652,3340,84
France,Europe,65273511,65426179,65584518,64756584,3052,81
Italy,Europe,60461826,60367477,59037474,58870763,2190,71
South Africa,Africa,59308690,60041996,60756135,62378434,406,68
South Korea,Asia,51269185,51744876,51815810,51784059,1721,82
Spain,Europe,46754778,47351567,47558630,48373336,1580,81
Canada,North America,37742154,38246108,38929902,40097761,2140,82
Argentina,South America,45195774,45510318,46234830,45773884,633,92
Australia,Oceania,25499884,25687041,26068792,26638544,1690,86
Saudi Arabia,Asia,34813871,35340680,36408820,36947025,1108,85
Ukraine,Europe,43733762,43531422,39701739,36744634,160,69
Algeria,Africa,43851044,44616624,44903225,45606480,191,74
Sudan,Africa,43849260,44909381,46874204,48109006,51,35
Iraq,Asia,40222493,41179350,44496122,45504560,264,71
Afghanistan,Asia,38928346,40099462,41128771,42239854,20,27
Poland,Europe,37846611,37797005,37740001,36687353,842,60
Morocco,Africa,36910560,37344795,37457971,37840044,142,65
Uzbekistan,Asia,33469203,33935763,34627652,35504464,91,50
Malaysia,Asia,32365999,32776194,33181072,34308525,434,78
Peru,South America,32971854,33359416,34049588,34352719,242,79
Angola,Africa,32866272,33933611,35588987,36684202,107,68
Ghana,Africa,31072940,31732129,33475870,34121985,76,58
Nepal,Asia,29136808,29425063,30547580,30896590,41,21
Yemen,Asia,29825964,30490640,33696614,34449825,21,39
Mozambique,Africa,31255435,32163047,32969518,33897354,20,38
Madagascar,Africa,27691018,28427333,29611714,30325732,16,39
Cameroon,Africa,26545863,27224262,27914536,28647293,48,59
Sri Lanka,Asia,21413249,21522230,21832143,22037000,84,19
Netherlands,Europe,17134872,17441139,17564014,17947684,1010,92
Chile,South America,19116201,19458310,19603733,19629590,317,88
Romania,Europe,19237691,19186201,19047009,18971626,350,55
Kazakhstan,Asia,18776707,19009200,19397998,19860614,261,58
Kenya,Africa,53771296,55100586,56215221,57340300,113,29
Portugal,Europe,10196709,10297081,10305564,10247605,287,67
Greece,Europe,10423054,10370744,10384971,10341277,238,80
Sweden,Europe,10099265,10415811,10549347,10612086,603,88
Norway,Europe,5421241,5451270,5502037,5547683,579,83
Finland,Europe,5540720,5536146,5540745,5563970,305,86
Denmark,Europe,5792202,5813298,5834950,5910913,406,88
New Zealand,Oceania,4822233,4898203,5125971,5228100,249,87
Singapore,Asia,5850342,5896686,5941060,6014723,501,100
United Arab Emirates,Asia,9890402,9991089,10081785,10206200,509,87
Qatar,Asia,2881053,2930528,2979915,2716391,235,99

   

The dataset includes:

·      Country names

·      Continents

·      Population data from 2020 to 2023

·      GDP values in billions

·      Urbanization percentages

 

This type of dataset is ideal for geographic visualization because each row represents a country that can be plotted directly on a world map.

 

Using Apache Superset’s World Map chart, we can visually analyze:

 

·      Which countries have the highest populations

·      Population distribution across continents

·      Economic strength using GDP metrics

·      Urbanization differences between nations

 

Follow below step-by-step procedure to build the World Map in Superset.

 

Step 1: Create countries_population_demo dataset.

 

Data -> Upload CSV to database

 


Upload the csv file.

Choose database and schema name where you want to upload the file.

Set the table name to countries_population_demo

 


Click on Upload button to create the dataset.

 

Navigate to Datasets listing page, you can able to see that the countries_application_demo dataset .

 


Step 2: Create World Map chart.

Click on countries_population_demo dataset. You will be taken to Chart overview page.

 


Click on ‘View all charts’ link.

 

   

Select World Map.

 

Drag and drop country to Country column.

Drag and drop population_2020 to the Metric section and select SUM as aggregate.

Click on Create chart button.

 


It creates World Map like below.

 


Now you can see all the countries displayed with their population data when you hover over them. Countries with larger populations appear in darker or more intense colors.

 

Expand Options -> select ‘Show Bubbles’. Set the bubble size to population_2020 column, set the aggregate as SUM.

 


Click on Update chart button, you can able to see the World Map with bubbles now.

 

   

This dual encoding, using both color and bubble size, makes the differences in population even more visually clear.

 

Set the bubble size to 10 and update the chart.

 


Select Color by Country option.

 

Click on Update chart button, you can able to see the chart rendered like below.

 

   

That’s it, you're good to go.

 


 

  

Previous                                                    Next                                                    Home

No comments:

Post a Comment