Package 'deltareportr'

Title: Tools and Data for Automated Delta Reporting
Description: An R package for producing automated reports on the Sacramento San Joaquin Delta.
Authors: Sam Bashevkin [aut, cre]
Maintainer: Sam Bashevkin <[email protected]>
License: GPL-3
Version: 2.0.0
Built: 2024-10-31 05:10:13 UTC
Source: https://github.com/sbashevkin/deltareportr

Help Index


Bivalve dataset

Description

Bivalve abundance dataset from the California Department of Water Resources Environmental Monitoring Program.

Usage

bivalves

Format

a tibble with 8,892 rows and 7 variables

Date

Sample collection date.

Station

Station where sample was collected.

Taxa

Bivalve species name.

CPUE

Catch per unit effort in number of clams (m-2).

Year

Year sample was collected.

MonthYear

Month and year of sample collection.

Source

Name of the source dataset.

Details

More metadata and information on methods are available here.

See Also

DeltaBivalver, DeltaDater, DeltaMetadater


Dayflow dataset

Description

Outflow and X2 from the California Department of Water Resources Dayflow model.

Usage

dayflow

Format

a tibble with 13,149 rows and 7 variables

Date

Date.

Out

Delta outflow (ft3s-1).

X2

X2 (km).

Details

More metadata and information on methods are available here.

See Also

DeltaBivalver, DeltaDater, DeltaMetadater


Plot bivalve data

Description

Function to process and plot bivalve data

Usage

DeltaBivalver(
  Data,
  End_year,
  Start_year = 2002,
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta"),
  Seasons = c("Winter", "Spring", "Summer", "Fall")
)

Arguments

Data

Input dataset created by DeltaDater.

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Seasons

Character vector of seasons to include. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Value

A list with the plot and processed data.

See Also

DeltaDater


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)

Plot dayflow data

Description

Function to process and plot dayflow data

Usage

DeltaDayFlower(End_year, Start_year = 2002)

Arguments

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

Value

A list with the plot and processed data.

See Also

DeltaDater


Plot Delta Regions Map

Description

Function to map delta regions

Usage

DeltaMapper(
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta"),
  Save = FALSE,
  Save_location
)

Arguments

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Save

Logical. Should plot be saved?

Save_location

If Save=TRUE, where should plot be saved? Must end with a filename with a ".png" extension.

Value

A list with the plot and processed data.

See Also

DeltaDater


Plot Metadata

Description

Function to process and plot metadata

Usage

DeltaMetadater(
  Data,
  Start_year = 2002,
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta")
)

Arguments

Data

Input dataset created by DeltaDater.

Start_year

First year (integer) that should be included in the plot

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Value

A list with the plot and processed data.

See Also

DeltaDater


Plot phytoplankton data

Description

Function to process and plot phytoplankton data

Usage

DeltaPhyter(
  Data,
  End_year,
  Start_year = 2002,
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta"),
  Seasons = c("Winter", "Spring", "Summer", "Fall")
)

Arguments

Data

Input dataset created by DeltaDater.

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Seasons

Character vector of seasons to include. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Value

A list with the plot and processed data.

See Also

DeltaDater


deltareportr: A package to create automated reports for the Sacramento San Joaquin Delta

Description

This package contains a number of functions and datasets to generate automated reports on the Delta, as well as the reports themselves in the analysis folder.


Plot Delta Smelt data

Description

Function to process and plot Delta Smelt data

Usage

DeltaSmelter(
  End_year,
  Start_year = 2002,
  EDSM_regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River")
)

Arguments

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

EDSM_regions

Character vector of regions to include in the EDSM plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL. No Delta Smelt were caught in the Southern Delta so that region is excluded by default.

Value

A list with the plot and processed data.

See Also

DeltaDater


Plot water quality data

Description

Function to process and plot water quality (temperature, Secchi depth, salinity, chlorophyll, and Microcystis) data

Usage

DeltaWQer(
  Data,
  End_year,
  Start_year = 2002,
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Sac Deep Water Shipping Channel", "Cache Slough/Liberty Island",
    "Lower Joaquin River", "Southern Delta"),
  Temp_seasons = c("Winter", "Spring", "Summer", "Fall"),
  Secchi_seasons = c("Winter", "Spring", "Summer", "Fall"),
  Salinity_seasons = c("Winter", "Spring", "Summer", "Fall"),
  Chl_seasons = c("Winter", "Spring", "Summer", "Fall"),
  Micro_seasons = c("Winter", "Spring", "Summer", "Fall")
)

Arguments

Data

Input dataset created by DeltaDater.

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Temp_seasons

Character vector of seasons to retain for temperature. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Secchi_seasons

Character vector of seasons to retain for Secchi. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Salinity_seasons

Character vector of seasons to retain for salinity. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Chl_seasons

Character vector of seasons to retain for chlorophyll. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Micro_seasons

Character vector of seasons to retain for Microcystis. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Value

A list with the plot and processed data.

See Also

DeltaDater


Plot phytoplankton data

Description

Function to process and plot phytoplankton data

Usage

DeltaZooper(
  Data,
  End_year,
  Start_year = 2002,
  Regions = c("Suisun Bay", "Suisun Marsh", "Lower Sacramento River",
    "Lower Joaquin River", "Southern Delta"),
  Seasons = c("Winter", "Spring", "Summer", "Fall")
)

Arguments

Data

Input dataset created by DeltaDater.

End_year

Last year (integer) that should be included in the plot. This year will also be highlighted.

Start_year

First year (integer) that should be included in the plot

Regions

Character vector of regions to include in the plot. The data will be filtered to only include these regions and ordered in the order provided here. To include data with NA regions, set Regions=NULL.

Seasons

Character vector of seasons to include. One plot will be produced for each season. Should be a combination of "Summer", "Fall", "Winter", or "Spring".

Value

A list with the plot and processed data.

See Also

DeltaDater


Phytoplankton dataset

Description

Phytoplankton abundance dataset from the California Department of Water Resources Environmental Monitoring Program.

Usage

phyto

Format

a tibble with 202,420 rows and 7 variables

Date

Sample collection date.

Station

Station where sample was collected.

Taxa

Phytoplankton taxa.

CPUE

Catch per unit effort in number of cells, colonies, or filaments (ml-1).

Year

Year sample was collected.

MonthYear

Month and year of sample collection.

Source

Name of the source dataset.

Details

More metadata and information on methods are available here.

See Also

DeltaPhyter, DeltaDater, DeltaMetadater


Delta Smelt EDSM abundance estimates

Description

Estimated Delta Smelt abundance dataset from the United States Fish and Wildlife Service Enhanced Delta Smelt Monitoring Program.

Usage

smelt_edsm

Format

a tibble with 1,370 rows and 5 variables

Region

Region of abundance estimate.

Date

Abundance estimate date. Abundances are estimated weekly, but these dates represent the midpoint of each week.

Abundance

Estimated Delta Smelt abundance.

Variance

Variance of the abundance estimate.

MonthYear

Month and year of sample collection.

Details

More metadata and information on methods are available here.

See Also

DeltaSmelter


Delta Smelt IEP indices

Description

Delta Smelt abundance indices from the California Department of Fish and Wildlife surveys.

Usage

smelt_iep

Format

a tibble with 157 rows and 3 variables

Year

Index year.

Index

Delta Smelt index number.

Source

Name of the source dataset.

Details

More metadata and information on methods are available here: Fall Midwater Trawl, Spring Kodiak Trawl, 20mm Survey, and Summer Townet.

See Also

DeltaSmelter


Browse station locations

Description

Launches a leaflet map to browse station locations.

Usage

StationBrowser(
  Data = deltareportr::stations,
  Sources = NULL,
  StationIDs = NULL
)

Arguments

Data

Station location data. Defaults to stations, which only includes fixed station locations + EMP EZ locations post 2004. Does not include EDSM. Data must include columns named Latitude, Longitude, Source, and StationID.

Sources

Which data sources would you like to include? Set Sources=NULL (the default) to include all.

StationIDs

Which StationIDs to include. StationIDs take the form "Source, Station". Set StationIDs=NULL (the default) to include all.


Station locations

Description

Locations of all sampling stations.

Usage

stations

Format

a tibble with 1,266 rows and 5 variables

Source

Name of the source dataset..

Station

Station where sample was collected.

Latitude

Latitude in decimal degrees.

Longitude

Longitude in decimal degrees.

StationID

Combined source and station for a unique station ID.

See Also

DeltaDater, DeltaMetadater


Zooplankton mass conversions

Description

Average dry mass for each meso and micro zooplankton taxa

Usage

zoop_mass_conversions

Format

a tibble with 37 rows and 2 variables

Mass

Average individual mass (μ\mug).

Taxlifestage

Taxonomic name and lifestage.

See Also

DeltaZooper, DeltaDater, DeltaMetadater


Mysid data

Description

Mysid biomass per unit effort from the California Department of Fish and Wildlife Environmental Monitoring Program

Usage

zoop_mysid

Format

a tibble with 22,558 rows and 2 variables

Date

Date sample was collected.

Station

Station where sample was collected.

Taxa

Taxonomic name.

BPUE

Biomass per unit effort (μ\mug m-3).

Year

Year sample was collected.

MonthYear

Month and year sample was collected.

Source

Name of the source dataset.

Details

More metadata and information on methods are available here.

See Also

DeltaZooper, DeltaDater, DeltaMetadater