get_TERN: Get occurrence records from TERN

get_ternR Documentation

Get occurrence records from TERN

Description

TERN is the Terrestrial Ecosystem Research Network. Built on the ausplotsR::get_ausplots function.

Usage

get_tern(
  aoi,
  save_dir = NULL,
  get_new = FALSE,
  name = "tern",
  data_map = NULL,
  m_kind = "percent_cover",
  cover_type = "PFC",
  species_name = "SN",
  strip_bryophytes = FALSE,
  make_lifeform = TRUE,
  ...
)

Arguments

aoi

sf. Polygon defining area of interest for retrieving data. Used as sf::st_bbox(aoi).

save_dir

Character. Path to directory into which to save outputs. If null results will be saved to here::here("out", "ds", "tern"). File will be named tern_raw.parquet

get_new

Logical. If FALSE, will attempt to load from existing save_dir.

name

Character. data_name value in envImport::data_map (or other data_map)

data_map

Dataframe or NULL. Mapping of fields to retrieve. See example envImport::data_map

m_kind, cover_type, species_name, strip_bryophytes

Arguments required by ausplotsR::species_table()

make_lifeform

Logical. If true, the columns growth_form and height in obj$veg.PI are used to estimate a lifeform for each taxa within each unique site.

...

Passed to envImport::file_prep()

Value

Dataframe of occurrences and file saved to save_dir

Examples


  library("envImport")

  out_dir <- file.path(system.file(package = "envImport"), "examples")

  aoi <- envImport::aoi

  qry_tern <- get_tern(aoi = aoi
                       , save_dir = out_dir
                       , data_map = data_map
                       , get_new = TRUE
                       )

Acanthiza/envImport documentation built on Aug. 14, 2024, 8:18 a.m.