Closed davidwagner closed 5 years ago
There's no heatmap support in the mapping library we're using, as far as I can tell. You can draw a bunch of transparent circles, which gives a similar effect — opacity is a measure of concentration.
For example, the parcels of Berkeley vaguely look like a heat map:
I don't know if this helps, but here's heatmap.js integrated with Google Maps. http://www.crimeheatmap.ca/#
Thanks! Note to self: if I've got too much data for heatmap.js, I should also check out webgl-heatmap.
I skipped doing this for the privacy lecture, but it could be fun to show people how to construct a heatmap in a future semester and students might find it a helpful way to visualize data. Especially if it's just a method on Table (Table.heatmap('latitude', 'longitude')). So consider this a candidate enhancement to the datascience library for some unspecified point in the future. :-)
The latest version of folium has a heatmap plugin. I've tested it with a file of 23,000 points and it works well/fast. See attached zipfile for example. It would be great to upgrade to the newer version of folium. crime_heatmap.zip
Looks like datascience has a hard dependency on folium 0.1.5. @papajohn or @SamLau95, do you know if using folium 0.2.x would break datascience?
Probably, but we will just need to update datascience to use whatever interface changes have been published for folium since the previous version. I don't think it's a lot of work. Certainly we could get it done before August.
On Saturday, July 9, 2016, Ryan Lovett notifications@github.com wrote:
Looks like datascience has a hard dependency https://github.com/data-8/datascience/blob/master/requirements.txt#L1 on folium 0.1.5. @papajohn https://github.com/papajohn or @SamLau95 https://github.com/SamLau95, do you know if using folium 0.2.x would break datascience?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/data-8/datascience/issues/69#issuecomment-231569477, or mute the thread https://github.com/notifications/unsubscribe/AATikc0HjsimtijP-C8oohndOCTd4iUqks5qUG7jgaJpZM4F9N8l .
FYI attached is an example notebook & html file of a heatmap of 600,000 license plate reader points. It can also create a heatmap from 3 million points but slow to create and view in browser. licplate_heatmap.zip
With the benefit of time, this doesn't seem like a priority to me any more.
It would be nice if the Map class provided a way to overlay a heat map on top of a map: given a large collection of (lat,long) points (e.g., Markers), construct a heat map making it easy to visualize where the points are most concentrated.
Maybe there's an easy way by using the options provided, but I couldn't figure out how to do that from the public documentation. Maybe provide an API for this, or document how to do it? I bet this will be a useful thing for students -- and I'd like to use it for Friday lecture too.