Skip to content

Commit 6d8d7ab

Browse files
committed
Add doi option
1 parent 286b241 commit 6d8d7ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

get_geo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
outfile = open(args.output,'w')
3333
writer = csv.writer(outfile)
34-
writer.writerow(['lat','lon','name'])
34+
writer.writerow(['lat','lon','name','doi'])
3535

3636
for h in hits['hits']['hits']:
3737
metadata = decustomize_schema(h['metadata'])
@@ -62,12 +62,12 @@
6262
#transform(from_proj,to_proj,point['pointLongitude'],point['pointLatitude'])
6363
#pt_lat=pt_lat+[tlat]
6464
#pt_lon= pt_lon+[tlon]
65-
#identifier=identifier+[metadata['identifier']['identifier']]
65+
doi = 'https://doi.org/'+metadata['identifier']['identifier']
6666
#author=author+[metadata['creators'][0]['creatorName']]
6767
title=metadata['titles'][0]['title'].split(':')[0]
6868
lat = point['pointLatitude']
6969
lon = point['pointLongitude']
70-
writer.writerow([lat,lon,title])
70+
writer.writerow([lat,lon,title,doi])
7171
#year = year+[metadata['publicationYear']]
7272
#cen = metadata['publicationYear'][1]
7373
#dec = metadata['publicationYear'][2]

0 commit comments

Comments
 (0)