Skip to content Skip to sidebar Skip to footer

How Do Kdims Work For Polygons In Geoviews?

I'm trying to understand how the kdims work for Polygon plots in geoviews. There is a similar question here but it hasn't really been answered - GeoViews: add a slider to chlorople

Solution 1:

I think you are looking for something like (see also here: https://nbviewer.jupyter.org/github/poplarShift/pyviz-recipes/blob/master/notebooks/data_formats.ipynb)

import geoviews as gv
import geopandas as gpd
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
import holoviews as hv
hv.extension('bokeh')

hv.Dataset(world, kdims=['Longitude', 'Latitude', 'continent'], vdims='pop_est').to(gv.Polygons)

Post a Comment for "How Do Kdims Work For Polygons In Geoviews?"