acquire_neon_data: Acquire NEON data for processing

View source: R/acquire_neon_data.R

acquire_neon_dataR Documentation

Acquire NEON data for processing

Description

Given a site code and dates, apply the neonUtilities package to download the data from NEON API

Usage

acquire_neon_data(
  site_name,
  download_date,
  token = NULL,
  time_frequency = "30_minute",
  provisional = FALSE,
  depth_chop = NULL
)

Arguments

site_name

Required. NEON code for a particular site (a string)

download_date

Required. Date where we end getting NEON data. Format: YYYY-MM (can't specify day). So "2020-05" means it will grab data for the entire 5th month of 2020. (a string). Downloads data for a given month only

token

NEON API token. Required to download data. Defaults to NULL. The function [neon_api_token()] will install it locally to your R environment. A token can be acquired at https://www.neonscience.org/resources/learning-hub/tutorials/api-token-setup.

time_frequency

Required. Defaults to 30 minutes. Will you be using 30 minute ("30_minute") or 1 minute ("1_minute") recorded data?

provisional

Required. Defaults to FALSE (similar to include.provisional in loadByProduct). Should you use provisional data when downloading? Defaults to FALSE. See NEON Data Releases.

depth_chop

Required. Defaults to NULL (all levels) Determine if you want to only take measurement levels that are closest to the surface. This will filter all measurement levels above the integer depth provided. The provided number must be greater than 4 (top 4 levels).

Value

A list containing stacked environmental data ('site_data') and soil properties ('site_megapit').

Author(s)

John Zobitz zobitz@augsburg.edu

Examples

## Not run: 

# Test to see if you have a NEON API token installed in your local environment.
# If you don't have one, an error message will report a website for access.
get_neon_api_token()

# If no token exists, then see documentation for neonSoilFlux::neon_api_token()

out_env_data <- acquire_neon_data(site_name = 'SJER',download_date = '2022-06')

## End(Not run)

neonSoilFlux documentation built on July 3, 2026, 5:07 p.m.