read_historic_data: Read historic ems data into R.

View source: R/ems_duckdb.R

read_historic_dataR Documentation

Read historic ems data into R.

Description

You will need to have run download_historic_data before you can use this function

Usage

read_historic_data(
  emsid = NULL,
  parameter = NULL,
  param_code = NULL,
  from_date = NULL,
  to_date = NULL,
  cols = "wq",
  check_db = TRUE
)

Arguments

emsid

A character vector of the ems id(s) of interest

parameter

a character vector of parameter names

param_code

a character vector of parameter codes

from_date

A date string in a standard unambiguous format (e.g., "YYYY/MM/DD")

to_date

A date string in a standard unambiguous format (e.g., "YYYY/MM/DD")

cols

colums. Default "wq". See link{get_ems_data} for further documentation.

check_db

should the function check for cached data or updates? Default TRUE.

Value

a data frame of the results

Examples

## Not run: 
read_historic_data(emsid = "0400203", from_date = as.Date("1984-11-20"),
  to_date = as.Date("1991-05-11"))

## End(Not run)

bcgov/rems documentation built on Oct. 14, 2023, 3:04 a.m.