World Population#
Download this notebook from GitHub (right-click to download).
import pandas as pd
import geoviews as gv
from geoviews import dim
gv.extension('matplotlib')
gv.output(fig='svg', size=200)
Define data#
cities = pd.read_csv('../../assets/cities.csv', encoding="ISO-8859-1")
population = gv.Dataset(cities, kdims=['City', 'Country', 'Year'])
points = population.to(gv.Points, ['Longitude', 'Latitude'], ['Population', 'City', 'Country'])
tiles = gv.tile_sources.OSM
Plot#
tiles.opts(zoom=0) * points.opts(
s=dim('Population')*0.00001, color='Population', cmap='viridis', global_extent=True)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.
Download this notebook from GitHub (right-click to download).