Laboratory#

Management of a group of people and their publications is made with the Lab abstract class.

class gismap.lab.lab.AuthorMetadata(url: str = None, img: str = None, group: str = None, position: tuple = None)[source]#

Optional information about an author to be used to enhance her presentation.

url#

Homepage of the author.

Type:

str

img#

Url to a picture.

Type:

str

group#

Group of the author.

Type:

str

position#

Coordinates of the author.

Type:

tuple

class gismap.lab.lab.Lab(name=None, dbs=None)[source]#

Abstract class for labs.

Labs can be saved with the dump method and loaded with the load method.

Parameters:
  • name (str) – Name of the lab. Can be set as class or instance attribute.

  • dbs (list, default=[HAL, DBLP]) – List of DB sources to use.

update_authors()[source]#

Populate the authors attribute (dict [str, LabAuthor]).

Return type:

None

update_publis()[source]#

Populate the publications attribute (dict [str, SourcedPublication]).

Return type:

None

class gismap.lab.lab.LabAuthor(name: str, sources: list = <factory>, metadata: gismap.lab.lab.AuthorMetadata = <factory>)[source]#
auto_sources(dbs=None)[source]#

Automatically populate the sources based on author’s name.

Parameters:

dbs (list, default=[HAL, DBLP]) – List of DB sources to use.

Return type:

None

class gismap.lab.lab.ListLab(author_list, *args, **kwargs)[source]#

Simplest way to create a lab: with a list of names.

Parameters:
  • author_list (list of str) – List of authors names.

  • args (list) – Arguments to pass to the Lab constuctor.

  • kwargs (dict) – Keyword arguments to pass to the Lab constuctor.

Collaboration graph#

gismap.lab.graph.author_to_html(author)[source]#
Parameters:

author (Author) – Searcher.

Return type:

HTML string with URL if applicable.

gismap.lab.graph.initials(name)[source]#
Parameters:

name (str) – Person’s name.

Returns:

Person’s initials (2 letters only).

Return type:

str

gismap.lab.graph.lab2graph(lab)[source]#
Parameters:

lab (Lab) – A lab populated with searchers and publications.

Returns:

Collaboration graph.

Return type:

str

Examples

>>> from gismap.lab import ListLab
>>> lab = ListLab(author_list=['Tixeuil Sébastien', 'Mathieu Fabien'], name='mini')
>>> lab.update_authors()
>>> lab.update_publis()
>>> len(lab.authors)
2
>>> len(lab.publications)
435
>>> html = lab2graph(lab)
>>> html[:80]  
'\n<div id="mynetwork_..."></div>\n<div id="modal_..." class="modal">\n  <'
gismap.lab.graph.publication_to_html(pub)[source]#
Parameters:

pub (Publication) – Publication.

Return type:

HTML string with hyperlinks where applicable.

gismap.lab.graph.publications_list_html(publications, n=10)[source]#
Parameters:
  • publications (list of Publication) – Publications to display.

  • n (int, default=10) – Number of publications to display. If there are more publications, a Show more option is available to unravel them.

Return type:

str

gismap.lab.graph.to_edge(k, v, searchers)[source]#
Parameters:
  • k (tuple) – Keys of the searchers involved.

  • v (list) – List of joint publications.

  • searchers (dict) – Searchers.

Returns:

A display-ready representation of the collaboration edge.

Return type:

dict

gismap.lab.graph.to_node(s, node_pubs)[source]#
Parameters:
  • s (LabAuthor) – Searcher.

  • node_pubs (dict) – Lab publications.

Returns:

A display-ready representation of the searcher.

Return type:

dict

LIP6#

class gismap.lab.lip6.Lip6(name=None, dbs=None)[source]#

Class for handling all LIP6 teams using https://www.lip6.fr/informations/annuaire.php to get team names.

class gismap.lab.lip6.Lip6Lab(name=None, dbs=None)[source]#

Class for handling a LIP6 team using https://www.lip6.fr/recherche/team_membres.php?acronyme=*team_acronym* as entry point. Default to NPA team.

Toulouse#

class gismap.lab.toulouse.LaasLab(name=None, dbs=None)[source]#

Class for handling a LAAS team from its name. Default to sara team.

class gismap.lab.toulouse.Solace(name=None, dbs=None)[source]#

Class for handling the Solace team (https://solace.cnrs.fr).

Vis#

gismap.lab.vis.generate_html(nodes, edges)[source]#
Parameters:
Return type:

str