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('bokeh')
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 * points.opts(
color='Population', cmap='viridis', size=dim('Population')*0.000001,
tools=['hover'], global_extent=True, width=600, height=600)
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).