,geometry,total_num,color
0,"MULTILINESTRING ((13.34929 52.45899, 13.34926 52.45915))",2,#ffec00
1,"MULTILINESTRING ((13.32781 52.42269, 13.3293 52.42307))",7,#ffc900
2,"MULTILINESTRING ((13.34553 52.46091, 13.34538 52.46104, 13.34523 52.46116, 13.34508 52.46128, 13.345 52.46133))",88,#ff8100
3,"MULTILINESTRING ((13.31257 52.46296, 13.31311 52.46356))",18,#ffae00
4,"MULTILINESTRING ((13.33764 52.45941, 13.33765 52.46027))",7,#ffc900
5,"MULTILINESTRING ((13.3401 52.44393, 13.33999 52.44401, 13.33992 52.44405, 13.33988 52.44406, 13.3397 52.44413, 13.33951 52.4442, 13.3393 52.44428, 13.33902 52.44437))",258,#ff6300
The sample data is as shown above. I wish to visualize this data on a map using geoviews and the color of the line string should be the value from color column. Currently, I have calculated the color value using the code snippet:
color_value = math.log2( max(total_num, 0.1) )
c = colormap(color_value)
Also, not sure if it’s possible to show the data for total_num on hover of the linestring.
Could you please help?
Update: I tried plotting this with geoviews and was able to plot with the below snippet:
paths = gv.Path(gdf, vdims=['total_num', 'color']).opts(opts.Path(tools=['hover'], color='color'))
Now, I am facing an issue with scaling this solution? It is able to plot quickly for a few records (around 100-200). But, fails to plot records around 30K?
Any solution would be quite helpful