-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.Rmd
125 lines (86 loc) · 6 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
output:
github_document:
html_preview: true
---
<!--
Copyright 2019 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.
-->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
warning = FALSE,
message = FALSE
)
```
# fasstr <img src="man/figures/fasstr.png" align="right" />
<!-- badges: start -->
[![img](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![R-CMD-check](https://github.com/bcgov/fasstr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bcgov/fasstr/actions/workflows/R-CMD-check.yaml)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/fasstr)](https://cran.r-project.org/package=fasstr) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/fasstr?color=brightgreen)](https://CRAN.R-project.org/package=fasstr) [![cran checks](https://badges.cranchecks.info/worst/fasstr.svg)](https://cran.r-project.org/web/checks/check_results_fasstr.html)
<!-- badges: end -->
The Flow Analysis Summary Statistics Tool for R (`fasstr`) is a set of [R](http://www.r-project.org) functions to tidy, summarize, analyze, trend, and visualize streamflow data. This package summarizes continuous daily mean streamflow data into various daily, monthly, annual, and long-term statistics, completes annual trends and frequency analyses.
This package provides functions for streamflow data analysis, including:
- data tidying (to prepare data for analyses; `add_*` and `fill_*` functions),
- data screening (to identify data range, outliers and missing data; `screen_*` functions),
- calculating summary statistics (long-term, annual, monthly and daily statistics; `calc_*`functions),
- computing analyses (volume frequency analyses and annual trending; `compute_*` functions), and,
- visualizing data (plotting the various statistics; `plot_*` functions).
Useful features of functions include:
- the integration of the `tidyhydat` package to pull streamflow data from a Water Survey of Canada [HYDAT](https://www.canada.ca/en/environment-climate-change/services/water-overview/quantity/monitoring/survey/data-products-services/national-archive-hydat.html) database for analyses;
- arguments for filtering of years and months in analyses and plotting;
- choosing the start month of your water year;
- selecting for rolling day averages (e.g. 7-day rolling average); and,
- choosing how missing dates are handled, amongst others.
This package is maintained by the Water Management Branch of the British Columbia Ministry of Water, Land and Resource Stewardship.
### Installation
You can install `fasstr` directly from [CRAN](https://cran.r-project.org/package=fasstr):
```{r, echo=TRUE, eval=FALSE}
install.packages("fasstr")
```
To install the development version from [GitHub](https://github.com/bcgov/fasstr), use the [`remotes`](https://cran.r-project.org/package=remotes) package then the `fasstr` package:
```{r, echo=TRUE, eval=FALSE}
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("bcgov/fasstr")
```
To use the `station_number` argument and pull data directly from a [Water Survey of Canada HYDAT database](https://www.canada.ca/en/environment-climate-change/services/water-overview/quantity/monitoring/survey/data-products-services/national-archive-hydat.html) into `fasstr` functions, download a HYDAT file using the following code:
```{r, echo=TRUE, eval=FALSE}
tidyhydat::download_hydat()
```
### Using fasstr
There are several vignettes and a cheatsheet to provide more information on the usage of `fasstr` functions and how to customize various argument options.
- [Getting Started](https://bcgov.github.io/fasstr/articles/fasstr.html)
- [Users Guide](https://bcgov.github.io/fasstr/articles/fasstr_users_guide.html)
- [Computing an Annual Trends Analysis](https://bcgov.github.io/fasstr/articles/fasstr_trending_analysis.html)
- [Computing a Volume frequency Analysis](https://bcgov.github.io/fasstr/articles/fasstr_frequency_analysis.html)
- [Computing a Full fasstr Analysis](https://bcgov.github.io/fasstr/articles/fasstr_full_analysis.html)
- [Internal fasstr Workflows](https://bcgov.github.io/fasstr/articles/fasstr_under_the_hood.html)
#### Cheatsheet
<a href="https://github.com/bcgov/fasstr/raw/main/fasstr_cheatsheet.pdf"><img src="man/figures/fasstr_cheatsheet.png" width="630" height="252"/></a>
### Getting Help or Reporting an Issue
To report bugs/issues/feature requests, please file an [issue](https://github.com/bcgov/fasstr/issues/).
### How to Contribute
If you would like to contribute to the package, please see our
[CONTRIBUTING](CONTRIBUTING.md) guidelines.
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
### License
Copyright 2019 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.