Skip to content

poissonconsulting/teckfish

Repository files navigation

Lifecycle: experimental R-CMD-check Codecov test coverage License: MIT

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.

Installation

# 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).

library(teckfish)
gsdd(gsdd::temperature_data)
#> # A tibble: 1 × 2
#>    year  gsdd
#>   <int> <dbl>
#> 1  2019 3899.

gdd calculate the growing degree days (GDD) to a date.

gdd(gsdd::temperature_data, end_date = as.Date("1972-08-30"))
#> # A tibble: 1 × 2
#>    year   gdd
#>   <int> <dbl>
#> 1  2019 3102.

gss calculates the growing season(s) (GSS).

gss(gsdd::temperature_data)
#> # A tibble: 1 × 5
#> # Groups:   year [1]
#>    year start_dayte end_dayte   gsdd truncation
#>   <int> <date>      <date>     <dbl> <chr>     
#> 1  2019 1971-03-20  1971-11-07 3899. none

gss_plots plots the temperature time series including growing season(s), moving average and thresholds.

gss_plot(gsdd::temperature_data)

Contribution

Please report any issues.

Pull requests are always welcome.

Code of Conduct

Please note that the teckfish project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.