Brexit Choropleth#

Download this notebook from GitHub (right-click to download).


import pandas as pd
import geopandas as gpd
import geoviews as gv

gv.extension('bokeh')

Declaring data#

geometries = gpd.read_file('../../assets/boundaries/boundaries.shp')
referendum = pd.read_csv('../../assets/referendum.csv')
gdf = gpd.GeoDataFrame(pd.merge(geometries, referendum))

Plot#

gv.Polygons(gdf, vdims=['name', 'leaveVoteshare'], label='Brexit Referendum Vote').opts(
    tools=['hover'], width=550, height=700, color='leaveVoteshare',
    colorbar=True, toolbar='above', xaxis=None, yaxis=None)
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).