LabMaps#
Note
By default, we query both HAL and LDB. Don’t hesitate to adapt depending on the use case.
Your first lab#
In GisMap, a LabMap is a class whose instances have three methods:
update_authorsautomatically refresh the members of the lab. It is useful at creation or when a lab evolves.update_publicationsmakes a full refresh of the publications of a lab. All publications from lab members are considered (temporal filtering may be enabled later).expandadds moons, i.e. additional researchers that gravitate around the lab.
The simplest usable subclass of Lab is ListMap, which uses a list of names. For example, consider the former team Gangsta from my Bell Labs days.
[9]:
from gismap.lab import ListMap
lab = ListMap(
author_list=[
"Fabien Mathieu",
"Philippe Jacquet",
"Alonso Silva",
"Anne Bouillard",
"François Durand (hal: fradurand, ldb:38/11269)",
"Amira Alloum",
"Marc-Olivier Buob",
"Mohamed Lamine Lamali (hal:mohamed-lamine-lamali, ldb: 43/11358)",
],
name="Gangsta",
)
lab.update_authors()
lab.update_publis()
len(lab.publications)
INFO:GisMap:Multiple entries for Philippe Jacquet in hal
INFO:GisMap:Multiple entries for Alonso Silva in hal
INFO:GisMap:Multiple entries for Anne Bouillard in hal
[9]:
533
Maps can be saved with the dump method so you don’t have to re-update them all the time.
When you have a populated lab, you can produce a standalone HTML of the collaboration graph with save_html. That graph is a standalone HTML that can be displayed in a notebook or saved for inclusion in a web page (e.g. with iframe).
You can also display it directly inside a notebook. Using options, you can perform some customization if you want:
[10]:
groups = {"Gangsta": {"color": "rgb(255, 0, 255)"}}
lab.show_html(groups=groups)
Let’s add some context with a few moons.
[11]:
lab.expand(target=4)
[12]:
groups["moon"] = {"display": "Usual Suspects", "color": "rgb(0,255,0)"}
lab.show_html(groups=groups)
Few things about the generated graph:
Authors are represented with their initials unless some picture url is provided (implicitly or explicitly).
Comets are singletons (authors with no co-publications with the other nodes). They are hidden by default. For example, if you only show the moons / usual suspects, Bernard becomes a comet and is hidden.
You can hover an author to get her name. If you click, you have a modal with the list of publications.
The width and length of an edge depend on the number of co-publications. If you click you have a modal with the list of co-publications.
How-to: Adding informal “publications”#
Since version 0.5.2, you can use the add_publication method to manually add publications to a lab. Author names are automatically resolved to known authors using fuzzy matching.
First we need to build a lab.
[13]:
from gismap.lab import ListMap
lab = ListMap(author_list=["Fabien Mathieu", "Céline Comte"], name="Dream Team")
lab.update_authors()
lab.update_publis()
Then we just call add_publication with a title and a list of author names. Known authors are matched automatically; unknown ones become Outsiders.
[14]:
lab.add_publication(
title="Informal discussions on GisMap",
authors=["Fabien Mathieu", "Céline Comte", "John Doe"],
year=2026,
venue="Zoom meetings",
)
lab.show_html()
Make your own LabMap#
GisMap is intended to make easy the creation of LabMaps in many contexts.
The easiest way to manage a lab, apart from using ListMaps as shown above, is to specify an internal method _author_iterator that returns Lab authors. When it’s done, you can create/refresh LabMaps as you see fit.
How the iterator works is 100% up to you. Most of the time, this is done by scrapping some Web page(s) (see the gallery for examples), but many other options exist, e.g. read authors from a file, from a LDAP…
For example, this is the entire code required for handling the Solace team.