Closed pkmn99 closed 7 years ago
I figured out how to do this. Just combine Ndoverlay objects of different years to holomap.
frequencies = [2000, 2010]
holomap = hv.HoloMap(kdims=['Frequency'])
temp = [map_2000, map_2010]
for i, frequency in enumerate(frequencies):
holomap[frequency] = temp[i]
Glad you found a solution!
Looking at your code, I believe it is also equivalent to this:
frequencies = [2000, 2010]
temp = [map_2000, map_2010]
hv.HoloMap({f:temp for f,temp in zip(frequencies, temp)} kdims=['Frequency'])
Hi jlstevens, many thanks for a simplified code! I am not very familiar with list comprehension and this is a good example for me to learn.
That said, I think there's probably something we can do to automate this within the Shape.from_shapefile
method as long as your dataframe contains information for different years. I'll think about it and get back to you.
Hi philippjfr, I've been thinking about the same thing. That would be perfect, exactly what it needs.
Is there a way to set color range for the choropleth created from shapefile? I have seen some strange problems. Not sure if they are bug, probably will open a new post to report it.
I am not sure if we can make a choropleth from shapefile with time dimension with geoviews right now. I could't find any info for this in the documentation. In the UK referendum example, (http://geo.holoviews.org/Geometries.html), can we use population over the years to make a similar map but with time change? This can be easily done with nefcdf data, this feature could be very useful for shape files as well.