-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
90 lines (61 loc) · 2.54 KB
/
README.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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/poissonconsulting/teckfish/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/poissonconsulting/teckfish/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/poissonconsulting/teckfish/branch/main/graph/badge.svg)](https://codecov.io/gh/poissonconsulting/teckfish?branch=main)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/license/mit/)
<!-- badges: end -->
# teckfish
## Introduction
`teckfish` is an R package for Teck Fish Projects.
It is intended to be used by Teck staff and contractors and anyone else
who finds it useful.
The intention is to eventually migrate it to
the [Teck Resources RDS GitHub organization](https://github.com/TeckResourcesTDS).
## Installation
```r
# install.packages("remotes")
remotes::install_github("poissonconsulting/teckfish")
```
## Demonstration
### Growing Season Degree Days
`gsdd()` takes data frame with a `date` and `temperature` column with
the mean daily water temperature in centigrade
and calculates the growing season degree days (GSDD).
```{r}
library(teckfish)
gsdd(gsdd::temperature_data)
```
`gdd` calculate the growing degree days (GDD) to a date.
```{r}
gdd(gsdd::temperature_data, end_date = as.Date("1972-08-30"))
```
`gss` calculates the growing season(s) (GSS).
```{r}
gss(gsdd::temperature_data)
```
`gss_plots` plots the temperature time series including growing season(s), moving average and thresholds.
```{r}
gss_plot(gsdd::temperature_data)
```
### ATUs
`date_atus` calculates the date on which a specified number of accumulated thermal units are exceeded.
```{r}
date_atus(gsdd::temperature_data, start_date = as.Date("1972-06-15"), atus = 600)
```
## Contribution
Please report any [issues](https://github.com/poissonconsulting/teckfish/issues).
[Pull requests](https://github.com/poissonconsulting/teckfish/pulls) are always welcome.
## Code of Conduct
Please note that the teckfish project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.