I’m trying to create a GridSpace of chloropleths with background tiles (from open street maps). Basically, I want a bunch of grid of maps where the rows are different modeled parameters, the columns are the model year, and the polygons on the map are colored by the parameter value. And I want a tile underneath it to help users understand where they are looking it. Everything works well, until I try to add the tiles underneath. I’m getting the error AttributeError: unexpected attribute 'source' to TileRenderer, similar attributes are tile_source
Is this a bug, a known incompatibility with tiles and Gridspaces, or something I’m just doing wrong.
Here’s what I’m doing:
def plot_inner_polygons(basin_size, impairment_criterion, nutrient, lu_source, col):
# do some data selection
return gv.Polygons(year_data, vdims=["HUC Name", col]).opts(
# some formatting options
)
def plot_outer_polygons(basin_size):
# other data selection
return gv.Polygons(year_data, vdims=["HUC Name", col]).opts(
# some different formatting options
)
# make the chloropleths
for basin_size in ["NJ HUC14", "HUC12"]:
for impairment_criterion in ["Mean Annual Concentration", "Loading Rates"]:
for col in [
"value",
"Impaired",
]:
conc_grid_dict = {}
for nutrient in nutrients.values():
for lu_source in land_uses_to_plot:
conc_grid_dict[lu_source, nutrient] = plot_inner_polygons(
basin_size, impairment_criterion, nutrient, lu_source, col
) * plot_outer_polygons(basin_size) * gts.OSM.opts(alpha=0.20)
conc_holomap = hv.HoloMap(conc_grid_dict, kdims=[lu_dim, nutrient_dim])
conc_grid = hv.GridSpace(conc_holomap).opts(title=title)