diff --git a/404.html b/404.html index 8175d46..c59b7a5 100644 --- a/404.html +++ b/404.html @@ -24,7 +24,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 07c408a..dfa8ad8 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 41539f7..8d36bcb 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/ISSUE_TEMPLATE.html b/ISSUE_TEMPLATE.html index b16e90e..61c3700 100644 --- a/ISSUE_TEMPLATE.html +++ b/ISSUE_TEMPLATE.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/LICENSE-text.html b/LICENSE-text.html index 853abc4..d3a891e 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/LICENSE.html b/LICENSE.html index ba1ce0f..3f85727 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/SUPPORT.html b/SUPPORT.html index 618150a..560e1b8 100644 --- a/SUPPORT.html +++ b/SUPPORT.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/articles/classify-water-temp.html b/articles/classify-water-temp.html index bc77562..b25cff5 100644 --- a/articles/classify-water-temp.html +++ b/articles/classify-water-temp.html @@ -26,7 +26,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/articles/index.html b/articles/index.html index 18f6558..87cec94 100644 --- a/articles/index.html +++ b/articles/index.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/authors.html b/authors.html index afdc5a9..fcc4933 100644 --- a/authors.html +++ b/authors.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 @@ -86,13 +86,13 @@ Citation Thorley J, Lyons S, Pearson A (2024). teckfish: R Tools for Teck Fish and Aquatic Sciences Projects. -R package version 0.0.1.9001, https://poissonconsulting.github.io/teckfish/. +R package version 0.0.1.9002, https://poissonconsulting.github.io/teckfish/. @Manual{, title = {teckfish: R Tools for Teck Fish and Aquatic Sciences Projects}, author = {Joe Thorley and Sarah Lyons and Ayla Pearson}, year = {2024}, - note = {R package version 0.0.1.9001}, + note = {R package version 0.0.1.9002}, url = {https://poissonconsulting.github.io/teckfish/}, } diff --git a/index.html b/index.html index c0623cc..22a21bc 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/news/index.html b/news/index.html index 52a0473..8557e04 100644 --- a/news/index.html +++ b/news/index.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 @@ -44,6 +44,10 @@ + +teckfish 0.0.1.9002 +Added interpolate_numeric_vector() to fill in missing values using linear interpolation. + teckfish 0.0.1.9001 diff --git a/pkgdown.yml b/pkgdown.yml index 785f13d..46eb4c5 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: classify-water-temp: classify-water-temp.html -last_built: 2024-02-03T02:59Z +last_built: 2024-02-03T03:01Z urls: reference: https://poissonconsulting.github.io/teckfish/reference article: https://poissonconsulting.github.io/teckfish/articles diff --git a/pull_request_template.html b/pull_request_template.html index df5e808..f85edc6 100644 --- a/pull_request_template.html +++ b/pull_request_template.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/classify_water_temp_data.html b/reference/classify_water_temp_data.html index 8650cfa..1341276 100644 --- a/reference/classify_water_temp_data.html +++ b/reference/classify_water_temp_data.html @@ -12,7 +12,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/freshwaterfish.html b/reference/freshwaterfish.html index 6aab636..be37e13 100644 --- a/reference/freshwaterfish.html +++ b/reference/freshwaterfish.html @@ -12,7 +12,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/gsdd_cf.html b/reference/gsdd_cf.html index eaa45ed..02caa7a 100644 --- a/reference/gsdd_cf.html +++ b/reference/gsdd_cf.html @@ -18,7 +18,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/index.html b/reference/index.html index fd7c260..c8ae39e 100644 --- a/reference/index.html +++ b/reference/index.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/interpolate_numeric_vector.html b/reference/interpolate_numeric_vector.html index 957ef45..dce63e3 100644 --- a/reference/interpolate_numeric_vector.html +++ b/reference/interpolate_numeric_vector.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/reexports.html b/reference/reexports.html index 6107eb2..1439689 100644 --- a/reference/reexports.html +++ b/reference/reexports.html @@ -24,7 +24,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/simulated_data.html b/reference/simulated_data.html index db815b1..7b6aa58 100644 --- a/reference/simulated_data.html +++ b/reference/simulated_data.html @@ -12,7 +12,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/reference/teckfish-package.html b/reference/teckfish-package.html index 83262a4..abb9186 100644 --- a/reference/teckfish-package.html +++ b/reference/teckfish-package.html @@ -10,7 +10,7 @@ teckfish - 0.0.1.9001 + 0.0.1.9002 diff --git a/search.json b/search.json index f969d90..fbdfa38 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement .github/. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to teckfish","title":"Contributing to teckfish","text":"outlines propose change teckfish.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to teckfish","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to teckfish","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to teckfish","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. Begin commit merge messages - indicate user facing changes included NEWS.md. use fledge automatically generate NEWS.md file.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to teckfish","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to teckfish","text":"Please note teckfish project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 Teck Resources Ltd. Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with teckfish","title":"Getting help with teckfish","text":"Thanks using teckfish! filing issue, places explore pieces put together make process smooth possible.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":"make-sure-its-new","dir":"","previous_headings":"","what":"Make sure its new","title":"Getting help with teckfish","text":"opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":"make-a-reprex","dir":"","previous_headings":"","what":"Make a reprex","title":"Getting help with teckfish","text":"Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! section tidyverse site.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Classify water temperature values","text":"","code":"data <- tibble::tribble( ~temperature_date_time, ~water_temperature, \"2021-05-07 00:00:00\", 40.145, \"2021-05-07 01:00:00\", 20.257, \"2021-05-07 02:00:00\", 6.257, \"2021-05-07 03:00:00\", 5.245, \"2021-05-07 04:00:00\", 2.567, \"2021-05-07 05:00:00\", 2.687, \"2021-05-07 06:00:00\", 2.175, \"2021-05-07 07:00:00\", 2.817, \"2021-05-07 08:00:00\", 2.917, \"2021-05-07 09:00:00\", 2.817, \"2021-05-07 10:00:00\", 2.867, \"2021-05-07 11:00:00\", 2.817, \"2021-05-07 12:00:00\", 2.917, \"2021-05-07 13:00:00\", 2.817, \"2021-05-07 14:00:00\", 2.867, \"2021-05-07 15:00:00\", 2.877, \"2021-05-07 16:00:00\", 3.012, \"2021-05-07 17:00:00\", 3.045, \"2021-05-07 18:00:00\", 3.124, \"2021-05-07 19:00:00\", 3.268, \"2021-05-07 20:00:00\", 3.789, \"2021-05-07 21:00:00\", 4.104, \"2021-05-07 22:00:00\", 4.178 ) |> dplyr::mutate( temperature_date_time = as.POSIXct(temperature_date_time, tz = \"UTC\") ) classified_data <- classify_water_temp_data(data) classified_data #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows ggplot(classified_data) + geom_point( aes( x = temperature_date_time, y = water_temperature, color = status_id ), alpha = 0.5 ) + labs( y = \"Temperature\", x = \"Datetime\" ) + theme_bw() + scale_x_datetime( breaks = date_breaks(\"4 hour\"), labels = date_format(\"%H:%M\") ) + scale_y_continuous( breaks = seq(-5, 45, 5), limits = c(-2, 42) ) + scale_color_manual( \"Status ID\", values = c( \"reasonable\" = \"black\", \"questionable\" = \"orange\", \"erroneous\" = \"red\" ) )"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"changing-temperature-min-and-max-parameters","dir":"Articles","previous_headings":"Usage","what":"Changing temperature min and max parameters","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_max = 1, erroneous_max = 20 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 questionable #> 9 2021-05-07 08:00:00 2.92 questionable #> 10 2021-05-07 09:00:00 2.82 questionable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"changing-rate-of-change-parameters","dir":"Articles","previous_headings":"Usage","what":"Changing rate of change parameters","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_rate = 1, erroneous_rate = 10 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"removing-the-time-buffer","dir":"Articles","previous_headings":"Usage","what":"Removing the time buffer","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_buffer = 0, erroneous_buffer = 0 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 questionable #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 reasonable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"removing-the-gap-filling","dir":"Articles","previous_headings":"Usage","what":"Removing the gap filling","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, gap_range = 0 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"process","dir":"Articles","previous_headings":"","what":"Process","title":"Classify water temperature values","text":"Read logger file Create date time column name temperature_date_time Ensure temperature column named water_temperature Confirm data single deployment Run data classify_water_temp_data() function Save data csv file","code":"# install.packages(\"tidyverse\") # install.packages(\"devtools\") # devtools::install_github(\"poissonconsulting/teckfish\") library(teckfish) library(tidyverse) # read in logger file data <- readr::read_csv(\"path/to/file.csv\") # create date time column data <- data |> dplyr::mutate( temperature_date_time = as.POSIXct(temperature_date_time, tz = \"UTC\") ) # ensure temperature column is named water_temperature data <- data |> dplyr::rename( water_temperature = temperature ) # confirm data is from a single deployment data <- data |> dplyr::filter( deployment_id == \"12345\" ) # run data through classify_water_temp_data() function classified_data <- classify_water_temp_data(data) # save data to a csv file readr::write_csv(classified_data, \"path/to/file.csv\")"},{"path":"https://poissonconsulting.github.io/teckfish/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Thorley. Author, maintainer. Sarah Lyons. Author. Ayla Pearson. Author. Bronwen Lewis. Contributor. Jill Brooks. Contributor. Andrew Harwood. Contributor. Sebastian Dalgarno. Contributor. Teck Resources. Funder, copyright holder.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Thorley J, Lyons S, Pearson (2024). teckfish: R Tools Teck Fish Aquatic Sciences Projects. R package version 0.0.1.9001, https://poissonconsulting.github.io/teckfish/.","code":"@Manual{, title = {teckfish: R Tools for Teck Fish and Aquatic Sciences Projects}, author = {Joe Thorley and Sarah Lyons and Ayla Pearson}, year = {2024}, note = {R package version 0.0.1.9001}, url = {https://poissonconsulting.github.io/teckfish/}, }"},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"teckfish R package Teck Fish Aquatic Sciences Projects. intended used Teck staff contractors anyone else finds useful. intention eventually migrate Teck Resources RDS GitHub organization.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"","code":"# install.packages(\"devtools\") devtools::install_github(\"poissonconsulting/teckfish\")"},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"growing-season-degree-days","dir":"","previous_headings":"Demonstration","what":"Growing Season Degree Days","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"gsdd_cf() takes numerical vector mean daily temperature values centigrade calculates growing season degree days (GSDD) based Coleman Fausch’s (2007) definition.","code":"library(teckfish) gsdd_cf(teckfish::simulated_data$synthetic) #> [1] 3898.806"},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"contribution","dir":"","previous_headings":"","what":"Contribution","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"Please report issues. Pull requests always welcome.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"Please note teckfish project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Classify Water Temperature Data — classify_water_temp_data","title":"Classify Water Temperature Data — classify_water_temp_data","text":"Water temperature data either classified reasonable, questionable, erroneous status_id column.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classify Water Temperature Data — classify_water_temp_data","text":"","code":"classify_water_temp_data( data, questionable_min = 0, questionable_max = 30, erroneous_min = -0.5, erroneous_max = 40, questionable_rate = 2, erroneous_rate = 5, questionable_buffer = 1, erroneous_buffer = 1, gap_range = 5 )"},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classify Water Temperature Data — classify_water_temp_data","text":"data data frame. questionable_min numeric value indicating lower bound questionable range temperature values. questionable_max numeric value indicating upper bound questionable range temperature values. erroneous_min numeric value indicating lower bound erroneous range temperature values. erroneous_max numeric value indicating upper bound erroneous range temperature values. questionable_rate numeric value indicating rate change (temperature per hour) temperature values considered questionable. erroneous_rate numeric value indicating rate change (temperature per hour) temperature values considered erroneous. questionable_buffer numeric value indicating time buffer questionable values. erroneous_buffer numeric value indicating time buffer erroneous values. gap_range numeric value indicating range hours two non reasonable values coded questionable erroneous.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classify Water Temperature Data — classify_water_temp_data","text":"data frame","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Classify Water Temperature Data — classify_water_temp_data","text":"function works single deployment logger. table output sorted temperature_date_time. function error columns following names used internally: status_id, \".lag_temp\", \".diff_temp\", \".lag_time\", \".diff_time\", \".rate_temp_per_time\", \".lag_id\", \".lead_id\", \".id_row\", \".quest_higher_next_id\", \".quest_lower_next_id\", \".error_higher_next_id\", \".error_lower_next_id\", \".quest_higher_next_time\", \".quest_lower_next_time\", \".error_higher_next_time\", \".error_lower_next_time\", \".quest_higher_time_diff_h\", \".quest_lower_time_diff_h\", \".error_higher_time_diff_h\", \".error_lower_time_diff_h\", \".gap_fill_higher_time\", \".gap_fill_higher_type\", \".gap_fill_lower_time\", \".gap_fill_lower_type\", \".gap_diff_time_h\" function error missing temperature_date_time values missing. Missing values water_temperature ignored treated present. want drop values can output using tidyr::drop_na(). data processed : Classifying temperature values based values (questionable_min, questionable_max, erroneous_min, erroneous_max). 2. rate change adjacent values calculate values classified based rate parameters (questionable_rate, erroneous_rate). 3. Adjacent values questionable/erroneous coded questionable/erroneous. 4. buffer applied value within buffer classified questionable/erroneous based buffer parameters (questionable_buffer, erroneous_buffer). 5. Reasonable values identified two questionable/erroneous values coded questionable/erroneous based gap hour difference allowed (gap_range).","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classify Water Temperature Data — classify_water_temp_data","text":"","code":"data <- data.frame( temperature_date_time = as.POSIXct(c( \"2021-05-07 08:00:00\", \"2021-05-07 09:00:00\", \"2021-05-07 10:00:00\", \"2021-05-07 11:00:00\", \"2021-05-07 12:00:00\", \"2021-05-07 13:00:00\" )), water_temperature = c(4.124, 4.078, 4.102, 4.189, 4.243, 6.578) ) classified_data <- classify_water_temp_data(data)"},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":null,"dir":"Reference","previous_headings":"","what":"BC Fish Data — freshwaterfish","title":"BC Fish Data — freshwaterfish","text":"Curated data codes, classification conservation status freshwater fishes British Columbia.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"BC Fish Data — freshwaterfish","text":"","code":"freshwaterfish"},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"BC Fish Data — freshwaterfish","text":"object class tbl_df (inherits tbl, data.frame) 161 rows 17 columns.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"Growing Season Degree Days (GSDD) water temperature metric useful predictor Cutthroat trout size beginning winter. accumulated thermal units (C) growing season based mean daily water temperature values.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"","code":"gsdd_cf( x, na_trim = TRUE, ignore_truncation = FALSE, start_temp = 5, end_temp = 4, window_width = 7, pick = \"all\", quiet = FALSE )"},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"x numeric vector mean daily water temperature values period interest C. must consist least 90 366 values. na_trim flag specifying whether trim missing values start end time series. trimming time series must consist least 90 values. ignore_truncation flag specifying whether ignore truncation mean daily water temperature vector string \"start\", \"end\", \"none\" \"\" specifying type truncation ignore. start_temp positive real number average water temperature start growing season C. end_temp positive real number average water temperature end growing season C. must greater equal start temperature. window_width positive whole number width rolling mean window days. default 7. pick string specifying whether pick \"longest\", \"shortest\", \"first\" \"last\" 'season' season \"biggest\" \"smallest\" GSDD. default returned value sum GSDD values \"\" 'seasons'. quiet flag specifying whether suppress warnings.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"non-negative real number GSDD.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"default growing season based interpretation Coleman Fausch (2007) stated defined start growing season beginning first week average stream temperatures exceeded remained 5C season; end growing season defined last day first week average stream temperature dropped 4C. purposes calculation week assumed refer seven day rolling average opposed calendar week, multiple growing 'seasons' within year user option pick \"first\"/\"last\" \"longest\"/\"shortest\" season season \"biggest\"/\"smallest\" GSDD. default returned value sum GSDD values \"\" seasons. user picks \"longest\" season multiple seasons longest length candidate season \"biggest\" GSDD selected. Conversely case multiple \"shortest\" seasons candidate \"smallest\" GSDD selected. user sets na_trim = TRUE missing values (NAs) start end time series trimmed prior calculating GSDD. time series still contains one missing values missing value returned. situation recommended user replace missing value(s) interpolation methods rather filtering NAs. Truncation occurs start /end time series part way growing season.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"","code":"gsdd_cf(c(rep(1, 10), rep(10, 20), rep(1, 200))) #> [1] 208 gsdd_cf(teckfish::simulated_data$synthetic) #> [1] 3898.806"},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpolate Numeric Vector — interpolate_numeric_vector","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"Useful filling short runs missing values time series.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"","code":"interpolate_numeric_vector(x, span = 3, tails = FALSE)"},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"x double integer vector missing values fill using linear interpolation. span whole number maximum span missing values interpolate. gap exceeds span none values interpolate. tails flag specifying whether fill missing values start end setting value closest adjacent non-missing value.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"double integer vector.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"interpolate_numeric_vector() essentially wrapper stats::approx().","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"","code":"interpolate_numeric_vector(c(1,NA,4)) #> [1] 1.0 2.5 4.0 interpolate_numeric_vector(c(1L,NA,4L)) #> [1] 1 2 4 interpolate_numeric_vector(c(1,NA,NA,NA,NA,3)) #> [1] 1 NA NA NA NA 3 interpolate_numeric_vector(c(1,NA,NA,NA,NA,3), span = 4) #> [1] 1.0 1.4 1.8 2.2 2.6 3.0 interpolate_numeric_vector(c(NA,NA,10,1,NA)) #> [1] NA NA 10 1 NA interpolate_numeric_vector(c(NA,NA,10,1,NA), tails = TRUE) #> [1] 10 10 10 1 1"},{"path":"https://poissonconsulting.github.io/teckfish/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. fishbc fbc_common_name","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample Data for GSDD Calculation Demonstration — simulated_data","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"data synthetic time series daily temperature data year 2019.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"","code":"simulated_data"},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"tibble columns: Date date calendar year synthetic synthetic yearly temperature data demonstration testing","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/teckfish-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","title":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","text":"Provides functionsclassify water temperature values reasonable, questionable erroneous, linearly interpolate missing values calculate growing season degree days daily water temperature data. also exports fish codes British Columbia Alberta `fishbc` package.","code":""},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/reference/teckfish-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","text":"Maintainer: Joe Thorley joe@poissonconsulting.ca (ORCID) Authors: Sarah Lyons (ORCID) Ayla Pearson ayla@poissonconsulting.ca (ORCID) contributors: Bronwen Lewis [contributor] Jill Brooks [contributor] Andrew Harwood [contributor] Sebastian Dalgarno (ORCID) [contributor] Teck Resources [funder, copyright holder]","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-0019001","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1.9001","title":"teckfish 0.0.1.9001","text":"gsdd_cf() now requires least 90 values. Renamed “left” “right” truncation “start” “end” truncation. Added na_trim = TRUE argument gsdd_cf() trim leading trailing missing values. gsdd_cf() default now returns sum growing seasons within period interest expected reliable predictor growth. Added pick argument specify whether pick “biggest”, “smallest”, “longest”, “shortest”, “first” “last” ‘season’ “” ‘seasons’.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-0019000","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1.9000","title":"teckfish 0.0.1.9000","text":"gsdd_cf() now requires least 180 values returns NA_real values NA_real. Added fishbc::freshwaterfish fishbc::fbc_common_name data.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-001","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1","title":"teckfish 0.0.1","text":"Added gsdd_cf() function. (#5) implements Growing Season Degree Days algorithm described Coleman Fausch (2007) Added classify_water_temp_data() function classify raw water temperature data reasonable, questionable, unreasonable based simple criteria Added simulated_data data set.","code":""}] +[{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement .github/. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to teckfish","title":"Contributing to teckfish","text":"outlines propose change teckfish.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to teckfish","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to teckfish","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to teckfish","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. Begin commit merge messages - indicate user facing changes included NEWS.md. use fledge automatically generate NEWS.md file.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to teckfish","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to teckfish","text":"Please note teckfish project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 Teck Resources Ltd. Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":null,"dir":"","previous_headings":"","what":"Getting help with teckfish","title":"Getting help with teckfish","text":"Thanks using teckfish! filing issue, places explore pieces put together make process smooth possible.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":"make-sure-its-new","dir":"","previous_headings":"","what":"Make sure its new","title":"Getting help with teckfish","text":"opening new issue, sure search issues pull requests make sure bug hasn’t reported /already fixed development version. default, search pre-populated :issue :open. can edit qualifiers (e.g. :pr, :closed) needed. example, ’d simply remove :open search issues repo, open closed.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/SUPPORT.html","id":"make-a-reprex","dir":"","previous_headings":"","what":"Make a reprex","title":"Getting help with teckfish","text":"Start making minimal reproducible example using reprex package. haven’t heard used reprex , ’re treat! Seriously, reprex make R-question-asking endeavors easier (pretty insane ROI five ten minutes ’ll take learn ’s ). additional reprex pointers, check Get help! section tidyverse site.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Classify water temperature values","text":"","code":"data <- tibble::tribble( ~temperature_date_time, ~water_temperature, \"2021-05-07 00:00:00\", 40.145, \"2021-05-07 01:00:00\", 20.257, \"2021-05-07 02:00:00\", 6.257, \"2021-05-07 03:00:00\", 5.245, \"2021-05-07 04:00:00\", 2.567, \"2021-05-07 05:00:00\", 2.687, \"2021-05-07 06:00:00\", 2.175, \"2021-05-07 07:00:00\", 2.817, \"2021-05-07 08:00:00\", 2.917, \"2021-05-07 09:00:00\", 2.817, \"2021-05-07 10:00:00\", 2.867, \"2021-05-07 11:00:00\", 2.817, \"2021-05-07 12:00:00\", 2.917, \"2021-05-07 13:00:00\", 2.817, \"2021-05-07 14:00:00\", 2.867, \"2021-05-07 15:00:00\", 2.877, \"2021-05-07 16:00:00\", 3.012, \"2021-05-07 17:00:00\", 3.045, \"2021-05-07 18:00:00\", 3.124, \"2021-05-07 19:00:00\", 3.268, \"2021-05-07 20:00:00\", 3.789, \"2021-05-07 21:00:00\", 4.104, \"2021-05-07 22:00:00\", 4.178 ) |> dplyr::mutate( temperature_date_time = as.POSIXct(temperature_date_time, tz = \"UTC\") ) classified_data <- classify_water_temp_data(data) classified_data #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows ggplot(classified_data) + geom_point( aes( x = temperature_date_time, y = water_temperature, color = status_id ), alpha = 0.5 ) + labs( y = \"Temperature\", x = \"Datetime\" ) + theme_bw() + scale_x_datetime( breaks = date_breaks(\"4 hour\"), labels = date_format(\"%H:%M\") ) + scale_y_continuous( breaks = seq(-5, 45, 5), limits = c(-2, 42) ) + scale_color_manual( \"Status ID\", values = c( \"reasonable\" = \"black\", \"questionable\" = \"orange\", \"erroneous\" = \"red\" ) )"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"changing-temperature-min-and-max-parameters","dir":"Articles","previous_headings":"Usage","what":"Changing temperature min and max parameters","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_max = 1, erroneous_max = 20 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 questionable #> 9 2021-05-07 08:00:00 2.92 questionable #> 10 2021-05-07 09:00:00 2.82 questionable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"changing-rate-of-change-parameters","dir":"Articles","previous_headings":"Usage","what":"Changing rate of change parameters","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_rate = 1, erroneous_rate = 10 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"removing-the-time-buffer","dir":"Articles","previous_headings":"Usage","what":"Removing the time buffer","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, questionable_buffer = 0, erroneous_buffer = 0 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 questionable #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 reasonable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"removing-the-gap-filling","dir":"Articles","previous_headings":"Usage","what":"Removing the gap filling","title":"Classify water temperature values","text":"","code":"classify_water_temp_data( data, gap_range = 0 ) #> # A tibble: 23 × 3 #> temperature_date_time water_temperature status_id #> #> 1 2021-05-07 00:00:00 40.1 erroneous #> 2 2021-05-07 01:00:00 20.3 erroneous #> 3 2021-05-07 02:00:00 6.26 erroneous #> 4 2021-05-07 03:00:00 5.24 erroneous #> 5 2021-05-07 04:00:00 2.57 erroneous #> 6 2021-05-07 05:00:00 2.69 questionable #> 7 2021-05-07 06:00:00 2.17 questionable #> 8 2021-05-07 07:00:00 2.82 reasonable #> 9 2021-05-07 08:00:00 2.92 reasonable #> 10 2021-05-07 09:00:00 2.82 reasonable #> # ℹ 13 more rows"},{"path":"https://poissonconsulting.github.io/teckfish/articles/classify-water-temp.html","id":"process","dir":"Articles","previous_headings":"","what":"Process","title":"Classify water temperature values","text":"Read logger file Create date time column name temperature_date_time Ensure temperature column named water_temperature Confirm data single deployment Run data classify_water_temp_data() function Save data csv file","code":"# install.packages(\"tidyverse\") # install.packages(\"devtools\") # devtools::install_github(\"poissonconsulting/teckfish\") library(teckfish) library(tidyverse) # read in logger file data <- readr::read_csv(\"path/to/file.csv\") # create date time column data <- data |> dplyr::mutate( temperature_date_time = as.POSIXct(temperature_date_time, tz = \"UTC\") ) # ensure temperature column is named water_temperature data <- data |> dplyr::rename( water_temperature = temperature ) # confirm data is from a single deployment data <- data |> dplyr::filter( deployment_id == \"12345\" ) # run data through classify_water_temp_data() function classified_data <- classify_water_temp_data(data) # save data to a csv file readr::write_csv(classified_data, \"path/to/file.csv\")"},{"path":"https://poissonconsulting.github.io/teckfish/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joe Thorley. Author, maintainer. Sarah Lyons. Author. Ayla Pearson. Author. Bronwen Lewis. Contributor. Jill Brooks. Contributor. Andrew Harwood. Contributor. Sebastian Dalgarno. Contributor. Teck Resources. Funder, copyright holder.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Thorley J, Lyons S, Pearson (2024). teckfish: R Tools Teck Fish Aquatic Sciences Projects. R package version 0.0.1.9002, https://poissonconsulting.github.io/teckfish/.","code":"@Manual{, title = {teckfish: R Tools for Teck Fish and Aquatic Sciences Projects}, author = {Joe Thorley and Sarah Lyons and Ayla Pearson}, year = {2024}, note = {R package version 0.0.1.9002}, url = {https://poissonconsulting.github.io/teckfish/}, }"},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"teckfish R package Teck Fish Aquatic Sciences Projects. intended used Teck staff contractors anyone else finds useful. intention eventually migrate Teck Resources RDS GitHub organization.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"","code":"# install.packages(\"devtools\") devtools::install_github(\"poissonconsulting/teckfish\")"},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"growing-season-degree-days","dir":"","previous_headings":"Demonstration","what":"Growing Season Degree Days","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"gsdd_cf() takes numerical vector mean daily temperature values centigrade calculates growing season degree days (GSDD) based Coleman Fausch’s (2007) definition.","code":"library(teckfish) gsdd_cf(teckfish::simulated_data$synthetic) #> [1] 3898.806"},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"contribution","dir":"","previous_headings":"","what":"Contribution","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"Please report issues. Pull requests always welcome.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"R Tools for Teck Fish and Aquatic Sciences Projects","text":"Please note teckfish project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Classify Water Temperature Data — classify_water_temp_data","title":"Classify Water Temperature Data — classify_water_temp_data","text":"Water temperature data either classified reasonable, questionable, erroneous status_id column.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classify Water Temperature Data — classify_water_temp_data","text":"","code":"classify_water_temp_data( data, questionable_min = 0, questionable_max = 30, erroneous_min = -0.5, erroneous_max = 40, questionable_rate = 2, erroneous_rate = 5, questionable_buffer = 1, erroneous_buffer = 1, gap_range = 5 )"},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classify Water Temperature Data — classify_water_temp_data","text":"data data frame. questionable_min numeric value indicating lower bound questionable range temperature values. questionable_max numeric value indicating upper bound questionable range temperature values. erroneous_min numeric value indicating lower bound erroneous range temperature values. erroneous_max numeric value indicating upper bound erroneous range temperature values. questionable_rate numeric value indicating rate change (temperature per hour) temperature values considered questionable. erroneous_rate numeric value indicating rate change (temperature per hour) temperature values considered erroneous. questionable_buffer numeric value indicating time buffer questionable values. erroneous_buffer numeric value indicating time buffer erroneous values. gap_range numeric value indicating range hours two non reasonable values coded questionable erroneous.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classify Water Temperature Data — classify_water_temp_data","text":"data frame","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Classify Water Temperature Data — classify_water_temp_data","text":"function works single deployment logger. table output sorted temperature_date_time. function error columns following names used internally: status_id, \".lag_temp\", \".diff_temp\", \".lag_time\", \".diff_time\", \".rate_temp_per_time\", \".lag_id\", \".lead_id\", \".id_row\", \".quest_higher_next_id\", \".quest_lower_next_id\", \".error_higher_next_id\", \".error_lower_next_id\", \".quest_higher_next_time\", \".quest_lower_next_time\", \".error_higher_next_time\", \".error_lower_next_time\", \".quest_higher_time_diff_h\", \".quest_lower_time_diff_h\", \".error_higher_time_diff_h\", \".error_lower_time_diff_h\", \".gap_fill_higher_time\", \".gap_fill_higher_type\", \".gap_fill_lower_time\", \".gap_fill_lower_type\", \".gap_diff_time_h\" function error missing temperature_date_time values missing. Missing values water_temperature ignored treated present. want drop values can output using tidyr::drop_na(). data processed : Classifying temperature values based values (questionable_min, questionable_max, erroneous_min, erroneous_max). 2. rate change adjacent values calculate values classified based rate parameters (questionable_rate, erroneous_rate). 3. Adjacent values questionable/erroneous coded questionable/erroneous. 4. buffer applied value within buffer classified questionable/erroneous based buffer parameters (questionable_buffer, erroneous_buffer). 5. Reasonable values identified two questionable/erroneous values coded questionable/erroneous based gap hour difference allowed (gap_range).","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/classify_water_temp_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Classify Water Temperature Data — classify_water_temp_data","text":"","code":"data <- data.frame( temperature_date_time = as.POSIXct(c( \"2021-05-07 08:00:00\", \"2021-05-07 09:00:00\", \"2021-05-07 10:00:00\", \"2021-05-07 11:00:00\", \"2021-05-07 12:00:00\", \"2021-05-07 13:00:00\" )), water_temperature = c(4.124, 4.078, 4.102, 4.189, 4.243, 6.578) ) classified_data <- classify_water_temp_data(data)"},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":null,"dir":"Reference","previous_headings":"","what":"BC Fish Data — freshwaterfish","title":"BC Fish Data — freshwaterfish","text":"Curated data codes, classification conservation status freshwater fishes British Columbia.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"BC Fish Data — freshwaterfish","text":"","code":"freshwaterfish"},{"path":"https://poissonconsulting.github.io/teckfish/reference/freshwaterfish.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"BC Fish Data — freshwaterfish","text":"object class tbl_df (inherits tbl, data.frame) 161 rows 17 columns.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"Growing Season Degree Days (GSDD) water temperature metric useful predictor Cutthroat trout size beginning winter. accumulated thermal units (C) growing season based mean daily water temperature values.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"","code":"gsdd_cf( x, na_trim = TRUE, ignore_truncation = FALSE, start_temp = 5, end_temp = 4, window_width = 7, pick = \"all\", quiet = FALSE )"},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"x numeric vector mean daily water temperature values period interest C. must consist least 90 366 values. na_trim flag specifying whether trim missing values start end time series. trimming time series must consist least 90 values. ignore_truncation flag specifying whether ignore truncation mean daily water temperature vector string \"start\", \"end\", \"none\" \"\" specifying type truncation ignore. start_temp positive real number average water temperature start growing season C. end_temp positive real number average water temperature end growing season C. must greater equal start temperature. window_width positive whole number width rolling mean window days. default 7. pick string specifying whether pick \"longest\", \"shortest\", \"first\" \"last\" 'season' season \"biggest\" \"smallest\" GSDD. default returned value sum GSDD values \"\" 'seasons'. quiet flag specifying whether suppress warnings.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"non-negative real number GSDD.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"default growing season based interpretation Coleman Fausch (2007) stated defined start growing season beginning first week average stream temperatures exceeded remained 5C season; end growing season defined last day first week average stream temperature dropped 4C. purposes calculation week assumed refer seven day rolling average opposed calendar week, multiple growing 'seasons' within year user option pick \"first\"/\"last\" \"longest\"/\"shortest\" season season \"biggest\"/\"smallest\" GSDD. default returned value sum GSDD values \"\" seasons. user picks \"longest\" season multiple seasons longest length candidate season \"biggest\" GSDD selected. Conversely case multiple \"shortest\" seasons candidate \"smallest\" GSDD selected. user sets na_trim = TRUE missing values (NAs) start end time series trimmed prior calculating GSDD. time series still contains one missing values missing value returned. situation recommended user replace missing value(s) interpolation methods rather filtering NAs. Truncation occurs start /end time series part way growing season.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/gsdd_cf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Growing Season Degree Days (GSDD) — gsdd_cf","text":"","code":"gsdd_cf(c(rep(1, 10), rep(10, 20), rep(1, 200))) #> [1] 208 gsdd_cf(teckfish::simulated_data$synthetic) #> [1] 3898.806"},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Interpolate Numeric Vector — interpolate_numeric_vector","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"Useful filling short runs missing values time series.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"","code":"interpolate_numeric_vector(x, span = 3, tails = FALSE)"},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"x double integer vector missing values fill using linear interpolation. span whole number maximum span missing values interpolate. gap exceeds span none values interpolate. tails flag specifying whether fill missing values start end setting value closest adjacent non-missing value.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"double integer vector.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"interpolate_numeric_vector() essentially wrapper stats::approx().","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/interpolate_numeric_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Interpolate Numeric Vector — interpolate_numeric_vector","text":"","code":"interpolate_numeric_vector(c(1,NA,4)) #> [1] 1.0 2.5 4.0 interpolate_numeric_vector(c(1L,NA,4L)) #> [1] 1 2 4 interpolate_numeric_vector(c(1,NA,NA,NA,NA,3)) #> [1] 1 NA NA NA NA 3 interpolate_numeric_vector(c(1,NA,NA,NA,NA,3), span = 4) #> [1] 1.0 1.4 1.8 2.2 2.6 3.0 interpolate_numeric_vector(c(NA,NA,10,1,NA)) #> [1] NA NA 10 1 NA interpolate_numeric_vector(c(NA,NA,10,1,NA), tails = TRUE) #> [1] 10 10 10 1 1"},{"path":"https://poissonconsulting.github.io/teckfish/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. fishbc fbc_common_name","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Sample Data for GSDD Calculation Demonstration — simulated_data","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"data synthetic time series daily temperature data year 2019.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"","code":"simulated_data"},{"path":"https://poissonconsulting.github.io/teckfish/reference/simulated_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Sample Data for GSDD Calculation Demonstration — simulated_data","text":"tibble columns: Date date calendar year synthetic synthetic yearly temperature data demonstration testing","code":""},{"path":"https://poissonconsulting.github.io/teckfish/reference/teckfish-package.html","id":null,"dir":"Reference","previous_headings":"","what":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","title":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","text":"Provides functionsclassify water temperature values reasonable, questionable erroneous, linearly interpolate missing values calculate growing season degree days daily water temperature data. also exports fish codes British Columbia Alberta `fishbc` package.","code":""},{"path":[]},{"path":"https://poissonconsulting.github.io/teckfish/reference/teckfish-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"teckfish: R Tools for Teck Fish and Aquatic Sciences Projects — teckfish-package","text":"Maintainer: Joe Thorley joe@poissonconsulting.ca (ORCID) Authors: Sarah Lyons (ORCID) Ayla Pearson ayla@poissonconsulting.ca (ORCID) contributors: Bronwen Lewis [contributor] Jill Brooks [contributor] Andrew Harwood [contributor] Sebastian Dalgarno (ORCID) [contributor] Teck Resources [funder, copyright holder]","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-0019002","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1.9002","title":"teckfish 0.0.1.9002","text":"Added interpolate_numeric_vector() fill missing values using linear interpolation.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-0019001","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1.9001","title":"teckfish 0.0.1.9001","text":"gsdd_cf() now requires least 90 values. Renamed “left” “right” truncation “start” “end” truncation. Added na_trim = TRUE argument gsdd_cf() trim leading trailing missing values. gsdd_cf() default now returns sum growing seasons within period interest expected reliable predictor growth. Added pick argument specify whether pick “biggest”, “smallest”, “longest”, “shortest”, “first” “last” ‘season’ “” ‘seasons’.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-0019000","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1.9000","title":"teckfish 0.0.1.9000","text":"gsdd_cf() now requires least 180 values returns NA_real values NA_real. Added fishbc::freshwaterfish fishbc::fbc_common_name data.","code":""},{"path":"https://poissonconsulting.github.io/teckfish/news/index.html","id":"teckfish-001","dir":"Changelog","previous_headings":"","what":"teckfish 0.0.1","title":"teckfish 0.0.1","text":"Added gsdd_cf() function. (#5) implements Growing Season Degree Days algorithm described Coleman Fausch (2007) Added classify_water_temp_data() function classify raw water temperature data reasonable, questionable, unreasonable based simple criteria Added simulated_data data set.","code":""}]
Thorley J, Lyons S, Pearson A (2024). teckfish: R Tools for Teck Fish and Aquatic Sciences Projects. -R package version 0.0.1.9001, https://poissonconsulting.github.io/teckfish/. +R package version 0.0.1.9002, https://poissonconsulting.github.io/teckfish/.
@Manual{, title = {teckfish: R Tools for Teck Fish and Aquatic Sciences Projects}, author = {Joe Thorley and Sarah Lyons and Ayla Pearson}, year = {2024}, - note = {R package version 0.0.1.9001}, + note = {R package version 0.0.1.9002}, url = {https://poissonconsulting.github.io/teckfish/}, }
interpolate_numeric_vector()