Commit ·
9fde5ad
1
Parent(s): a1275d0
Update Climate_site/python_scripts/paper_functions_own_details.py
Browse files
Climate_site/python_scripts/paper_functions_own_details.py
CHANGED
|
@@ -476,16 +476,19 @@ def main_authors( research_key_words , details , size):
|
|
| 476 |
institutions = ''
|
| 477 |
for elem in list_ids:
|
| 478 |
if len(elem) > 3:
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
if
|
| 485 |
-
institutions
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
|
|
|
|
|
|
|
|
|
| 489 |
dic_papers_co_authors[author_name_norm]["Last Known Institution"] = institutions
|
| 490 |
dic_papers_co_authors[author_name_norm]["Number of works"] = work_count
|
| 491 |
dic_papers_co_authors[author_name_norm]["Number of citations"] = cited_by_count
|
|
|
|
| 476 |
institutions = ''
|
| 477 |
for elem in list_ids:
|
| 478 |
if len(elem) > 3:
|
| 479 |
+
|
| 480 |
+
try:
|
| 481 |
+
data = get_data("https://api.openalex.org/people/" + elem)
|
| 482 |
+
work_count += data["works_count"]
|
| 483 |
+
cited_by_count += data["cited_by_count"]
|
| 484 |
+
if data["last_known_institution"] != None and data["last_known_institution"]["display_name"] != None:
|
| 485 |
+
if institutions == '':
|
| 486 |
+
institutions += data["last_known_institution"]["display_name"]
|
| 487 |
+
else:
|
| 488 |
+
institutions += ", " + data["last_known_institution"]["display_name"]
|
| 489 |
+
except:
|
| 490 |
+
pass
|
| 491 |
+
|
| 492 |
dic_papers_co_authors[author_name_norm]["Last Known Institution"] = institutions
|
| 493 |
dic_papers_co_authors[author_name_norm]["Number of works"] = work_count
|
| 494 |
dic_papers_co_authors[author_name_norm]["Number of citations"] = cited_by_count
|