Reads in external sonde data, combines with internal data sets and produces a single surfer plot of a user defined metric.
Source:R/metric_plotter.R
plot_metric.Rd
plot_metric
takes a file path to monitoring data and creates a single
surfer plot of a user defined metric. Plots are saved to the current
working directory.
Arguments
- path
Character string file path to location of edited xlsx workbook. User is expected to have appended data from 2 sondes into one work sheet, standardising the data and naming the sheet "edited data". Data variables should only consist of the date, site and vpos columns along with measured metrics of interest. Do not include GPS coordinates, time or the 'dep m' columns.
- samp
Colour represented as a character string (e.g. "red", "cyan") for the sampling locations in the water column. Changing colour can help them stand out in the different colour scales used for the interpolation. Default "red".
- colscale
A single letter designating a Viridis colour scale to be used for the interpolation. Any letter from A-H. Default "d".
Value
A png format single panel surfer plot of the Canning River for the user's choice of metric saved to the working directory. Plot name will contain date and chosen metric.
Details
The metric plot shows a cross-section of the river where the metric of interest has been interpolated between sonde locations. A thin plate spline has been used for the interpolation.
The function expects 1 excel workbook for the one monitoring run. The user is expected to have appended raw data from the 2 sondes into one data file, ensuring that data formats are consistent for all columns. The edited sheet must be renamed to "edited data". Also the 'dep m' column should not be included.
Upon reading in the data, the function will present the user with a choice of metric to plot via numerical keyboard entry.
A river "bottom" is displayed which puts the interpolation in context. The river bottom has been derived from a combination of historical maximum depths at sampling locations as well as station points extracted from a "best" navigation line over the latest corporate bathymetry. See project documentation for further details.
Note this plot is designed for ad-hoc visualisations.
Author
Bart Huntley, bart.huntley@dbca.wa.gov.au
For more details see https://dbca-wa.github.io/rivRmon/index.html the rivRmon website