Introduction

This documentation describes how tables from the New York State Department of Environmental Conservation's (NYSDEC's) database are prepared for informing assessments using the stayCALM R-package. Some of this work will not be necessary once the database is finalized. There will still be some amount of data preparation, but it should not be as extensive.

Preprocessing

Prepare the R Environment

Load the necessary R packages into the global environment.

library(tidyverse)
library(readxl)

Upload and Prepare CALM Logic Files.

These files should be finalized and added to the the Assessment database.

Establish the file path to the Excel workbook created by Keleigh Reynolds and Sarah Rickard to tabularize NYSDEC's water quality standards.

calm_logic.path <- file.path(
  "C:",
  "Users",
  "zmsmith.000",
  "New York State Office of Information Technology Services",
  "BWAM - Automation of Assessment",
  "Logic_CALM_Automation_v3.xlsx"
)

This sheet contains some of NYSDEC's water quality standards (WQS). An authoritative table should be included in the Assessment database moving forward.

nysdec_wqs <- read_xlsx(calm_logic.path,
                           sheet = "wqs")

Export NYSDEC WQS

With the usethis package, the Assessment data is exported as a .rda file making it easily accessible during the development and testing of the stayCALM package.

usethis::use_data(nysdec_wqs, overwrite = TRUE)


BWAM/wqs documentation built on March 24, 2020, 5:26 p.m.