The primary output of this package are RMarkdown products that create tables and maps of drought relevant statistics for the province of British Columbia. These RMarkdown drought statistics packages are aligned by natural resource region, and have been developed with the input from staff from these regions who are tasked with managing and monitoring the progression of drought. Drought statistics are compiled to demonstrate the severity of hydrologic drought within a particular natural resource management region. Also included is a ‘Low Flow Advisory’ RMarkdown product that shows which streams across the entire province are low, and thus experiencing moderate to severe hydrologic drought impacts.
The BC River Forecast Centre uses bcdroughtstatistics() to produce drought statistics products for all natural resource management regions on a daily basis during the summer months; an example of the West Coast drought statistics format can be found here.
Note that this package takes real-time streamflow and stream temperature data from the Water Survey of Canada’s webservice. Thus, users need to obtain a username and password from the Water Survey of Canada that must be stored within a .REnviron file separate from this package in order to access its full functionality. Please email for more information, or to obtain a user name and password.
This package features three functions that render three variations on the drought statistics product. Two of the functions return drought statistics products tailored for specific regions within British Columbia; the third function returns the Low Flow Advisory product.
You can install bcdroughtstatistics() from this Github repository using the remotes package.
install.packages("remotes")
remotes::install_github("bcgov/bcdroughtstatistics")
library(bcdroughtstatistics)
An html version of the drought statistics package can be generated for a specific natural resource management region in BC. There are three versions of the drought statistics product: 1) a generic version for any resource management region (render_function_bc() function), 2) a version developed for the West Coast Natural Resource Region (render_function_wc()), and 3) a version developed for the Thompson-Okanagan Natural Resource Region (render_function_to() function). The three version differ slightly in style, specifically around how drought statistics are visualized. If you don’t specify where to save the RMarkdown file, then the code will automatically create a new folder in your working directory named “rmarkdown_files” into which the html product will be saved.
library(bcdroughtstatistics)
# All of the NRM regions in BC
basins <- c("Cariboo Natural Resource Region",
"Kootenay-Boundary Natural Resource Region",
"Northeast Natural Resource Region",
"Omineca Natural Resource Region",
"Skeena Natural Resource Region",
"South Coast Natural Resource Region",
"Thompson-Okanagan Natural Resource Region",
"West Coast Natural Resource Region")
## Get the Drought Statistics page for the West Coast, saving to current working directory
render_function_wc(basin = "West Coast Natural Resource Region")
In development.
To report bugs/issues/feature requests, please file an issue.
If you would like to contribute to the package, 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.
Copyright 2021 Province of British Columbia
Licensed under the Apache License, Version 2.0 (the "License");
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 "AS IS" 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 project was created using the bcgovr package.