download_data#

neonutilities.api.download_data(product, site, start=None, end=None, year=None, download_folder=None, package=None)[source]#

Download data from a given data product

Parameters:
  • product (str) – The data product code (eg. ‘DP1.00024.001’)

  • site (str) – The 4-digit NEON site code (eg. ‘HARV’, ‘WERF’)

  • start (str, optional) – Start date in YYYY-MM format (e.g. ‘2019-01’) Downloads entire month worth of data. Use with end parameter to download data from a range

  • end (str, optional) – End date in YYYY-MM format (e.g. ‘2020-12’) Used in conjunction with start parameter to download a range worth of available data

  • year (str, optional) – Year in YYYY format (e.g. ‘2019’) Downloads entire year worth of data

  • download_folder (str) – Folder to store downloaded files. If none is given, data is downloaded to current directory

  • package (str, optional) – Specify either ‘basic’ or ‘expanded’ package. Downloaded as zipped folder.

Notes

If no year or start parameter is given, all available data will be downloaded for all years. It is recommended to include date parameters. To download single month worth of data, only use the start parameter.

Examples

>>> import neonutilities as nu
>>> nu.api.download_data('DP1.00024.001', "HARV", start="2019-01", end="2019-02", download_folder="./data")