Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Jupyter notebook myanacondadont/api_call_example.ipynb

173 views
Kernel: Python 2 (SageMath)
import urllib import json import pandas as pd
# read in json url = 'https://www.nwfsc.noaa.gov/data/api/v1/source/trawl.catch_fact/selection.json?filters=' + \ 'field_identified_taxonomy_dim$scientific_name=Eopsetta%20jordani,date_dim$year>=2010,' + \ 'date_dim$year<=2012&variables=date_dim$yyyymmdd,field_identified_taxonomy_dim$scientific_name' api_response = urllib.urlopen(url) json_file = json.loads(api_response.read())
pd.DataFrame(json_file)