Selecting within complex shape


In the Gridded Dataset tutorial page (, it is specified that ROIs are often more complex polygons but for simplicity’s sake we will use simple rectangular ROIs specified as the left, bottom, right and top coordinate of a bounding box. Then I understand all the examples below, but I would like to select pixels of a time series of maps using shapes from a shapefile.

Currently, I have a 3D dataset (longitude, latitude and time for some values) and a shapefile that I read into a geoviews shape. I would like to average the values within the each of the shapes of the shapefile over time. I understand I should use the select and aggregate methods, but I cannot see how to get a complex shape into select and I could not find how to do this on the web.

Thank you very much for the help and thanks for Holoviz. I am new to this, but it is pretty awesome.