gismap 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gismap-0.2.0/.gitattributes +1 -0
- {gismap-0.1.0 → gismap-0.2.0}/.github/workflows/build.yml +2 -1
- {gismap-0.1.0 → gismap-0.2.0}/.github/workflows/docs.yml +3 -1
- {gismap-0.1.0 → gismap-0.2.0}/.github/workflows/release.yml +2 -1
- gismap-0.2.0/HISTORY.md +24 -0
- {gismap-0.1.0 → gismap-0.2.0}/PKG-INFO +3 -1
- {gismap-0.1.0 → gismap-0.2.0}/docs/conf.py +11 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/reference/lab.md +7 -0
- gismap-0.2.0/docs/tutorials/egomap.ipynb +218 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/tutorials/index.md +1 -0
- gismap-0.2.0/docs/tutorials/lab_tutorial.ipynb +327 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/__init__.py +2 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/lab/__init__.py +2 -2
- gismap-0.2.0/gismap/lab/egomap.py +42 -0
- gismap-0.2.0/gismap/lab/expansion.py +240 -0
- gismap-0.2.0/gismap/lab/filters.py +18 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/lab/graph.py +10 -7
- gismap-0.2.0/gismap/lab/lab.py +168 -0
- gismap-0.2.0/gismap/lab/lab_author.py +84 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/lab/lip6.py +2 -1
- {gismap-0.1.0 → gismap-0.2.0}/gismap/lab/toulouse.py +2 -1
- {gismap-0.1.0 → gismap-0.2.0}/gismap/lab/vis.py +164 -24
- {gismap-0.1.0 → gismap-0.2.0}/gismap/sources/dblp.py +26 -22
- {gismap-0.1.0 → gismap-0.2.0}/gismap/sources/hal.py +47 -11
- {gismap-0.1.0 → gismap-0.2.0}/gismap/sources/multi.py +68 -31
- gismap-0.2.0/gismap/utils/common.py +105 -0
- gismap-0.2.0/gismap/utils/requests.py +46 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/utils/text.py +66 -1
- {gismap-0.1.0 → gismap-0.2.0}/pyproject.toml +3 -1
- gismap-0.2.0/uv.lock +2215 -0
- gismap-0.1.0/HISTORY.md +0 -15
- gismap-0.1.0/docs/tutorials/lab_tutorial.ipynb +0 -800
- gismap-0.1.0/gismap/lab/lab.py +0 -152
- gismap-0.1.0/gismap/utils/common.py +0 -60
- gismap-0.1.0/gismap/utils/requests.py +0 -33
- gismap-0.1.0/uv.lock +0 -1954
- {gismap-0.1.0 → gismap-0.2.0}/.coveragerc +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/.editorconfig +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/.github/ISSUE_TEMPLATE.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/.gitignore +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/.run/All tests.run.xml +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/.run/Generate docs.run.xml +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/AUTHORS.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/CONTRIBUTING.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/README.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/citation.cff +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/favicon.ico +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/index.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/logo.png +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/authors.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/contributing.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/history.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/index.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/installation.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/presentation/readme.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/reference/database.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/reference/gismo.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/reference/index.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/docs/reference/utils.md +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/author.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/gismap.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/gismo.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/search.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/sources/__init__.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/sources/models.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/utils/__init__.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/gismap/utils/logger.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/tests/__init__.py +0 -0
- {gismap-0.1.0 → gismap-0.2.0}/tests/test_gismap.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb filter=nbstripout
|
|
@@ -17,6 +17,7 @@ env:
|
|
|
17
17
|
jobs:
|
|
18
18
|
build:
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
|
+
timeout-minutes: 30
|
|
20
21
|
strategy:
|
|
21
22
|
matrix:
|
|
22
23
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
@@ -33,7 +34,7 @@ jobs:
|
|
|
33
34
|
- name: Set up uv
|
|
34
35
|
uses: astral-sh/setup-uv@v5
|
|
35
36
|
with:
|
|
36
|
-
version: "0.
|
|
37
|
+
version: "0.8.12"
|
|
37
38
|
|
|
38
39
|
- name: Run tests
|
|
39
40
|
run: |
|
|
@@ -12,12 +12,14 @@ on:
|
|
|
12
12
|
jobs:
|
|
13
13
|
build-and-deploy:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 30
|
|
15
16
|
steps:
|
|
16
17
|
|
|
17
18
|
- name: Checkout
|
|
18
19
|
uses: actions/checkout@v4
|
|
19
20
|
with:
|
|
20
21
|
persist-credentials: false
|
|
22
|
+
lfs: true
|
|
21
23
|
|
|
22
24
|
- name: Set up Python
|
|
23
25
|
uses: actions/setup-python@v5
|
|
@@ -27,7 +29,7 @@ jobs:
|
|
|
27
29
|
- name: Set up uv
|
|
28
30
|
uses: astral-sh/setup-uv@v5
|
|
29
31
|
with:
|
|
30
|
-
version: "0.
|
|
32
|
+
version: "0.8.12"
|
|
31
33
|
|
|
32
34
|
- name: Setup Pandoc
|
|
33
35
|
uses: pandoc/actions/setup@v1
|
|
@@ -8,6 +8,7 @@ jobs:
|
|
|
8
8
|
publish:
|
|
9
9
|
name: Publish Python Package
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
timeout-minutes: 30
|
|
11
12
|
environment:
|
|
12
13
|
name: pypi
|
|
13
14
|
permissions:
|
|
@@ -20,7 +21,7 @@ jobs:
|
|
|
20
21
|
- name: Install uv
|
|
21
22
|
uses: astral-sh/setup-uv@v5
|
|
22
23
|
with:
|
|
23
|
-
version: "0.
|
|
24
|
+
version: "0.8.12" # Pin to specific uv version
|
|
24
25
|
|
|
25
26
|
- name: Build package
|
|
26
27
|
run: uv build --no-sources # Recommended for production builds
|
gismap-0.2.0/HISTORY.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# History
|
|
2
|
+
|
|
3
|
+
## Roadmap
|
|
4
|
+
|
|
5
|
+
- Offline DBLP
|
|
6
|
+
- Customized collaboration graphs
|
|
7
|
+
- Colors and size
|
|
8
|
+
- Groups
|
|
9
|
+
|
|
10
|
+
## 0.2.0 (2025-08-31): EgoMaps!
|
|
11
|
+
|
|
12
|
+
- New lab structure: EgoMap, an auto-lab that revolves around you!
|
|
13
|
+
- New lab method: expansion, which adds *moons* (neighbor reasearchers).
|
|
14
|
+
- Add filters when building authors and publications.
|
|
15
|
+
- Physic engine changed fo better visualization.
|
|
16
|
+
- Multi-source handling fine-tuned.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 0.1.0 (2025-07-24): First release
|
|
20
|
+
|
|
21
|
+
- First release on PyPI.
|
|
22
|
+
- Online DBLP and HAL DB implemented.
|
|
23
|
+
- Lab stuctures implemented.
|
|
24
|
+
- Early version of collaboration graph available.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gismap
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: GISMAP leverages DBLP and HAL databases to provide cartography tools for you and your lab.
|
|
5
5
|
Project-URL: Repository, https://github.com/balouf/gismap
|
|
6
6
|
Project-URL: Documentation, https://balouf.github.io/gismap
|
|
@@ -11,6 +11,8 @@ License-File: AUTHORS.md
|
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Requires-Dist: bof>=0.3.5
|
|
13
13
|
Requires-Dist: gismo>=0.5.2
|
|
14
|
+
Requires-Dist: ipykernel>=6.30.1
|
|
15
|
+
Requires-Dist: tqdm>=4.67.1
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
|
|
16
18
|
# Generic Information Search: Mapping and Analysis of Publications
|
|
@@ -45,6 +45,17 @@ extensions = [
|
|
|
45
45
|
"sphinx.ext.githubpages",
|
|
46
46
|
]
|
|
47
47
|
|
|
48
|
+
# Remote NB execution
|
|
49
|
+
nbsphinx_execute = 'always'
|
|
50
|
+
nbsphinx_execute_arguments = [
|
|
51
|
+
"--InlineBackend.figure_formats={'svg', 'pdf'}"
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
def setup(app):
|
|
55
|
+
app.add_css_file("https://unpkg.com/vis-network/styles/vis-network.min.css")
|
|
56
|
+
app.add_js_file("https://unpkg.com/vis-network/standalone/umd/vis-network.min.js")
|
|
57
|
+
|
|
58
|
+
|
|
48
59
|
# Smart code copy
|
|
49
60
|
copybutton_exclude = ".linenos, .gp, .go"
|
|
50
61
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "0",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"# EgoMap"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"cell_type": "markdown",
|
|
13
|
+
"id": "1",
|
|
14
|
+
"metadata": {},
|
|
15
|
+
"source": [
|
|
16
|
+
"Every researcher is the center of her own universe. With EgoMaps, everyone can visualize that universe!\n",
|
|
17
|
+
"\n",
|
|
18
|
+
"Concretely, your EgoMap is a co-publication graph containing:\n",
|
|
19
|
+
"\n",
|
|
20
|
+
"- The *sun*, i.e. you, the center of the universe\n",
|
|
21
|
+
"- The *planets*, i.e. your co-authors\n",
|
|
22
|
+
"- The *moons*, e.g. the co-authors of your co-authors\n",
|
|
23
|
+
"\n",
|
|
24
|
+
"By default, EgoMaps comprise up to 50 researchers, selecting first planets, then moons."
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"cell_type": "markdown",
|
|
29
|
+
"id": "2",
|
|
30
|
+
"metadata": {},
|
|
31
|
+
"source": [
|
|
32
|
+
"## Simple case"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"cell_type": "markdown",
|
|
37
|
+
"id": "3",
|
|
38
|
+
"metadata": {},
|
|
39
|
+
"source": [
|
|
40
|
+
"For basic scenarios, you just need to enter the name of the researcher. For example:"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"cell_type": "code",
|
|
45
|
+
"execution_count": null,
|
|
46
|
+
"id": "4",
|
|
47
|
+
"metadata": {},
|
|
48
|
+
"outputs": [],
|
|
49
|
+
"source": [
|
|
50
|
+
"from gismap.lab import EgoMap as Map\n",
|
|
51
|
+
"celine = Map(\"Céline Comte\")\n",
|
|
52
|
+
"celine.build()"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"cell_type": "markdown",
|
|
57
|
+
"id": "5",
|
|
58
|
+
"metadata": {},
|
|
59
|
+
"source": [
|
|
60
|
+
"You can display your EgoMap with `show_html` and save it with `save_html`"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"cell_type": "code",
|
|
65
|
+
"execution_count": null,
|
|
66
|
+
"id": "6",
|
|
67
|
+
"metadata": {},
|
|
68
|
+
"outputs": [],
|
|
69
|
+
"source": [
|
|
70
|
+
"celine.show_html()"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"cell_type": "markdown",
|
|
75
|
+
"id": "7",
|
|
76
|
+
"metadata": {},
|
|
77
|
+
"source": [
|
|
78
|
+
"## Adjusting the size"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"cell_type": "markdown",
|
|
83
|
+
"id": "8",
|
|
84
|
+
"metadata": {},
|
|
85
|
+
"source": [
|
|
86
|
+
"Depending on your degree, you may want to adjust the size of your universe with `target`."
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"cell_type": "code",
|
|
91
|
+
"execution_count": null,
|
|
92
|
+
"id": "9",
|
|
93
|
+
"metadata": {},
|
|
94
|
+
"outputs": [],
|
|
95
|
+
"source": [
|
|
96
|
+
"fabien = Map(\"Fabien Mathieu\")\n",
|
|
97
|
+
"fabien.build(target=70)"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"cell_type": "code",
|
|
102
|
+
"execution_count": null,
|
|
103
|
+
"id": "10",
|
|
104
|
+
"metadata": {},
|
|
105
|
+
"outputs": [],
|
|
106
|
+
"source": [
|
|
107
|
+
"fabien.show_html()"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"cell_type": "markdown",
|
|
112
|
+
"id": "11",
|
|
113
|
+
"metadata": {},
|
|
114
|
+
"source": [
|
|
115
|
+
"## Using specific DBs"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"cell_type": "markdown",
|
|
120
|
+
"id": "12",
|
|
121
|
+
"metadata": {},
|
|
122
|
+
"source": [
|
|
123
|
+
"You can specify the DB(s) you want to use. For example, if you are a French researcher not working in computer science, HAL is enough."
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"cell_type": "code",
|
|
128
|
+
"execution_count": null,
|
|
129
|
+
"id": "13",
|
|
130
|
+
"metadata": {},
|
|
131
|
+
"outputs": [],
|
|
132
|
+
"source": [
|
|
133
|
+
"mathilde = Map(\"Mathilde Labbé\", dbs=\"hal\")\n",
|
|
134
|
+
"mathilde.sun.metadata.img = \"https://0.academia-photos.com/282997/7894577/15068468/s200_mathilde.labbe.jpg\"\n",
|
|
135
|
+
"mathilde.build(target=25)"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"cell_type": "code",
|
|
140
|
+
"execution_count": null,
|
|
141
|
+
"id": "14",
|
|
142
|
+
"metadata": {},
|
|
143
|
+
"outputs": [],
|
|
144
|
+
"source": [
|
|
145
|
+
"mathilde.show_html()"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"cell_type": "markdown",
|
|
150
|
+
"id": "15",
|
|
151
|
+
"metadata": {},
|
|
152
|
+
"source": [
|
|
153
|
+
"## Filtering"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"cell_type": "markdown",
|
|
158
|
+
"id": "16",
|
|
159
|
+
"metadata": {},
|
|
160
|
+
"source": [
|
|
161
|
+
"EgoMaps have default filters that try to prevent data pollution. For example, it filters out:\n",
|
|
162
|
+
"\n",
|
|
163
|
+
"- Publications with too many authors. They are usually not relevant in fields like computer science.\n",
|
|
164
|
+
"- Publications that look like editorials.\n",
|
|
165
|
+
"\n",
|
|
166
|
+
"Filters can customized. \n",
|
|
167
|
+
"For example, this publication about horse locomotion is wrongly referenced in DBLP:\n",
|
|
168
|
+
"https://dblp.org/rec/journals/sensors/PasquietBTDDF22.html\n",
|
|
169
|
+
"\n",
|
|
170
|
+
"It can be discarded by ignoring all publications about horses."
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"cell_type": "code",
|
|
175
|
+
"execution_count": null,
|
|
176
|
+
"id": "17",
|
|
177
|
+
"metadata": {},
|
|
178
|
+
"outputs": [],
|
|
179
|
+
"source": [
|
|
180
|
+
"from gismap.lab.filters import publication_taboo_filter\n",
|
|
181
|
+
"fanfan = Map(fabien.authors['fradurand'])\n",
|
|
182
|
+
"fanfan.publication_selectors.append(publication_taboo_filter(\"Horse\"))\n",
|
|
183
|
+
"fanfan.build(target=25)"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"cell_type": "code",
|
|
188
|
+
"execution_count": null,
|
|
189
|
+
"id": "18",
|
|
190
|
+
"metadata": {},
|
|
191
|
+
"outputs": [],
|
|
192
|
+
"source": [
|
|
193
|
+
"fanfan.show_html()"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"metadata": {
|
|
198
|
+
"kernelspec": {
|
|
199
|
+
"display_name": "Python 3 (ipykernel)",
|
|
200
|
+
"language": "python",
|
|
201
|
+
"name": "python3"
|
|
202
|
+
},
|
|
203
|
+
"language_info": {
|
|
204
|
+
"codemirror_mode": {
|
|
205
|
+
"name": "ipython",
|
|
206
|
+
"version": 3
|
|
207
|
+
},
|
|
208
|
+
"file_extension": ".py",
|
|
209
|
+
"mimetype": "text/x-python",
|
|
210
|
+
"name": "python",
|
|
211
|
+
"nbconvert_exporter": "python",
|
|
212
|
+
"pygments_lexer": "ipython3",
|
|
213
|
+
"version": "3.12.8"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"nbformat": 4,
|
|
217
|
+
"nbformat_minor": 5
|
|
218
|
+
}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "0",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"# LabMaps"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"cell_type": "markdown",
|
|
13
|
+
"id": "1",
|
|
14
|
+
"metadata": {},
|
|
15
|
+
"source": [
|
|
16
|
+
"## Lab authors"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"cell_type": "markdown",
|
|
21
|
+
"id": "2",
|
|
22
|
+
"metadata": {},
|
|
23
|
+
"source": [
|
|
24
|
+
"Lab authors are the main ingredient to analyse a single lab (i.e. a group of researchers). You can create one just with a name and then automatically ask to retrieve the DB endpoints for this author."
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"cell_type": "code",
|
|
29
|
+
"execution_count": null,
|
|
30
|
+
"id": "3",
|
|
31
|
+
"metadata": {},
|
|
32
|
+
"outputs": [],
|
|
33
|
+
"source": [
|
|
34
|
+
"from gismap.lab import LabAuthor\n",
|
|
35
|
+
"maria = LabAuthor(\"Maria Potop\")\n",
|
|
36
|
+
"maria.auto_sources()"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"cell_type": "markdown",
|
|
41
|
+
"id": "4",
|
|
42
|
+
"metadata": {},
|
|
43
|
+
"source": [
|
|
44
|
+
"We see a warning here. Let's look at the sources:"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"cell_type": "code",
|
|
49
|
+
"execution_count": null,
|
|
50
|
+
"id": "5",
|
|
51
|
+
"metadata": {},
|
|
52
|
+
"outputs": [],
|
|
53
|
+
"source": [
|
|
54
|
+
"maria.sources"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"cell_type": "markdown",
|
|
59
|
+
"id": "6",
|
|
60
|
+
"metadata": {},
|
|
61
|
+
"source": [
|
|
62
|
+
"This is actually normal: Maria has multiple identities in Hal. The warning is there to tell there is a possibility of homonyms but that is not the case here. Note that an author can have many names."
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"cell_type": "code",
|
|
67
|
+
"execution_count": null,
|
|
68
|
+
"id": "7",
|
|
69
|
+
"metadata": {},
|
|
70
|
+
"outputs": [],
|
|
71
|
+
"source": [
|
|
72
|
+
"maria.aliases"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"cell_type": "markdown",
|
|
77
|
+
"id": "8",
|
|
78
|
+
"metadata": {},
|
|
79
|
+
"source": [
|
|
80
|
+
"When using `auto_source`, you can tell which DBs should be uses (only online DBLP and HAL are available right now)."
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"cell_type": "code",
|
|
85
|
+
"execution_count": null,
|
|
86
|
+
"id": "9",
|
|
87
|
+
"metadata": {},
|
|
88
|
+
"outputs": [],
|
|
89
|
+
"source": [
|
|
90
|
+
"from gismap.sources.hal import HAL\n",
|
|
91
|
+
"celine = LabAuthor(\"Céline Comte\")\n",
|
|
92
|
+
"celine.auto_sources(dbs=[HAL])\n",
|
|
93
|
+
"celine.sources"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"cell_type": "markdown",
|
|
98
|
+
"id": "10",
|
|
99
|
+
"metadata": {},
|
|
100
|
+
"source": [
|
|
101
|
+
"When the sources of an author are set one can retrieve her publications."
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"cell_type": "code",
|
|
106
|
+
"execution_count": null,
|
|
107
|
+
"id": "11",
|
|
108
|
+
"metadata": {},
|
|
109
|
+
"outputs": [],
|
|
110
|
+
"source": [
|
|
111
|
+
"[p for p in celine.get_publications().values() if p.year == 2021]"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"cell_type": "markdown",
|
|
116
|
+
"id": "12",
|
|
117
|
+
"metadata": {},
|
|
118
|
+
"source": [
|
|
119
|
+
"Lab authors can have metadata that can be used for display and further analysis but we will not cover that in this tutorial."
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"cell_type": "markdown",
|
|
124
|
+
"id": "13",
|
|
125
|
+
"metadata": {},
|
|
126
|
+
"source": [
|
|
127
|
+
"## Your first lab"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"cell_type": "markdown",
|
|
132
|
+
"id": "14",
|
|
133
|
+
"metadata": {},
|
|
134
|
+
"source": [
|
|
135
|
+
"In GISMAP, a Lab is a class whose instances have three methods:\n",
|
|
136
|
+
"\n",
|
|
137
|
+
"- `update_authors` automatically refresh the members of the lab. It is useful at creation or when a lab evolves.\n",
|
|
138
|
+
"- `update_publications` makes a full refresh of the publications of a lab. All publications from lab members are considered (temporal filtering may be enabled later).\n",
|
|
139
|
+
"- `expand` adds *moons*, i.e. additional researchers that gravitate around the lab.\n",
|
|
140
|
+
"\n",
|
|
141
|
+
"The simplest usable subclass of Lab is `ListLab`, which uses a list of names. For example, consider the executive committee of the LINCS."
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"cell_type": "code",
|
|
146
|
+
"execution_count": null,
|
|
147
|
+
"id": "15",
|
|
148
|
+
"metadata": {},
|
|
149
|
+
"outputs": [],
|
|
150
|
+
"source": [
|
|
151
|
+
"from gismap.lab import ListLab\n",
|
|
152
|
+
"lab = ListLab(author_list=['Tixeuil Sébastien', 'Kofman Daniel', 'Baccelli François', 'Noirie Ludovic', 'Bassi Francesca'], name='toy_example')\n",
|
|
153
|
+
"lab.update_authors()\n",
|
|
154
|
+
"lab.authors"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"cell_type": "code",
|
|
159
|
+
"execution_count": null,
|
|
160
|
+
"id": "16",
|
|
161
|
+
"metadata": {},
|
|
162
|
+
"outputs": [],
|
|
163
|
+
"source": [
|
|
164
|
+
"lab.update_publis()\n",
|
|
165
|
+
"len(lab.publications)"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"cell_type": "markdown",
|
|
170
|
+
"id": "17",
|
|
171
|
+
"metadata": {},
|
|
172
|
+
"source": [
|
|
173
|
+
"Labs can be saved to you don't have to re-update them all the time."
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"cell_type": "code",
|
|
178
|
+
"execution_count": null,
|
|
179
|
+
"id": "18",
|
|
180
|
+
"metadata": {},
|
|
181
|
+
"outputs": [],
|
|
182
|
+
"source": [
|
|
183
|
+
"lab.dump(lab.name, overwrite=True)"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"cell_type": "markdown",
|
|
188
|
+
"id": "19",
|
|
189
|
+
"metadata": {},
|
|
190
|
+
"source": [
|
|
191
|
+
"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 (`iframe` is recommended then).\n",
|
|
192
|
+
"\n",
|
|
193
|
+
"You can also display it directly inside a notebook:"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"cell_type": "code",
|
|
198
|
+
"execution_count": null,
|
|
199
|
+
"id": "20",
|
|
200
|
+
"metadata": {},
|
|
201
|
+
"outputs": [],
|
|
202
|
+
"source": [
|
|
203
|
+
"lab.show_html()"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"cell_type": "markdown",
|
|
208
|
+
"id": "21",
|
|
209
|
+
"metadata": {},
|
|
210
|
+
"source": [
|
|
211
|
+
"It's a bit empty... Let's add one moon."
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"cell_type": "code",
|
|
216
|
+
"execution_count": null,
|
|
217
|
+
"id": "22",
|
|
218
|
+
"metadata": {},
|
|
219
|
+
"outputs": [],
|
|
220
|
+
"source": [
|
|
221
|
+
"lab.expand(target=1)"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"cell_type": "code",
|
|
226
|
+
"execution_count": null,
|
|
227
|
+
"id": "23",
|
|
228
|
+
"metadata": {},
|
|
229
|
+
"outputs": [],
|
|
230
|
+
"source": [
|
|
231
|
+
"lab.show_html()"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"cell_type": "markdown",
|
|
236
|
+
"id": "24",
|
|
237
|
+
"metadata": {},
|
|
238
|
+
"source": [
|
|
239
|
+
"Few things about the generated graph:\n",
|
|
240
|
+
"\n",
|
|
241
|
+
"- Singletons (authors with no co-publications) are discarded by default.\n",
|
|
242
|
+
"- Authors are represented with their initials unless some picture url is provided (implicitly or explictly).\n",
|
|
243
|
+
"- You can hover an author to get her name. If you click, you have a modal with the list of publications.\n",
|
|
244
|
+
"- 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."
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"cell_type": "markdown",
|
|
249
|
+
"id": "25",
|
|
250
|
+
"metadata": {},
|
|
251
|
+
"source": [
|
|
252
|
+
"## Make your own lab"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"cell_type": "markdown",
|
|
257
|
+
"id": "26",
|
|
258
|
+
"metadata": {},
|
|
259
|
+
"source": [
|
|
260
|
+
"The easiest way to manage a lab is to specify an internal method `_author_iterator` that returns Lab authors. \n",
|
|
261
|
+
"\n",
|
|
262
|
+
"To GISMAP a lab, you just need to specify that method. Most of the time, this is done by scrapping some Web page(s). See the references for examples.\n"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"cell_type": "markdown",
|
|
267
|
+
"id": "27",
|
|
268
|
+
"metadata": {},
|
|
269
|
+
"source": [
|
|
270
|
+
"## Example"
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"cell_type": "markdown",
|
|
275
|
+
"id": "28",
|
|
276
|
+
"metadata": {},
|
|
277
|
+
"source": [
|
|
278
|
+
"The `LaasLab` class automatically builds a lab representation from `https://www.laas.fr/fr/equipes/*team_name*/`"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"cell_type": "code",
|
|
283
|
+
"execution_count": null,
|
|
284
|
+
"id": "29",
|
|
285
|
+
"metadata": {},
|
|
286
|
+
"outputs": [],
|
|
287
|
+
"source": [
|
|
288
|
+
"from gismap.lab import Solace\n",
|
|
289
|
+
"solace = Solace()\n",
|
|
290
|
+
"solace.update_authors()\n",
|
|
291
|
+
"solace.update_publis()\n",
|
|
292
|
+
"solace.expand(target=10)"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"cell_type": "code",
|
|
297
|
+
"execution_count": null,
|
|
298
|
+
"id": "30",
|
|
299
|
+
"metadata": {},
|
|
300
|
+
"outputs": [],
|
|
301
|
+
"source": [
|
|
302
|
+
"solace.show_html()"
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"metadata": {
|
|
307
|
+
"kernelspec": {
|
|
308
|
+
"display_name": "Python 3 (ipykernel)",
|
|
309
|
+
"language": "python",
|
|
310
|
+
"name": "python3"
|
|
311
|
+
},
|
|
312
|
+
"language_info": {
|
|
313
|
+
"codemirror_mode": {
|
|
314
|
+
"name": "ipython",
|
|
315
|
+
"version": 3
|
|
316
|
+
},
|
|
317
|
+
"file_extension": ".py",
|
|
318
|
+
"mimetype": "text/x-python",
|
|
319
|
+
"name": "python",
|
|
320
|
+
"nbconvert_exporter": "python",
|
|
321
|
+
"pygments_lexer": "ipython3",
|
|
322
|
+
"version": "3.12.8"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"nbformat": 4,
|
|
326
|
+
"nbformat_minor": 5
|
|
327
|
+
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from importlib.metadata import metadata
|
|
4
4
|
|
|
5
|
+
from gismap.sources.hal import HAL as HAL, HALAuthor as HALAuthor
|
|
6
|
+
from gismap.sources.dblp import DBLP as DBLP, DBLPAuthor as DBLPAuthor
|
|
5
7
|
from gismap.utils.common import get_classes as get_classes
|
|
6
8
|
from gismap.gismo import make_gismo as make_gismo
|
|
7
9
|
from gismap.search import (
|