http://dashboard.chorusaccess.org/
Search service -- maybe most relevant? http://www.chorusaccess.org/services/search-service/
In [1]:
import csv
import json
import requests
In [2]:
base_ur = 'https://api.chorusaccess.org/agencies/100000001/histories'
In [3]:
funder_list = []
with open('funder_list.csv', mode='r') as funder_file:
reader = csv.reader(funder_file)
for row in reader:
funder_dict = {}
funder_dict['name'] = row[0]
funder_dict['id'] = row[1]
funder_list.append(funder_dict)
funder_list.pop(0)
Out[3]:
In [5]:
funder_list
Out[5]:
In [4]:
test_url = 'https://api.chorusaccess.org/agencies/100000161/histories/2015/9/07?limit=500'
In [60]:
this_data = requests.get(test_url).json()['items']
In [61]:
len(this_data)
Out[61]:
In [55]:
one_thing = this_data[-1]
In [56]:
print(json.dumps(one_thing, indent=4))
In [57]:
another_url = 'https://api.chorusaccess.org/agencies/100000161/histories/2015/2/23?limit=500'
In [63]:
other_data = requests.get(another_url).json()['items']
In [64]:
len(other_data)
Out[64]:
In [59]:
print(json.dumps(other_data[-1], indent=4))
In [ ]: