Reads in curated Oxy KPI sonde data and exports cummulative Oxy KPI plots and stats for the purpose of weekly updates.
Source:R/oxy_wranglR.R
oxy_wranglR.Rd
oxy_wranglR
takes a file path to a Project folder that contains
a `data/` directory containing curated dissolved oxygen sonde data.
The function summarises the data producing stats, saved as a csv to
`data/` and KPI plots saved to a `plots/` directory.
Arguments
- path
Character string file path to location of the `data/` directory.
- weir_open
Character string representing the date ("yyyy-mm-dd") the Canning Weir was opened (if appropriate), default: NULL
- weir_closed
Character string representing the date ("yyyy-mm-dd") the Canning Weir was closed (if appropriate), default: NULL
Value
Three PNG Oxy KPI plots saved to `plots/` directory and a csv file of the current Oxy KPI stats saved tp `data/` directory.
Details
The curated data consists of a csv file that has edited data appended to it on a weekly basis. The function expects 4 columns: Site Code, Date, Depth and ODO and the file should have the naming convention: "River_yyyy-yy_oxy_kpi.csv". Please NOTE that the date format for the Date column should be "dd-mm-yyyy".
When run the function outputs weekly operational targets and cummulative annual KPI's for both 2 mg/L and 4 mg/L concentrations of dissolved oxygen, as csv files.
The Function also creates 3 plots. A cummulative DO concentration plot, a DO > 2 mg/L plot and a DO > 4 mg/L plot. Format is PNG in the knowledge that they will need to be opened in Windows Paint to allow copying and pasting into a weekly update email.
Author
Bart Huntley, bart.huntley@dbca.wa.gov.au
For more details see https://dbca-wa.github.io/rivRmon/index.html the rivRmon website