Hotspot heatmap for event clusters

It would be interesting to plot event clusters for a family or ancestors or descendants or just a filter match result in form of a hotspot heatmap. Currently in the map view category the views only show markers for the events, but not the density of the event clusters. I think it would allow new and interesting ways to represent areas of interest or event clusters.

Sample picture of what I mean with a hotspot heatmap:

@SNoiraud You worked a lot on the map views, right? Do you know if this would be possible to implement/render in Gramps?

2 Likes

Good idea. This kind of plot of event clusters could allow to plot another kind of map like this one I’ve seen yesterday in a video from French Genealogy Federation (FFG) virtual symposium:


From: https://youtu.be/zG7PV1MuWog

It links ancient family event clusters to current clusters (industrial migration from countries to cities) viewing this only using big arrows between clusters (time logic).

2 Likes

Yes a combination of a heatmap and arrows added with GIMP/Photoshop would be a nice way to explain movements. I have researched some lines where I have already found most or all descendants. :slightly_smiling_face:

All is possible. The problems are the resources (developers, time, …)

Well I meant is it reasonable possible to create for Gramps? I don’t know which libraries could be used for that or already being used and would allow that. Like if everything would have to be created from scratch, it’s probably a better idea to create some export and use an external program, since nice maps are cool, but not the main focus of Gramps. :smile:

Just a tip for a workaround…

You might export the places to a CSV file, import them to SAGA (GIS) or QGIS, and create the map overlay there and save them in the right format for Gramps…

I don’t know if the module in Gramps read all of the settings from those files, but it should be possible?

2 Likes

Thank you for the tip. I’ll try that. :slightly_smiling_face:

The python package “folium” can create heat maps, optionally with time sliders. Here is an example.

The folium package is great, but I recognized a problem with the heat maps: They only show the density of places, not the density of the events. I tried to change the weight for the places depending on the number of events, but it seems to have no to very little effect.

I afraid I probably need chloropleth maps with devision on municipal or parish level to create what I was looking for, but it is much more difficult to get geodata for them as well as exporting the event places from my place hierarchy instead of using the coordinates.

My current workaround is using circle markers colored depending on the number of events.

3 Likes

Not an answer but a related usage of heatmaps

Geneanet have sent us a new blog post [fr] about names origin renewed function.

It use their database and leaflet to display family name distribution (2nd example) in space and time.

2 Likes

@PLegoux thanks for sharing. I love this feature from Geneanet and it is more or less the same what I’m trying to do, but I use ancestor and descendants branches instead of surname maps. The python package “folium” is also using leaflet for the heatmap generation.

1 Like

This is OT but note that the previous interface was much more precise for locations because the zoom on the map has been greatly reduced.

Best regards.

OT? Operational Technology?

Previous interface much precise: Sorry, I don’t remember it. After, by nature, a hotspot is not as precise as a spotted point on a map, it’s a zoning.
Note: This is why I like the @Mattkmmr workaround. It conciliate both.

“Out of topic” (sorry, im a little old school :slight_smile: ) as i was speaking about geneanet and not gramps.

I agree.

Best regards.

It seems all you want is not possible for the moment in the geography views. All the libraries you are speaking about are web site libraries. If you want to use them, the best way should be to write a web report including those libraries (leaflet, heatmap, folium based on javascript, cloropleth, …)

1 Like

It should be possible with matplotlib…?

or maybe rather with Cartopy?

If you use matplotlib, you need at least 8MB of libraries and if you use cartopy, you needs also matplotlib, so the gramps package will grow aproximately 16MB for windows and mac users.
It’s difficult to add more libraries to gramps. the gramps package is already very big. (100MB for macs and 65MB for windows)
Linux is better managed for that.
matplotlib use its own maps.
cartopy can use some other maps (stamen, osm, google …), but I don’t know how to integrate it into the geography views with the osm-gps-map library. I needs to look at this.

Check if matplotlib already are included, I think Nick told me something like that a while back when I asked if there was possible to use som other library for some feature… but don’t remember…

I’m no developer, so the only thing I can contribute with are ideas and tips of things I have found when searching for apps an tools…

But I do understand that not everything are possible without a lot of rewrite, time and effort…

Does 65 or even 100MB really an issue in 2020?
If Gramps includes python is there pip too? why not using pip to install needed libraries not included in gramps distribution while installing gramps or gramplets?

1 Like

Perhaps for you it’s not a problem. Some people have old computers with small bandwith network, so it is a problem.
We already had a request for opencv which is very big, webkit which is also very big. If we accept all those libraries, gramps will be over 500MB. And I think we don’t want that.
The best way is to use Linux: gramps is only 6MB in size. All libraries are available and have no dependencies problem.

3 Likes