Skip to content

bcgov/bcgwlreports

Repository files navigation

Codecov test coverage

BC Groundwater Level Percentiles Report

img

This package creates reports of percentile classes of Provincial Groundwater Observation Well groundwater levels.

Installation

To install the package from GitHub, use the remotes package then the bcgwlreports package:

if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("bcgov/bcgwlreports")

Usage

To use the bcgwlreports functions, the package must be first called from the library:

library(bcgwlreports)

The following is an example of how to create and save an HTML report from a list of wells for the current date:

# List some wells from the West Coast Region
wells <- c("OW204", "OW211", "OW312", "OW329", "OW351", "OW355", 
           "OW371", "OW383", "OW389", "OW437", "OW470")

# Give the report a title
report_title <- paste0("West Coast Region Groundwater Level Conditions")

# Give the report a description
report_description <- paste0("The following provides an overview of groundwater (GW) conditions ",
                             "in the West Coast Region as of ", format(Sys.Date(), format = "%B %d, %Y"), ".")

# Build the report
well_report (ows = wells,
             report_dates = c(Sys.Date()),
             title = report_title,
             description = report_description,
             n_days = 14,
             years_min = 5,
             out_dir = ".",
             name = "west_coast_region")

This report will calculate the percentiles of recent data compared to historical water levels. The report will look for data on the reporting date (report_dates argument) and will look back 14 days (n_days argument; will also look forward 14 days if a previous date selected). Minimum 5 years of level data is required to calculate a percentile (years_min argument). The title and description of the report need to be provided using the title and description arguments, and a directory folder and file name also need to be provided using the out_dir and name arguments. More information on the well_report function can be found in the documentation ?well_report.

Running the well_report function may take several minutes (up to 15-20 min if many) depending on the number of wells provided (to download and combine the information).

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

How to Contribute

If you would like to contribute, please see our CONTRIBUTING guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

Copyright 2022 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
for the specific language governing permissions and limitations under the
License.

This repository is maintained by the Water Protection and Sustainability Branch of the British Columbia Ministry of Land, Water and Resource Stewardship.

About

R code to report on the current status of observation well groundwater levels

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages