DeltaDater: Process report data

View source: R/DeltaDater.R

DeltaDaterR Documentation

Process report data

Description

Imports, filters, and processes datasets and outputs a list of desired datasets

Usage

DeltaDater(
  Start_year = 2002,
  End_year = 2020,
  Variables = c("Bivalves", "Zooplankton", "Phytoplankton", "Water quality"),
  WQ_sources = c("EMP", "STN", "FMWT", "EDSM", "SKT", "20mm", "Suisun"),
  Shapefile = deltamapr::R_EDSM_Strata_1819P1,
  Region_column = "Stratum",
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta"),
  Phyt_start = 2008
)

Arguments

Start_year

Earliest year you would like included in the report. Must be an integer. Defaults to 2002. For these purposes, December is pushed to the next year to ensure Winters are in the same year.

End_year

Latest year you would like included in the dataset. Must be an integer. Defaults to 2020. For these purposes, December is pushed to the next year to ensure Winters are in the same year.

Variables

Character vector of variables you would like included in the dataset. Defaults to all possible options: Variables = c("Bivalves", "Zooplankton", "Phytoplankton", "Water quality").

WQ_sources

Character vector of data sources for the water quality variables, pulled from the discretewq package. See wq for choices.

Shapefile

Shapefile you would like used to define regions in the dataset. Must be in sf format, e.g., imported with st_read. Defaults to R_EDSM_Strata_1819P1.

Region_column

Quoted name of the column in the Shapefile with the region designations.

Regions

Character vector of regions to be included in the dataset. Must correspond with levels of the Region_column. To include all data points regardless of whether they correspond to a region in the Shapefile set Regions = NULL.

Phyt_start

First year to include for phytoplankton data. Defaults to 2008, when better counting methods were first adopted. This parameter uses calendar year.

Value

A list of datasets

Examples

Data <- DeltaDater(Start_year = 1900,
WQ_sources = c("EMP", "STN", "FMWT", "EDSM", "SKT", "20mm", "Suisun"),
Variables = "Water quality",
Regions = NULL)

sbashevkin/deltareportr documentation built on Oct. 25, 2022, 2:03 p.m.