Laboratory#
Management of a group of people and their publications is made with the LabMap abstract class.
LabMaps#
- class gismap.lab.labmap.LabMap(name=None, dbs=None)[source]#
Abstract class for labs.
Actual Lab classes can be created by implementing the _author_iterator method.
Labs can be saved with the dump method and loaded with the load method.
- Parameters:
- publication_selectors#
Publication filter. Default: less than 10 authors, not an editorial, at least two words in the title.
- Type:
- html(**kwargs)[source]#
Generate HTML representation of the collaboration graph.
- Parameters:
**kwargs – Passed to
make_vis().- Returns:
HTML content as a string.
- Return type:
- show_html(**kwargs)[source]#
Display the collaboration graph in a Jupyter notebook.
- Parameters:
**kwargs – Passed to
html().- Return type:
None
- update_authors(desc='Author information')[source]#
Populate the authors attribute (
dict[str,LabAuthor]).- Return type:
None
- update_publis(desc='Publications information')[source]#
Populate the publications attribute (
dict[str,SourcedPublication]).- Return type:
None
EgoMaps#
- class gismap.lab.egomap.EgoMap(star, *args, **kwargs)[source]#
Egocentric view of a researcher’s collaboration network.
Displays the star (central researcher), their planets (direct co-authors), and optionally moons (co-authors of co-authors).
- Parameters:
Examples
>>> dang = EgoMap("The-Dang Huynh") >>> dang.build(target=20) >>> sorted(a.name for a in dang.authors.values() if len(a.name.split())<3) ['Bruno Kauffmann', 'Diego Perino', 'Dohy Hong', 'Fabien Mathieu', 'François Baccelli',...]
Utilities#
Expansion#
- class gismap.lab.expansion.Member(name: str, key: str)[source]#
Basic information about a lab member for name matching.
- class gismap.lab.expansion.ProspectStrength(coauthors: int, publications: int)[source]#
Measures the interaction between an external author and a lab by counting co-authors and publications.
A (max,+) addition is handled to deal with multiple keys.
Examples
>>> a1 = ProspectStrength(3, 5) >>> a2 = ProspectStrength(2, 10) >>> a1 > a2 True >>> a1 + a2 ProspectStrength(coauthors=3, publications=15)
- gismap.lab.expansion.count_prospect_entries(lab)[source]#
Associate to external coauthors (prospects) their lab strength.
- Parameters:
lab (
LabMap) – Reference lab.- Returns:
Lab strengths.
- Return type:
dictofstrtoProspectStrength
- gismap.lab.expansion.proper_prospects(lab, length_impact=0.05, threshold=80, n_range=4, max_new=None, trim=True)[source]#
Find and rank external collaborators for potential lab expansion.
Identifies authors from publications who are not already lab members, groups them by name similarity, and ranks by collaboration strength.
- Parameters:
lab (
LabMap) – Reference lab.length_impact (
float, default=0.05) – Length impact for name similarity matching.threshold (
int, default=80) – Similarity threshold for grouping authors.n_range (
int, default=4) – N-gram range for name comparison.max_new (
int, optional) – Maximum number of new authors to return.trim (
bool, default=True) – If True, keep only one source per database for each author.
- Returns:
(existing, new_rosetta) where existing maps external keys to lab member keys, and new_rosetta maps source keys to new LabAuthor objects.
- Return type:
- gismap.lab.expansion.trim_sources(author)[source]#
Inplace reduction of sources, keeping one unique source per db.
- Parameters:
author (
SourcedAuthor) – An author.- Return type:
None
Filters#
- gismap.lab.filters.author_taboo_filter(w=None)[source]#
- Parameters:
w (
list, optional) – List of words to filter.- Returns:
Filter function on authors.
- Return type:
Callable
- gismap.lab.filters.publication_oneword_filter(n_min=2)[source]#
- Parameters:
n_min (int, default=2) – Minimum number of words required in the title.
- Returns:
Filter on number of words required in the title.
- Return type:
callable
- gismap.lab.filters.publication_size_filter(n_max=9)[source]#
- Parameters:
n_max (int, default=9) – Maximum number of co-authors allowed.
- Returns:
Filter on number of co-authors.
- Return type:
callable