pr_dl_npn: Download USA-NPN data using the API interface

View source: R/pr_dl_npn.R

pr_dl_npnR Documentation

Download USA-NPN data using the API interface

Description

Download USA-NPN data using the API interface

Usage

pr_dl_npn(
  species = 3,
  phenophase = 371,
  start = "2000-01-01",
  end = "2017-01-01",
  extent = NULL,
  internal = TRUE,
  path = tempdir()
)

Arguments

species

A species to download, either specified by its species number or species name. list species numbers and names with check_npn_species(list = TRUE)

phenophase

A phenophase number to filter for, a list of phenophases is provided by check_npn_phenophases()

start

start date in YYYY-MM-DD format

end

end date in YYYY-MM-DD format

extent

geographic coordinates constraining the output, defined as bottom left, top right c(lon1, lat1, lon2, lat2) if null returns all data (default = NULL)

internal

completes download internally in a temporary directory

path

the path where to save the downloaded data

Value

will return a data farme for the selected species, phenophase, temporal and spatial extent or save the data to an RDS file

Examples

## Not run: 
pr_dl_npn(species = 3, internal = FALSE)

## End(Not run)

bluegreen-labs/phenor documentation built on Sept. 2, 2023, 10:34 a.m.