summaryrefslogtreecommitdiff
path: root/scraper/s2-citation-report.py
diff options
context:
space:
mode:
authorAdam Harvey <adam@ahprojects.com>2019-02-19 23:14:02 +0100
committerAdam Harvey <adam@ahprojects.com>2019-02-19 23:14:02 +0100
commit2c469720811145abb07e5e59281f917eb8b1cc67 (patch)
tree5651671371b44929e464e6ec671856f1e84d5200 /scraper/s2-citation-report.py
parentfe0dee2f8c8a7127d1ac2f01c5989f5011a2ee8a (diff)
parent768757fe47d55b62c1d3ef87c982332e0292393e (diff)
..
Diffstat (limited to 'scraper/s2-citation-report.py')
-rw-r--r--scraper/s2-citation-report.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/scraper/s2-citation-report.py b/scraper/s2-citation-report.py
index 58b323c4..37177957 100644
--- a/scraper/s2-citation-report.py
+++ b/scraper/s2-citation-report.py
@@ -9,7 +9,7 @@ import subprocess
from util import *
DIR_PUBLIC_CITATIONS = "../site/datasets/citations"
-paper_location_lookup = fetch_google_lookup('paper_locations')
+paper_location_lookup = fetch_google_lookup('paper_locations', item_key='paper_id')
@click.command()
def s2_citation_report():
@@ -362,13 +362,13 @@ def load_megapixels_queries():
recs.append(rec)
return recs
-def load_institutions(paperId):
- if os.path.exists(file_path('pdf', paperId, 'institutions.json')):
- return read_json(file_path('pdf', paperId, 'institutions.json'))['institutions']
- elif os.path.exists(file_path('doi', paperId, 'institutions.json')):
- return read_json(file_path('doi', paperId, 'institutions.json'))['institutions']
- else:
- return []
+#def load_institutions(paperId):
+# if os.path.exists(file_path('pdf', paperId, 'institutions.json')):
+# return read_json(file_path('pdf', paperId, 'institutions.json'))['institutions']
+# elif os.path.exists(file_path('doi', paperId, 'institutions.json')):
+# return read_json(file_path('doi', paperId, 'institutions.json'))['institutions']
+# else:
+# return []
def data_path(key, paper_id):
return 'datasets/s2/{}/{}/{}'.format(key, paper_id[0:2], paper_id)