knitr::opts_chunk$set(echo = TRUE)
This is for managing and understanding your HOBO temperature data. This will work on any HOBO data that has been downloaded in csv format (not hproj format).
remotes::install_github("rfrancolini/hobotemp")
This function will take in raw hobotemp data and output a csv. Options include whether you want to define a site name (if not, itll pull it from the file name), if you want to define the start/stop times, have it automatically remove the first and last day (default setting), or keep all of the data, and if you want to write a file with a specific output name.
library(hobotemp) x <- read_hobotemp() x
``` {r exampleSiteName} library(hobotemp) x <- read_hobotemp(site = "Little Drisko Island") x
### Read Example Data With User Defined Start/Stop Dates ```r ss <- as.POSIXct(c("2021-05-20", "2021-06-01"), tz = "UTC") xud <- read_hobotemp(clipped = "user", startstop = ss) xud
Create a dataframe summarizing the temperature data, will group by site.
sum1 <- summarize_hobotemp(x) print.data.frame(sum1)
sum2 <- summarize_hobotemp(example_ridge_data()) print.data.frame(sum2)
This function will read in a csv of your HOBO data and draw a scatter plot with an overlapping trendline.
tempplot_x <- draw_scatter_plot(x) tempplot_x
tempplot_xud <- draw_scatter_plot(xud, main = "Temperature at Depth, End of May") tempplot_xud
This function will create a color-coded ridgeline plot, adapted from here. This will have a line representing the temperature, as well as the space underneath the line colored in using a temperature gradient color scheme. Sites will appear in order they are in dataframe, unless "ordered" option is used.
ridgelineplot <- draw_ridgeline_plot() ridgelineplot
SiteOrder <- c("Cape Liz", "Halfway Rock", "Damariscove", "Isle Au Haut", "Marshall") ridgelineplotO <- draw_ridgeline_plot(ordered = SiteOrder) ridgelineplotO
This function will create a line plot, with a colorblind friendly color pallette, and can currently take up to 15 sites at once. Sites will appear in legend (or will be facetted upon) in order they are in dataframe, unless "ordered" option is used.
lineplot <- draw_line_plot() lineplot
SiteOrder <- c("Cape Liz", "Halfway Rock", "Damariscove", "Isle Au Haut", "Marshall") lineplotO <- draw_line_plot(ordered = SiteOrder, facet = "Site") lineplotO
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.