In [2]:
---
syncID: 
title: "Using the NEON data API in Python"
description: "Use the data endpoint of the NEON API in Python, using the requests package."
dateCreated: 2019-02-14
authors: Bridget Hass
contributors: 
estimatedTime: 30 minutes
packagesLibraries: requests
topics: data-management,rep-sci
languagesTool: python
dataProduct: 
code1: /Python/
tutorialSeries: 
urlTitle: data-api-python
---


  File "<ipython-input-2-9f55b5e67be1>", line 1
    ---
       ^
SyntaxError: invalid syntax

Get packages and set up

This tutorial contains code and instructions for downloading NEON data via the API, using the data product DP1.10098.001 - Woody Plant Vegetation Structure as an example. It follows a similar workflow to the online tutorial Using the NEON API in R. See the R tutorial for further details about the overall API structure, and instructions in using other endpoints of the API (locations, taxonomy, etc).

Required packages:


In [3]:
import requests, urllib, os


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-ea2621995560> in <module>()
----> 1 import requests, urllib, os

ImportError: No module named 'requests'

We can use the requests module to see which Veg Structure data is availabe for all sites. For more details on the anatomy of an API call, refer to https://www.neonscience.org/neon-api-usage. Since we are looking for the DP1.10098.001 product, we can attach this endpoint to the NEON data base API url - http://data.neonscience.org/api/v0/ as follows:


In [2]:
r = requests.get("http://data.neonscience.org/api/v0/products/DP1.10098.001")

info on status codes

(from https://www.dataquest.io/blog/python-api-tutorial/)

Status codes are returned with every request that is made to a web server. Status codes indicate information about what happened with a request. Here are some codes that are relevant to GET requests:

  • 200 : everything went okay, and the result has been returned (if any)
  • 301 : the server is redirecting you to a different endpoint. This can happen when a company switches domain names, or an endpoint name is changed.
  • 401 : the server thinks you're not authenticated. This happens when you don't send the right credentials to access an API (we'll talk about authentication in a later post).
  • 400 : the server thinks you made a bad request. This can happen when you don't send along the right data, among other things.
  • 403 : the resource you're trying to access is forbidden -- you don't have the right permissions to see it.
  • 404 : the resource you tried to access wasn't found on the server.

Let's make sure this request was successful by checking the status code:


In [3]:
r.status_code


Out[3]:
200

Good news, the request was successful! You can get some additional information about the request by using the .headers method:


In [4]:
r.headers


Out[4]:
{'Date': 'Thu, 10 Jan 2019 18:10:42 GMT', 'Access-Control-Allow-Origin': '*', 'X-Content-Type-Options': 'nosniff', 'Server': 'Apache/2.2.15 (Oracle)', 'Content-Type': 'application/json;charset=UTF-8', 'X-XSS-Protection': '1', 'Set-Cookie': 'JSESSIONID=25759F10A5ABB1BFA887C433AF6B972E.dmz-portal-web-1; Path=/; HttpOnly', 'Transfer-Encoding': 'chunked', 'X-Frame-Options': 'SAMEORIGIN', 'Connection': 'close'}

Finally, to pull out information from the request, use .json(), which pulls the data contained from the api into a python dictionary. Note: you can also use the .text() option but this prints everything without any formatting.


In [5]:
r.json()


Out[5]:
{'data': {'changeLogs': None,
  'keywords': ['plant productivity',
   'production',
   'carbon cycle',
   'biomass',
   'vegetation',
   'productivity',
   'plants',
   'vegetation structure',
   'tree height',
   'canopy height',
   'woody plants',
   'trees',
   'net primary productivity (NPP)',
   'annual net primary productivity (ANPP)',
   'shrubs',
   'lianas',
   'saplings'],
  'productAbstract': 'This data product contains the quality-controlled, native sampling resolution data from in-situ measurements of live and standing dead woody individuals and shrub groups, from all terrestrial NEON sites with qualifying woody vegetation. The exact measurements collected per individual depend on growth form, and these measurements are focused on enabling biomass and productivity estimation, estimation of shrub volume and biomass, and calibration / validation of multiple NEON airborne remote-sensing data products. In general, comparatively large individuals that are visible to remote-sensing instruments are mapped, tagged and measured, and other smaller individuals are tagged and measured but not mapped. Smaller individuals may be subsampled according to a nested subplot approach in order to standardize the per plot sampling effort. Structure and mapping data are reported per individual per plot; sampling metadata, such as per growth form sampling area, are reported per plot. For additional details, see protocol [NEON.DOC.000987vG](http://data.neonscience.org/api/v0/documents/NEON.DOC.000987vG): TOS Protocol and Procedure: Measurement of Vegetation Structure, and Science Design [NEON.DOC.000914](http://data.neonscience.org/api/v0/documents/NEON.DOC.000914vA): TOS Science Design for Plant Biomass, Productivity and Leaf Area Index.\n\nLatency:\nThe expected time from data and/or sample collection in the field to data publication is as follows, for each of the data tables (in days) in the downloaded data package. See the Data Product User Guide for more information.\n\nvst_apparentindividual_pub:  90\nvst_mappingandtagging_pub:  90\nvst_perplotperyear_pub:  300\nvst_shrubgroup_pub:  90',
  'productCategory': 'Level 1 Data Product',
  'productCode': 'DP1.10098.001',
  'productCodeLong': 'NEON.DOM.SITE.DP1.10098.001',
  'productCodePresentation': 'NEON.DP1.10098',
  'productDescription': 'Structure measurements, including height, canopy diameter, and stem diameter, as well as mapped position of individual woody plants',
  'productDesignDescription': 'Woody Plant Vegetation Structure data are collected from distributed and/or tower plots. Each distributed plot is then sampled if at least one tree with DBH ≥ 10 cm is present, or if trees with DBH ≥ 10 cm are absent, distributed Plots are sampled if smaller woody individuals constitute ≥ 10% cover of the plot. Tower plots are sampled if at least one tree with DBH ≥ 10 cm is present in ≥ 10% of Tower Plots, or if smaller woody individuals constitute ≥ 10% of cover averaged across all Tower Plots. Within a plot, all individuals with DBH ≥ 10 cm are mapped and measured throughout the plot sampling area. Individuals with DBH < 10 cm may be mapped if they are visible to airborne remote-sensing instruments, and if stem density thresholds are met, individuals with DBH < 10 cm may be measured within nested subplots in order to standardize sampling effort across plots.\n \n At relatively mesic sites, distributed Plots are sampled every 3 years, and a minimum of n=5 tower plots are sampled annually. At continental cold and/or dry sites, distributed plots and tower plots are sampled every 3 years. At boreal sites in Alaska, distributed and tower plots are sampled every 6 years, and relocatable sites are sampled a minimum of 3 time points. At sites with seasonal senescence, the onset of sampling in a given year is triggered by senescence of canopy or understory individuals, and must be completed before growth begins the following season. At sites with no distinct season, sampling begins within ± 2 weeks of the same date, and must be completed within 4 months of onset. See NEON.DOC.000987 for more details.',
  'productHasExpanded': False,
  'productName': 'Woody plant vegetation structure',
  'productRemarks': "Queries for this data product will return data from all dates for vst_mappingandtagging (since individuals maybe tagged and mapped many years before a given vegetation structure sampling bout), whereas the vst_perplotperyear, vst_apparentindividual and vst_shrubgroup tables will be subset to data collected during the date range specified. Data are provided in monthly download files; queries including any part of a month will return data from the entire month. In the vst_perplotperyear table, there should be one record per plotID per eventID, and data in this table describe the presence/absence of woody growth forms, as well as the sampling area utilized for each growth form. The vst_mappingandtagging table contains at least one record per individualID, and provides data that are invariant through time, including tagID, taxonID and mapped location (if applicable). Duplicates in vst_mappingandtagging may exist at the individualID level if errors have been corrected after ingest of the original record; in this instance, users are advised to use the most recent record. Records in vst_mappingandtagging may be linked to vst_perplotperyear via the plotID and eventID fields. The vst_apparentindividual table contains one record per individualID per eventID, and includes growth form, structure and status data that may be linked to vst_mappingandtagging records via individualID; records may also be linked to vst_perplotperyear via the plotID and eventID fields. For allometric measurements on tree palms and other large, nonwoody individuals, users must download the nst_perindividual table from the related Non-herbaceous perennial vegetation structure data product (NEON.DP1.10045), and join on the individualID variable. The vst_shrubgroup table contains a minimum of one record per groupID per plotID per eventID; multiple records with the same groupID may exist if a given shrub group is comprised of more than one taxonID. Data provided in the vst_shrubgroup table allow calculation of live and dead volume per taxonID within each shrub group, and records may be linked with vst_perplotperyear via the plotID and eventID fields.\n \n For all tables, duplicates may exist where protocol and/or data entry aberrations have occurred; users should check data carefully for anomalies before joining tables. Taxonomic IDs of species of concern have been 'fuzzed'; see data package readme files for more information.",
  'productScienceTeam': 'Terrestrial Observation System (TOS)',
  'productScienceTeamAbbr': 'TOS',
  'productSensor': None,
  'productStatus': 'ACTIVE',
  'productStudyDescription': 'These data are collected at all NEON terrestrial sites at which qualifying smaller woody individuals (individuals with DBH < 10 cm) are present at 10% cover or greater, or when larger individuals (individuals with DBH ≥ 10 cm) are present in 10% or more of designated plots . Functionally, sampling occurs at forested sites, and sites with shrub/scrub vegetation.',
  'siteCodes': [{'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2015-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2015-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2016-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2016-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2017-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ORNL/2018-01'],
    'availableMonths': ['2015-11',
     '2015-12',
     '2016-01',
     '2016-11',
     '2016-12',
     '2017-11',
     '2017-12',
     '2018-01'],
    'siteCode': 'ORNL'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2017-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UKFS/2017-11'],
    'availableMonths': ['2015-08',
     '2015-09',
     '2016-09',
     '2016-10',
     '2017-01',
     '2017-09',
     '2017-10',
     '2017-11'],
    'siteCode': 'UKFS'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2014-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CPER/2017-09'],
    'availableMonths': ['2014-09',
     '2014-10',
     '2015-09',
     '2015-10',
     '2016-10',
     '2017-09'],
    'siteCode': 'CPER'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/WOOD/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/WOOD/2014-10'],
    'availableMonths': ['2014-09', '2014-10'],
    'siteCode': 'WOOD'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HEAL/2017-03'],
    'availableMonths': ['2015-05',
     '2015-06',
     '2015-08',
     '2016-08',
     '2016-09',
     '2017-03'],
    'siteCode': 'HEAL'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TALL/2017-12'],
    'availableMonths': ['2014-08',
     '2015-09',
     '2015-10',
     '2016-10',
     '2016-11',
     '2017-11',
     '2017-12'],
    'siteCode': 'TALL'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2014-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2016-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2017-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2018-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JERC/2018-02'],
    'availableMonths': ['2014-08',
     '2014-09',
     '2014-10',
     '2015-06',
     '2015-07',
     '2015-08',
     '2015-09',
     '2016-06',
     '2016-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-06',
     '2018-01',
     '2018-02'],
    'siteCode': 'JERC'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NOGP/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NOGP/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NOGP/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NOGP/2015-10'],
    'availableMonths': ['2015-06', '2015-07', '2015-09', '2015-10'],
    'siteCode': 'NOGP'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LAJA/2016-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LAJA/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LAJA/2016-11'],
    'availableMonths': ['2016-03', '2016-10', '2016-11'],
    'siteCode': 'LAJA'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2014-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2014-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2015-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2016-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2017-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2017-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/OSBS/2018-01'],
    'availableMonths': ['2014-07',
     '2014-08',
     '2014-09',
     '2014-10',
     '2015-03',
     '2015-05',
     '2015-08',
     '2015-09',
     '2015-10',
     '2016-05',
     '2016-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-05',
     '2017-11',
     '2017-12',
     '2018-01'],
    'siteCode': 'OSBS'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DEJU/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DEJU/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DEJU/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DEJU/2016-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DEJU/2017-05'],
    'availableMonths': ['2015-06', '2016-08', '2016-09', '2016-12', '2017-05'],
    'siteCode': 'DEJU'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2015-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2016-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2017-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/KONZ/2018-01'],
    'availableMonths': ['2015-09',
     '2015-10',
     '2015-11',
     '2016-10',
     '2016-11',
     '2016-12',
     '2017-11',
     '2017-12',
     '2018-01'],
    'siteCode': 'KONZ'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DCFS/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DCFS/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DCFS/2015-09'],
    'availableMonths': ['2015-07', '2015-08', '2015-09'],
    'siteCode': 'DCFS'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MLBS/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MLBS/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MLBS/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MLBS/2017-10'],
    'availableMonths': ['2015-09', '2015-10', '2017-09', '2017-10'],
    'siteCode': 'MLBS'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/WREF/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/WREF/2017-11'],
    'availableMonths': ['2017-10', '2017-11'],
    'siteCode': 'WREF'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2015-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/LENO/2017-10'],
    'availableMonths': ['2015-07',
     '2015-08',
     '2015-11',
     '2016-10',
     '2016-11',
     '2017-08',
     '2017-10'],
    'siteCode': 'LENO'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/RMNP/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/RMNP/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/RMNP/2018-08'],
    'availableMonths': ['2017-09', '2017-10', '2018-08'],
    'siteCode': 'RMNP'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2014-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2014-02',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2014-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2014-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2015-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2016-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2017-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/HARV/2017-10'],
    'availableMonths': ['2014-01',
     '2014-02',
     '2014-05',
     '2014-07',
     '2014-08',
     '2015-07',
     '2015-08',
     '2015-09',
     '2015-10',
     '2015-11',
     '2016-07',
     '2016-08',
     '2016-09',
     '2016-10',
     '2017-07',
     '2017-08',
     '2017-09',
     '2017-10'],
    'siteCode': 'HARV'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2017-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BART/2018-08'],
    'availableMonths': ['2014-08',
     '2015-06',
     '2015-07',
     '2015-08',
     '2015-09',
     '2016-08',
     '2016-09',
     '2016-10',
     '2017-07',
     '2017-08',
     '2017-09',
     '2018-08'],
    'siteCode': 'BART'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BONA/2016-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BONA/2016-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BONA/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BONA/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BONA/2017-09'],
    'availableMonths': ['2016-06', '2016-07', '2016-09', '2017-08', '2017-09'],
    'siteCode': 'BONA'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SJER/2015-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SJER/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SJER/2016-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SJER/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SJER/2016-12'],
    'availableMonths': ['2015-04', '2015-05', '2016-04', '2016-11', '2016-12'],
    'siteCode': 'SJER'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/STEI/2017-10'],
    'availableMonths': ['2015-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-08',
     '2017-09',
     '2017-10'],
    'siteCode': 'STEI'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2015-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2016-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/JORN/2016-12'],
    'availableMonths': ['2015-04',
     '2015-05',
     '2015-09',
     '2015-10',
     '2016-01',
     '2016-10',
     '2016-12'],
    'siteCode': 'JORN'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GRSM/2017-11'],
    'availableMonths': ['2015-05',
     '2015-06',
     '2016-10',
     '2016-11',
     '2017-10',
     '2017-11'],
    'siteCode': 'GRSM'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2015-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SERC/2017-11'],
    'availableMonths': ['2015-03',
     '2015-05',
     '2015-07',
     '2015-09',
     '2015-10',
     '2016-09',
     '2016-10',
     '2017-11'],
    'siteCode': 'SERC'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/YELL/2018-05'],
    'availableMonths': ['2018-05'],
    'siteCode': 'YELL'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-09'],
    'availableMonths': ['2015-07',
     '2015-08',
     '2016-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-03',
     '2017-04',
     '2017-07',
     '2017-08',
     '2017-09'],
    'siteCode': 'ABBY'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2014-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2015-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/MOAB/2018-08'],
    'availableMonths': ['2014-04',
     '2015-04',
     '2015-10',
     '2016-08',
     '2016-09',
     '2016-10',
     '2018-08'],
    'siteCode': 'MOAB'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2015-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/BLAN/2017-10'],
    'availableMonths': ['2015-04',
     '2015-07',
     '2015-08',
     '2015-09',
     '2015-10',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-09',
     '2017-10'],
    'siteCode': 'BLAN'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DELA/2017-11'],
    'availableMonths': ['2015-06',
     '2015-07',
     '2015-08',
     '2015-09',
     '2016-09',
     '2016-10',
     '2017-10',
     '2017-11'],
    'siteCode': 'DELA'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2014-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2016-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ONAQ/2017-11'],
    'availableMonths': ['2014-08',
     '2014-09',
     '2014-10',
     '2015-07',
     '2015-09',
     '2016-07',
     '2016-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-09',
     '2017-10',
     '2017-11'],
    'siteCode': 'ONAQ'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SRER/2016-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SRER/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SRER/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SRER/2016-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SRER/2017-01'],
    'availableMonths': ['2016-01', '2016-10', '2016-11', '2016-12', '2017-01'],
    'siteCode': 'SRER'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SOAP/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SOAP/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SOAP/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SOAP/2015-11'],
    'availableMonths': ['2015-08', '2015-09', '2015-10', '2015-11'],
    'siteCode': 'SOAP'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2015-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-02',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/CLBJ/2017-12'],
    'availableMonths': ['2015-03',
     '2016-02',
     '2016-03',
     '2016-04',
     '2016-05',
     '2016-08',
     '2016-10',
     '2016-11',
     '2017-11',
     '2017-12'],
    'siteCode': 'CLBJ'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2017-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/SCBI/2018-01'],
    'availableMonths': ['2014-08',
     '2014-09',
     '2015-08',
     '2015-09',
     '2015-10',
     '2016-09',
     '2016-10',
     '2017-10',
     '2017-11',
     '2017-12',
     '2018-01'],
    'siteCode': 'SCBI'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/NIWO/2016-10'],
    'availableMonths': ['2015-06',
     '2015-07',
     '2015-08',
     '2015-09',
     '2016-08',
     '2016-09',
     '2016-10'],
    'siteCode': 'NIWO'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/PUUM/2018-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/PUUM/2018-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/PUUM/2018-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/PUUM/2018-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/PUUM/2018-08'],
    'availableMonths': ['2018-04', '2018-05', '2018-06', '2018-07', '2018-08'],
    'siteCode': 'PUUM'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2018-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TREE/2018-05'],
    'availableMonths': ['2015-07',
     '2015-08',
     '2016-09',
     '2016-10',
     '2017-08',
     '2017-09',
     '2017-10',
     '2017-11',
     '2018-04',
     '2018-05'],
    'siteCode': 'TREE'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2015-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-02',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-06',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-07',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2017-02',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2017-03',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2017-04',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2017-12',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2018-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/GUAN/2018-02'],
    'availableMonths': ['2015-05',
     '2015-06',
     '2015-07',
     '2015-08',
     '2015-09',
     '2015-10',
     '2015-11',
     '2016-02',
     '2016-03',
     '2016-04',
     '2016-05',
     '2016-06',
     '2016-07',
     '2016-08',
     '2016-09',
     '2016-10',
     '2016-11',
     '2017-02',
     '2017-03',
     '2017-04',
     '2017-12',
     '2018-01',
     '2018-02'],
    'siteCode': 'GUAN'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2014-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2014-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2014-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2017-05',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2018-01',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/DSNY/2018-05'],
    'availableMonths': ['2014-08',
     '2014-09',
     '2014-10',
     '2016-11',
     '2017-05',
     '2018-01',
     '2018-05'],
    'siteCode': 'DSNY'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TEAK/2015-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TEAK/2015-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/TEAK/2015-10'],
    'availableMonths': ['2015-08', '2015-09', '2015-10'],
    'siteCode': 'TEAK'},
   {'availableDataUrls': ['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2016-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2016-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2016-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2017-08',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2017-09',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2017-10',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2017-11',
     'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/UNDE/2018-05'],
    'availableMonths': ['2016-08',
     '2016-09',
     '2016-11',
     '2017-08',
     '2017-09',
     '2017-10',
     '2017-11',
     '2018-05'],
    'siteCode': 'UNDE'}],
  'specs': [{'specId': 3658, 'specNumber': 'NEON.DOC.000987vG'},
   {'specId': 2681, 'specNumber': 'NEON.DOC.000914vA'},
   {'specId': 2674, 'specNumber': 'NEON_vegStructure_userGuide_vA'}],
  'themes': ['Organisms, Populations, and Communities',
   'Land Use, Land Cover, and Land Processes']}}

To display the content headers, you can use the dictionary .keys() method:


In [6]:
r.json().keys()


Out[6]:
dict_keys(['data'])

We can see that everything is nested under the 'data' key, so let's look at the keys in the data dictionary:


In [7]:
r.json()['data'].keys()


Out[7]:
dict_keys(['productScienceTeamAbbr', 'changeLogs', 'productDescription', 'productHasExpanded', 'productScienceTeam', 'productStudyDescription', 'productCodePresentation', 'productDesignDescription', 'productCode', 'productStatus', 'productRemarks', 'productName', 'productAbstract', 'siteCodes', 'themes', 'productSensor', 'productCategory', 'productCodeLong', 'keywords', 'specs'])

Or to print each key on a separate line (to more easily view), run the following:


In [8]:
for k, v in r.json().items():
    for k1, v1 in v.items():
        print(k1)


productScienceTeamAbbr
changeLogs
productDescription
productHasExpanded
productScienceTeam
productStudyDescription
productCodePresentation
productDesignDescription
productCode
productStatus
productRemarks
productName
productAbstract
siteCodes
themes
productSensor
productCategory
productCodeLong
keywords
specs

We want to extract the 'availableDataUrls' from the 'siteCodes' key, and only list the ones that match the site in question, in this case 'ABBY'. One way to do that is to loop through all the site codes, search for a match with the site we want, and then print the list of available data for that site:


In [9]:
site = 'ABBY'
for i in range(len(r.json()['data']['siteCodes'])):
    if site in r.json()['data']['siteCodes'][i]['siteCode']:
        data_urls = r.json()['data']['siteCodes'][i]['availableDataUrls']
data_urls #display all ABBY DP1.10098.001 data urls


Out[9]:
['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2015-07',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2015-08',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-08',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-09',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-10',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2016-11',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-03',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-04',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-07',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-08',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-09']

If you only want to extract the most recent year's data (in this case 2017), you can further subset these urls by date as follows:


In [10]:
abby_2017_urls = [url for url in data_urls if '2017' in url]
abby_2017_urls


Out[10]:
['http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-03',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-04',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-07',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-08',
 'http://data.neonscience.org:80/api/v0/data/DP1.10098.001/ABBY/2017-09']

Now that we have the list of api urls corresponding to the data products we want to download, we can make another request. Let's start with the first url as an example, then loop through all of the urls:


In [11]:
r = requests.get(abby_2017_urls[0])
r.json()


Out[11]:
{'data': {'files': [{'crc32': 'dfcc253696bc54002e48ed0587aab7f1',
    'name': 'NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T211326Z.csv',
    'size': '855968',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=d56210cc41a6f87b263e0453c36ccdad3c1f194f64ecfceb049d5eebae451cf2'},
   {'crc32': 'abc4f207b8803db906cd520e580ca7f6',
    'name': 'NEON.D16.ABBY.DP1.10098.001.2017-03.basic.20180508T211326Z.zip',
    'size': '152440',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.2017-03.basic.20180508T211326Z.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9845dac85986b815aafafd7496cc08ccaa85d8e2e59083a665f876acd6062283'},
   {'crc32': '0f7a8425f851e12a882d360b8e527afe',
    'name': 'NEON.D16.ABBY.DP1.10098.001.EML.20170314-20170331.20180508T211326Z.xml',
    'size': '101625',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.EML.20170314-20170331.20180508T211326Z.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=94dfcb71c5061300d3535244a0cd0c65f85269d21d8bfbbc52d663031b52854c'},
   {'crc32': 'aa238d147c8647036f92872605621dc3',
    'name': 'NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-03.basic.20180508T211326Z.csv',
    'size': '220378',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-03.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=b211c8f0c60edd7c0e7b5cd94a87f0bc7c41e36066a7a616672313eaab7423f4'},
   {'crc32': '2880f17d1b8c5de0c1e3cc20d8077c88',
    'name': 'NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-03.basic.20180508T211326Z.csv',
    'size': '7640',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-03.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=c216bb78b21bc4e463e30a799e3be0cd84eef5c0037694dc6d3a495e9f095cf9'},
   {'crc32': '5eb18dcad9d8e6e089faab929d25f98b',
    'name': 'NEON.D16.ABBY.DP1.10098.001.readme.20180508T211326Z.txt',
    'size': '15261',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.readme.20180508T211326Z.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=25919b1214db73babcf711448542fa8942cb85f6783b632b590d31d76170f0f3'},
   {'crc32': '85fcb74770d23f142bb8599d6d7c528c',
    'name': 'NEON.D16.ABBY.DP0.10098.001.validation.20180508T211326Z.csv',
    'size': '22256',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP0.10098.001.validation.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=230a199772328279146a0c013103cae0d19501390e5d97c9d46f155c4c3d3603'},
   {'crc32': 'c0cd75bf583a8c488a5990f57bbc9b3c',
    'name': 'NEON.D16.ABBY.DP1.10098.001.variables.20180508T211326Z.csv',
    'size': '13253',
    'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.variables.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=fa2d7f67a8f983d66f58374b98ee3345a2874a2ae5efb3096dcc7a4e2de00ab3'}],
  'month': '2017-03',
  'productCode': 'DP1.10098.001',
  'siteCode': 'ABBY'}}

Display the keys to show the information provided for each file:


In [12]:
r.json()['data'].keys()


Out[12]:
dict_keys(['files', 'siteCode', 'month', 'productCode'])

The download url links are nested under ['data']['files']:


In [13]:
r.json()['data']['files']


Out[13]:
[{'crc32': 'dfcc253696bc54002e48ed0587aab7f1',
  'name': 'NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T211326Z.csv',
  'size': '855968',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3599&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=d56210cc41a6f87b263e0453c36ccdad3c1f194f64ecfceb049d5eebae451cf2'},
 {'crc32': 'abc4f207b8803db906cd520e580ca7f6',
  'name': 'NEON.D16.ABBY.DP1.10098.001.2017-03.basic.20180508T211326Z.zip',
  'size': '152440',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.2017-03.basic.20180508T211326Z.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=9845dac85986b815aafafd7496cc08ccaa85d8e2e59083a665f876acd6062283'},
 {'crc32': '0f7a8425f851e12a882d360b8e527afe',
  'name': 'NEON.D16.ABBY.DP1.10098.001.EML.20170314-20170331.20180508T211326Z.xml',
  'size': '101625',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.EML.20170314-20170331.20180508T211326Z.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=94dfcb71c5061300d3535244a0cd0c65f85269d21d8bfbbc52d663031b52854c'},
 {'crc32': 'aa238d147c8647036f92872605621dc3',
  'name': 'NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-03.basic.20180508T211326Z.csv',
  'size': '220378',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-03.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=b211c8f0c60edd7c0e7b5cd94a87f0bc7c41e36066a7a616672313eaab7423f4'},
 {'crc32': '2880f17d1b8c5de0c1e3cc20d8077c88',
  'name': 'NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-03.basic.20180508T211326Z.csv',
  'size': '7640',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-03.basic.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=c216bb78b21bc4e463e30a799e3be0cd84eef5c0037694dc6d3a495e9f095cf9'},
 {'crc32': '5eb18dcad9d8e6e089faab929d25f98b',
  'name': 'NEON.D16.ABBY.DP1.10098.001.readme.20180508T211326Z.txt',
  'size': '15261',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.readme.20180508T211326Z.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=25919b1214db73babcf711448542fa8942cb85f6783b632b590d31d76170f0f3'},
 {'crc32': '85fcb74770d23f142bb8599d6d7c528c',
  'name': 'NEON.D16.ABBY.DP0.10098.001.validation.20180508T211326Z.csv',
  'size': '22256',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP0.10098.001.validation.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=230a199772328279146a0c013103cae0d19501390e5d97c9d46f155c4c3d3603'},
 {'crc32': 'c0cd75bf583a8c488a5990f57bbc9b3c',
  'name': 'NEON.D16.ABBY.DP1.10098.001.variables.20180508T211326Z.csv',
  'size': '13253',
  'url': 'https://neon-prod-pub-1.s3.data.neonscience.org/NEON.DOM.SITE.DP1.10098.001/PROV/ABBY/20170301T000000--20170401T000000/basic/NEON.D16.ABBY.DP1.10098.001.variables.20180508T211326Z.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20190110T181042Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=pub-internal-read%2F20190110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=fa2d7f67a8f983d66f58374b98ee3345a2874a2ae5efb3096dcc7a4e2de00ab3'}]

Now we have all the information we need to download the files for each of the months data is available. First, make a directory to download the data:


In [14]:
tos_data_folder = './Data/ABBY_TOS_WoodyVegStructure/' #create a folder in current directory to store TOS data
os.mkdir('./Data/')
os.mkdir(tos_data_folder)

Loop through the 2017 data urls and use the urllib.request.urlretrieve method download all the files except the zip folder (to avoid redundance) to the data folder, with a subfolder named after the month: ./Data/ABBY_TOS_WoodyVegStructure/yyyy_mm:


In [15]:
for url in abby_2017_urls:
    month = url.split('/')[-1]
    download_folder = tos_data_folder + month + '/'
    os.mkdir(download_folder)
    r = requests.get(url)
    files = r.json()['data']['files']
    for i in range(len(files)):
        if '.zip' not in files[i]['name']:
            print('downloading ' + files[i]['name'] + ' to ' + download_folder)
            urllib.request.urlretrieve(files[i]['url'], download_folder + files[i]['name'])


downloading NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T211326Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP1.10098.001.EML.20170314-20170331.20180508T211326Z.xml to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-03.basic.20180508T211326Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-03.basic.20180508T211326Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP1.10098.001.readme.20180508T211326Z.txt to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP0.10098.001.validation.20180508T211326Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP1.10098.001.variables.20180508T211326Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-03/
downloading NEON.D16.ABBY.DP0.10098.001.validation.20180508T210449Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-04.basic.20180508T210449Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.readme.20180508T210449Z.txt to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T210449Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-04.basic.20180508T210449Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.variables.20180508T210449Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.EML.20170403-20170403.20180508T210449Z.xml to ./Data/ABBY_TOS_WoodyVegStructure/2017-04/
downloading NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-07.basic.20180508T205059Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP0.10098.001.validation.20180508T205059Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-07.basic.20180508T205059Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T205059Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.variables.20180508T205059Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.readme.20180508T205059Z.txt to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.EML.20170726-20170731.20180508T205059Z.xml to ./Data/ABBY_TOS_WoodyVegStructure/2017-07/
downloading NEON.D16.ABBY.DP1.10098.001.EML.20170801-20170803.20180508T205121Z.xml to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T205121Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP1.10098.001.readme.20180508T205121Z.txt to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP0.10098.001.validation.20180508T205121Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP1.10098.001.variables.20180508T205121Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP1.10098.001.vst_perplotperyear.2017-08.basic.20180508T205121Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-08/
downloading NEON.D16.ABBY.DP1.10098.001.vst_apparentindividual.2017-09.basic.20180508T205224Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.vst_mappingandtagging.basic.20180508T205224Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.readme.20180508T205224Z.txt to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.EML.20170913-20170929.20180508T205224Z.xml to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.variables.20180508T205224Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP0.10098.001.validation.20180508T205224Z.csv to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/

Alternatively, you could loop through all the 2017 data and download only the zip files directly to the ./Data folder (without separating into monthly subfolders) as follows:


In [16]:
for url in abby_2017_urls:
    r = requests.get(url)
    files = r.json()['data']['files']
    for i in range(len(files)):
        if '.zip' in files[i]['name']:
            print('downloading ' + files[i]['name'] + ' to ' + download_folder)
            urllib.request.urlretrieve(files[i]['url'], tos_data_folder + files[i]['name'])


downloading NEON.D16.ABBY.DP1.10098.001.2017-03.basic.20180508T211326Z.zip to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.2017-04.basic.20180508T210449Z.zip to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.2017-07.basic.20180508T205059Z.zip to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.2017-08.basic.20180508T205121Z.zip to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/
downloading NEON.D16.ABBY.DP1.10098.001.2017-09.basic.20180508T205224Z.zip to ./Data/ABBY_TOS_WoodyVegStructure/2017-09/