myrwaR: myrwaR: R Tools for the Mystic River Watershed Association

myrwaRR Documentation

myrwaR: R Tools for the Mystic River Watershed Association

Description

The myrwaR package contains sets of functions for loading data from the MyRWA Access database, and for analyzing hydrologic and water quality data. The package also includes rmarkdown templates for automated report generation.

Database Functions

  • db_connect: Creates a connection handler for the Access database

  • db_results: Fetches water quality results and joins them with the visit table

  • db_table: Fetches all rows for a single table

  • db_list_tables: Lists all tables in the database

  • db_table_fields: Lists all column names for a single table

  • db_locations: Fetches the locations joined with water body and location type information

  • load_wq: Generates a dataframe of water quality Results merged with both the Visit and Location tables

Database QAQC Functions

  • compare_database: Compare two database versions and summarize differences between them

  • qaqc_table_results: Runs QAQC tests on Results table

Precipitation Functions

  • load_precip_from_xls: Loads an hourly precipitation dataset from the LoganPrecip.xls Excel file

  • load_precip_from_usgs: Retrieves hourly precipitation from USGS NWIS

  • antecedent_precip: Computes hourly antecedent precipitation (e.g. 48-hour total precipitation)

  • append_weather: Appends antecedent precipitation and weather condition (Dry/Wet) to a water quality data frame

  • assign_precip_events: Delineates an hourly precipitation timeseries into discrete dry and wet events

  • precip_event_summary: Creates a summary table of precipitation events (e.g. duration, total depth, peak rate, etc.)

WQX Export

  • wqx_projects: Convert Projects to WQX Format

  • wqx_locations: Convert Locations to WQX Format

  • wqx_results: Convert Results to WQX Format

  • wqx_validate_locations: Validate converted Locations table against WQX requirements

  • wqx_validate_results: Validate converted Results table against WQX requirements

Report Templates

  • hotspot_report: Hotspot Report Template

Miscellaneous

  • water_year: Returns water year of specified date(s)


walkerjeffd/myrwaR documentation built on Nov. 14, 2024, 1:25 p.m.