Skip to contents

Summarize NCCN Climate Data

Usage

summarizeParkClimateData(
  park_code = c("MORA", "NOCA", "OLYM", "SAJH"),
  parameter,
  label,
  water_year,
  summary = c("mean", "min", "max", "sum"),
  summary_period = c("day", "month"),
  period_of_record = FALSE,
  time_zone = "America/Los_Angeles"
)

Arguments

park_code

Four-letter park code(s)

parameter

A character string indicating which parameter to retrieve (e.g. "Air Temp").

water_year

Integer vector indicating the water year(s) to fetch data for

summary

Type of summary to perform. Options are "mean", "min", "max", and "sum".

summary_period

Period over which to summarize. Options are "day" and "month".

period_of_record

Summarize over the whole period of record? If TRUE, summarizes across all years in dataset. If FALSE, summaries are grouped by year.

time_zone

String indicating the time zone the data were collected in. See the full list of TZ identifiers for more info.

Value

A data frame with a column of data for each station

Examples

if (FALSE) { # \dontrun{
# Summarize monthly total precip at OLYM over entire period of record
olym_precip <- summarizeParkClimateData("OLYM", "Precip Increm", "Rainfall", summary = "sum", summary_period = "month", period_of_record = TRUE)
olym_precip_2022 <- summarizeParkClimateData("OLYM", "Precip Increm", "Rainfall", 2022, summary = "sum", summary_period = "month", period_of_record = FALSE)
} # }