knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
rtide
is an R package to calculate tide heights based on tide station harmonics.
It includes the harmonics data for r length(rtide::tide_stations())
US stations.
To install the latest release from CRAN
install.packages("rtide")
To install the developmental version from GitHub
# install.packages("pak") pak::pak("poissonconsulting/rtide")
library(tibble) library(rtide) data <- rtide::tide_height( "Monterey Harbor", from = as.Date("2016-07-13"), to = as.Date("2016-07-15"), minutes = 10L, tz = "PST8PDT" ) print(data)
library(ggplot2) library(scales)
ggplot(data = data, aes(x = DateTime, y = TideHeight)) + geom_line() + scale_x_datetime( name = "Date", labels = date_format("%d %b %Y", tz = "PST8PDT") ) + scale_y_continuous(name = "Tide Height (m)") + ggtitle("Monterey Harbour")
Tide heights can be also obtained using rtide through a shiny interface developed by Seb Dalgarno.
Please report any issues.
Pull requests are always welcome.
Please note that the rtide project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
The harmonics data was converted from https://github.com/poissonconsulting/rtide/blob/main/data-raw/harmonics-dwf-20151227-free.tar.bz2, NOAA web site data
processed by David Flater for XTide
.
The code to calculate tide heights from the harmonics is based on XTide
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.