Previously known as rems2aquachem, as the scope of this tool has expanded, we have renamed it to better reflect what it does
knitr::opts_chunk$set( comment = "#>", fig.path = "man/figures/", out.width = "100%" )
The goal of bcgwcat is to provide easy access to EMS data as well as tools specific to those working with groundwater through R functions but also through a Shiny user-interface. This tool can help with:
install.packages("pak", dependencies = TRUE)
pak::pkg_install("bcgov/bcgwcat")
[Update All if asked]gw_app()
Install pak In the console type the following and hit enter
r
install.packages("pak", dependencies = TRUE)
5. Check that your system is ready Install build tools if prompted
r
pkgbuild::check_build_tools()
6. Install bcgwcat In the console type the following and hit enter
(be sure to install all updates if prompted!)
r
pak::pkg_install("bcgov/bcgwcat")
Update rems In the console type the following and hit enter
r
pak::pkg_install("bcgov/rems")
Note: If you run into errors during the rems data updates, this might be due to old rems caches.
Try the following: 1. Uninstall rems - RStudio, go to the lower right hand window, click on the "Packages" tab, in the search bar, search for "rems", then click on the "X" in a circle to the right of it's name.
Remove the rems cache - Delete the cache folders by going to
C:\Users\YOUR_USER\AppData\Local
(windows) or~/Library/Application Support (mac)
and delete the "rems" folderRe-install rems
pak::pkg_install("bcgov/rems")
and then try again
Update all packages If you run into errors right at the start, consider updating your packages.
r
pak::pkg_install("bcgov/bcgwcat", upgrade = TRUE)
Type this line into the R console at the prompt (in the screen with >
) and
hit 'Enter'.
r
bcgwcat::gw_app() # Launch the app
See the tutorial for a more in-depth look at how to use the User Interface
bcgwcat can also be used directly from R.
To extract EMS data, and convert for use in AquaChem... (by default saved as CSV)
library(bcgwcat) r <- rems_to_aquachem(ems_ids = c("1401030", "1401377", "E292373")) r
file.remove(paste0("aquachem_", Sys.Date(), ".csv"))
To create plots...
piper_plot(r, ems_id = "1401030")
stiff_plot(r, ems_id = "1401030")
See the bcgwcat website
Copyright 2024 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.