summaryrefslogtreecommitdiff
path: root/scraper/s2-final-report.py
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2019-02-20 17:19:42 +0100
committerjules@lens <julescarbon@gmail.com>2019-02-20 17:19:42 +0100
commit078574a7b827106ff1130b7c12320c69202394a9 (patch)
tree914396b452fa13e54e98a0429c3595dd4b1edbf3 /scraper/s2-final-report.py
parente0038fbc4b891fe4393acfad8d9755fa1834278e (diff)
new reports
Diffstat (limited to 'scraper/s2-final-report.py')
-rw-r--r--scraper/s2-final-report.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scraper/s2-final-report.py b/scraper/s2-final-report.py
index 2ebd516c..e3e49c37 100644
--- a/scraper/s2-final-report.py
+++ b/scraper/s2-final-report.py
@@ -130,8 +130,8 @@ def process_single_paper(row, paper_id, addresses, aggregate_citations, unknown_
# address_count += 1
institution = inst[1]
next_address = addresses.findObject(institution)
- if next_address and next_address['address'] not in seen_here:
- seen_here[next_address['address']] = True
+ if next_address and next_address['name'] not in seen_here:
+ seen_here[next_address['name']] = True
address = next_address
geocoded_addresses.append(next_address)
if not address:
@@ -141,11 +141,11 @@ def process_single_paper(row, paper_id, addresses, aggregate_citations, unknown_
found_addresses = []
if len(headings):
for heading in headings:
- l = heading.lower().strip()
- if l:
- next_address = addresses.findObject(l)
- if next_address and next_address['address'] not in seen_here:
- seen_here[next_address['address']] = True
+ possible_address = heading.lower().strip()
+ if possible_address:
+ next_address = addresses.findObject(possible_address)
+ if next_address and next_address['name'] not in seen_here:
+ seen_here[next_address['name']] = True
address = next_address
geocoded_addresses.append(next_address)
if address: