VisJS network interface#
VisJS offers nice graph displays.
- gismap.gisgraphs.graph.author_html(author)[source]#
- Parameters:
author (
Author) – Searcher.- Return type:
HTML string with URL if applicable.
- gismap.gisgraphs.graph.lab_to_graph(lab)[source]#
- Parameters:
lab (
LabMap) – A lab populated with searchers and publications.- Returns:
Collaboration graph.
- Return type:
Examples
>>> from gismap.lab import ListMap as Map >>> lab = Map(author_list=['Tixeuil Sébastien', 'Mathieu Fabien'], name='mini', dbs="hal") >>> lab.update_authors() >>> lab.update_publis() >>> len(lab.authors) 2 >>> 330 < len(lab.publications) < 430 True >>> nodes, edges = lab_to_graph(lab) >>> nodes[0]['group'] 'mini' >>> edges[0]['hover'] 'Show joint publications from Mathieu Fabien and Tixeuil Sébastien' >>> html = lab.html(groups={"mini": {"color": "#777"}})
- gismap.gisgraphs.graph.pub_html(pub)[source]#
- Parameters:
pub (
Publication) – Publication.- Return type:
HTML string with hyperlinks where applicable.
- gismap.gisgraphs.graph.publications_list(publications, n=10)[source]#
- Parameters:
publications (
listofPublication) – 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:
ul
- class gismap.gisgraphs.widget.GismapWidget[source]#
A simple widget to test the production of LabMaps and EgoMaps.
Examples
This is a doctest example. Use a notebook to play with the widget.
>>> gw = GismapWidget() VBox(children=(HTML(value=''), Output(), HBox(children=(Textarea(value='', ... >>> gw.names.value = "Fabien Mathieu" >>> gw.dbs.value = "HAL" >>> gw.size.value = 3 >>> gw.compute_function(gw.compute, show=False) >>> gw.save_link.value[:30] "<a href='data:text/html;base64" >>> gw.names.value = "Diego Perino, Laurent Viennot" >>> gw.compute_function(gw.compute, show=False) >>> gw.save_link.value[:30] "<a href='data:text/html;base64"