geoplotlib
geoplotlib copied to clipboard
custom Heatmap style DotDensity layer
Hi 👋
I'm trying to create a visualisation in which the dots are all coloured according to a given variable, e.g. the price of an accommodation. Each dot should represent this price with a color mapped to a colormap.
Currently my approach is this:
...
for id in self.data['id']:
grp = self.data.where(self.data['id'] == id)
color = self.cmap.to_color(max('price'], 1), max_val, 'log')
self.painter.set_color(color)
x, y = proj.lonlat_to_screen(grp['lon'], grp['lat'])
self.painter.points(x, y, 5)
...
However, this is very inefficient and nearly freezes the visualisation... Do you have any proposal on how to do that @andrea-cuttone ?
Thank you very much Best Tim