Skip to content

Commit a355b14

Browse files
author
Sandra Mierz
authored
Merge pull request #8 from Project-TAPIR/improve-documentation
Improve documentation
2 parents de16c79 + 7a2ef60 commit a355b14

8 files changed

+727
-677
lines changed

organization-organization/ror-organigram.ipynb

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": []
9+
},
310
{
411
"cell_type": "markdown",
512
"metadata": {
613
"id": "0-62NAVa8DL0"
714
},
815
"source": [
9-
"### Query ROR for an organization and the hierarchy of sub-organizations below it\n",
16+
"### Query ROR for an organization and all its suborganizations\n",
1017
"\n",
11-
"This notebook queries the [ROR API](https://ror.readme.io/) to construct a hierarchy of sub-organizations starting at a given organization. It takes a ROR URL or ID which is used to retrieve the organizations specified in the metadata field \"`relationships`\" with `\"type\"=Child` recursively to build a tree structure. The tree represents the hierarchy of sub-organizations and will be outputted.\n"
18+
"This notebook queries the [ROR API](https://ror.readme.io/) for an organization and all its suborganizations. \n",
19+
"It takes a ROR URL or ROR ID as input which is used as a starting point for recursively querying the ROR API for an organization's suborganizations specified in the metadata field \"`relationships`\" having the `\"type\"=Child`. \n",
20+
"The hierarchy is represented as a tree and will be outputted.\n"
1221
]
1322
},
1423
{
1524
"cell_type": "code",
16-
"execution_count": null,
25+
"execution_count": 1,
1726
"metadata": {
1827
"id": "VaYUrh5n2iq9",
1928
"scrolled": true
@@ -31,7 +40,7 @@
3140
"id": "YmmrIwjv3QqG"
3241
},
3342
"source": [
34-
"The input value for all following queries is a ROR URL or ID, e.g. '`https://ror.org/03vek6s52`' or '`03vek6s52`'."
43+
"The input for this notebook is a ROR URL or ROR ID, e.g. '`https://ror.org/03vek6s52`' or '`03vek6s52`'."
3544
]
3645
},
3746
{
@@ -81,7 +90,8 @@
8190
},
8291
"user_tz": -60
8392
},
84-
"id": "YpwZ3mrC3dHO"
93+
"id": "YpwZ3mrC3dHO",
94+
"scrolled": true
8595
},
8696
"outputs": [],
8797
"source": [
@@ -101,8 +111,8 @@
101111
"#---- example execution\n",
102112
"# uncomment following lines to see the metadata for specified example_ror\n",
103113
"#import pprint\n",
104-
"#organization = query_ror_api(example_ror)\n",
105-
"#pprint.pprint(organization)"
114+
"#organization_data = query_ror_api(example_ror)\n",
115+
"#pprint.pprint(organization_data)"
106116
]
107117
},
108118
{
@@ -111,7 +121,7 @@
111121
"id": "T25jtRBf3c1T"
112122
},
113123
"source": [
114-
"But in this notebook we use it as a starting point to recursively query the ROR API using the relationship type \"`Child`\" to construct the organizational hierarchy below it."
124+
"but in this notebook we use it as a starting point to recursively query the ROR API using the relationship type \"`Child`\" to construct the organizational hierarchy below it."
115125
]
116126
},
117127
{
@@ -133,7 +143,10 @@
133143
"user_tz": -60
134144
},
135145
"id": "4jh1liI56A4x",
136-
"outputId": "ea1cbf18-6c90-4aa3-bfcb-10addcaa9e8f"
146+
"outputId": "ea1cbf18-6c90-4aa3-bfcb-10addcaa9e8f",
147+
"pycharm": {
148+
"is_executing": true
149+
}
137150
},
138151
"outputs": [
139152
{

organization-people/freya_get_people_by_organization.ipynb

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"id": "etxiXTW668ZD"
77
},
88
"source": [
9-
"### Query the FREYA PID Graph for all people affiliated with an organization\n",
9+
"### Query the FREYA PID Graph for people affiliated with an organization\n",
1010
"\n",
11-
"This notebook queries the [FREYA PID Graph](https://blog.datacite.org/powering-the-pid-graph/) via [Datacite's GraphQL API](https://api.datacite.org/graphql) to retrieve all people affiliated with an organization. It takes a ROR URL as input which is used to retrieve the according Grid and Ringgold ID of the organization and query the ORCID API with it [for affiliated people](https://info.orcid.org/faq/how-do-i-find-orcid-record-holders-at-my-institution/). From the resulting list of people we output the ORCID iDs."
11+
"This notebook queries the [FREYA PID Graph](https://blog.datacite.org/powering-the-pid-graph/) via [Datacite's GraphQL API](https://api.datacite.org/graphql) to retrieve people affiliated with an organization. It takes a ROR URL as input which is used internally to retrieve the Grid ID from the ROR API and Ringgold ID from Wikidata and use these identifiers to [find ORCID record holders at the institution](https://info.orcid.org/faq/how-do-i-find-orcid-record-holders-at-my-institution/). From the resulting list of people we output the ORCID iDs."
1212
]
1313
},
1414
{
1515
"cell_type": "code",
16-
"execution_count": null,
16+
"execution_count": 1,
1717
"metadata": {
1818
"id": "8Mk7-aYc7x3A",
1919
"scrolled": true
@@ -31,7 +31,7 @@
3131
"id": "J31_ejB6bWqd"
3232
},
3333
"source": [
34-
"The input for the query is a ROR URL, e.g. '`https://ror.org/021k10z87`'"
34+
"The input for this notebook is a ROR URL, e.g. '`https://ror.org/021k10z87`'"
3535
]
3636
},
3737
{
@@ -63,7 +63,8 @@
6363
"id": "ba_A3Anpbl4P"
6464
},
6565
"source": [
66-
"We use it to query Datacite's GraphQL API for the organization's metadata and all people connected to it. Since the API uses pagination, we need to loop through all pages to get the complete result set.\n"
66+
"We use it to query Datacite's GraphQL API for the organization's metadata and all people connected to it.\n",
67+
"Since the API uses pagination, we need to loop through all pages to get the complete result set.\n"
6768
]
6869
},
6970
{
@@ -176,20 +177,21 @@
176177
"text": [
177178
"0000-0002-3783-6130, Irene Weipert-Fenner\n",
178179
"0000-0002-5452-0488, Hans-Joachim Spanger\n",
179-
"0000-0001-6746-1248, Anton Peez\n",
180+
"0000-0002-4621-9687, Simone Schnabel\n",
180181
"0000-0001-6731-5304, Julia Eckert\n",
182+
"0000-0001-6746-1248, Anton Peez\n",
181183
"0000-0003-1575-9688, Hendrik Simon\n",
182184
"0000-0002-1712-2624, Julian Junk\n",
183185
"0000-0003-0035-5840, Raphael Oidtmann\n",
184186
"0000-0002-5925-043X, Ariadne Natal\n",
185187
"0000-0002-7012-6739, Peter Kreuzer\n",
186188
"0000-0001-7843-4480, Dirk Peters\n",
187-
"0000-0003-0039-9827, Eldad Ben Aharon\n",
188189
"0000-0001-6823-6819, Janna Lisa Chalmovsky\n",
189190
"0000-0003-1940-8877, Mikhail Polianskii\n",
190191
"0000-0001-7302-444X, Katja Freistein\n",
191-
"0000-0001-7286-3575, Paul Chambers\n",
192192
"0000-0002-8739-2486, Elvira Rosert\n",
193+
"0000-0001-7286-3575, Paul Chambers\n",
194+
"0000-0003-0039-9827, Eldad Ben Aharon\n",
193195
"0000-0002-4259-6071, Felix S. Bethke\n"
194196
]
195197
}

organization-people/openalex_get_people_by_organization.ipynb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"id": "ac7bedaf-05fb-4eb0-9bf5-e4d1d68a08c3"
88
},
99
"source": [
10-
"### Query OpenAlex for all people affiliated with an organization\n",
11-
"This script queries the [OpenAlex API](https://docs.openalex.org/api) via its '`/authors`' endpoint for all authors affiliated with an organization.\n",
12-
"It takes a ROR URL as input which is used to retrieve all authors that specified the ROR ID in their metadata field '`last_known_institution.ror`'. From the resulting list of people we output their respective ORCID iDs."
10+
"### Query OpenAlex for people affiliated with an organization\n",
11+
"This notebook queries the [OpenAlex API](https://docs.openalex.org/api) via its '`/authors`' endpoint for all authors affiliated with an organization.\n",
12+
"It takes a ROR URL as input which is used to retrieve authors with the specified ROR URL in their metadata field '`last_known_institution.ror`'. From the resulting list of people we output the ORCID iDs."
1313
]
1414
},
1515
{
1616
"cell_type": "code",
17-
"execution_count": null,
17+
"execution_count": 1,
1818
"id": "IUqshUWKwSk2",
1919
"metadata": {
2020
"executionInfo": {
@@ -43,7 +43,7 @@
4343
"id": "nSJjdkxGdWll"
4444
},
4545
"source": [
46-
"The input for the query is a ROR URL, e.g. '`https://ror.org/021k10z87`'"
46+
"The input for the notebook is a ROR URL, e.g. '`https://ror.org/021k10z87`'"
4747
]
4848
},
4949
{
@@ -77,7 +77,7 @@
7777
"id": "MiXVDKXid9tq"
7878
},
7979
"source": [
80-
"We use it to query the OpenAlex API for authors that specified the organization's ROR ID in the field '`last_known_institution.ror`'. Since the OpenAlex API uses [pagination](https://docs.openalex.org/api/get-lists-of-entities#pagination), we need to loop through all pages to get the complete result set."
80+
"We use it to query the OpenAlex API endpoint for `'authors'` with the specified ROR URL in their metadata field '`last_known_institution.ror`'. Since the API uses [pagination](https://docs.openalex.org/api/get-lists-of-entities#pagination), we need to loop through all pages to get the complete result set."
8181
]
8282
},
8383
{
@@ -141,7 +141,9 @@
141141
"id": "CwRzvAQweuoW"
142142
},
143143
"source": [
144-
"From the resulting list of people we extract and print out each ORCID and name."
144+
"From the resulting list of people we extract and print out each ORCID iD and name.\n",
145+
"\n",
146+
"*Note: people that do not have an ORCID within their `ids` metadata, will not be printed.*"
145147
]
146148
},
147149
{
@@ -173,15 +175,15 @@
173175
"text": [
174176
"0000-0002-3824-5375, Nicole Deitelhoff\n",
175177
"0000-0002-7348-7206, Jonas Wolff\n",
176-
"0000-0002-6891-770X, Francis O’Connor\n",
177178
"0000-0002-3536-8898, Felix Anderl\n",
178179
"0000-0002-4259-6071, Felix S. Bethke\n",
179180
"0000-0002-3136-0901, Thorsten Gromes\n",
180181
"0000-0001-9698-2616, Annika Elena Poppe\n",
181182
"0000-0002-3783-6130, Irene Weipert-Fenner\n",
182183
"0000-0002-4793-9010, Arvid Bell\n",
183184
"0000-0002-7012-6739, Peter Kreuzer\n",
184-
"0000-0002-0143-5183, Christina Kohler\n"
185+
"0000-0002-1185-8673, Daniel Mullis\n",
186+
"0000-0001-6746-1248, Anton Peez\n"
185187
]
186188
}
187189
],

0 commit comments

Comments
 (0)