knitr::opts_chunk$set(echo = TRUE)

Hobotemp

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

Requirements

Installation

remotes::install_github("rfrancolini/hobotemp")

Function: read_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.

Read Example Data

library(hobotemp)
x <- read_hobotemp()
x

Read Example Data with User Defined Site

``` {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

Function: summarize_hobotemp()

Create a dataframe summarizing the temperature data, will group by site.

Summarize data, csv with one site

sum1 <- summarize_hobotemp(x)
print.data.frame(sum1)

Summarize data, csv with more than one site

sum2 <- summarize_hobotemp(example_ridge_data())
print.data.frame(sum2)

Function: draw_scatter_plot()

This function will read in a csv of your HOBO data and draw a scatter plot with an overlapping trendline.

Draw Example Scatter Plot

tempplot_x <- draw_scatter_plot(x)
tempplot_x

Draw Example Scatter Plot with User Defined Start/Stop Dates and Title

tempplot_xud <- draw_scatter_plot(xud, main = "Temperature at Depth, End of May")
tempplot_xud

Function: draw_ridgeline_plot()

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.

Draw example ridgeline plot

ridgelineplot <- draw_ridgeline_plot()
ridgelineplot

Draw example ridgeline plot with specified site order (south to north)

SiteOrder <-  c("Cape Liz", "Halfway Rock", "Damariscove", "Isle Au Haut", "Marshall")
ridgelineplotO <- draw_ridgeline_plot(ordered = SiteOrder)
ridgelineplotO

Function: draw_line_plot()

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.

Draw example line plot

lineplot <- draw_line_plot()
lineplot

Draw example line plot facetted with specified site order (south to north)

SiteOrder <-  c("Cape Liz", "Halfway Rock", "Damariscove", "Isle Au Haut", "Marshall")
lineplotO <- draw_line_plot(ordered = SiteOrder, facet = "Site")
lineplotO


rfrancolini/hobotemp documentation built on June 24, 2022, 9:43 a.m.