Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Python/worldmap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
"""worldmap.ipynb

Automatically generated by Colaboratory.

Original file is located at
https://colab.research.google.com/drive/1Ule31aNs8dAJ4PHpgrsE0WefraXHSe76
"""

# import pygal library
import pygal

# create a world map
worldmap = pygal.maps.world.World()

# set the title of the map
worldmap.title = 'Countries'

# adding the countries
worldmap.add('Random Data', {
'aq' : 10,
'cd' : 30,
'de' : 40,
'eg' : 50,
'ga' : 45,
'hk' : 23,
'in' : 70,
'jp' : 54,
'nz' : 41,
'kz' : 32,
'us' : 66
})

# save into the file
worldmap.render_to_file('abc.svg')

print("Success")