World Map
Pygal's geo-visualization toolkit contains world maps and French-specific maps that offer interesting ways of visualization geo-statistics. Countries and continents are encoded with specific alphabets and names to map countries to the world map canvas.
This example demonstrates the mapping of the world by continents.
continents = { 'Africa' : [ ('africa', 1)], 'Asia': [('asia', 1)], 'Europe': [('europe', 1)],
'North America': [('north_america'), 1], 'South America': [ ('south_america', 1)],
'Antartica' : [('antartica', 1)], 'Oceania' : [('oceania', 1)] }
continents
You may encounter an error if the package
import pygal
world_map = pygal.maps.world.SupranationalWorld()
for v in continents.items():
world_map.add( v[0], v[1])
world_map.render_in_browser()