Tide Heights

Calculates tide heights based on tide station harmonics. It includes the harmonics data for 637 US stations. The harmonics data was converted from < https://github.com/poissonconsulting/rtide/blob/master/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'.


lifecycle Travis-CI BuildStatus codecov CRAN_Status_Badge CRANDownloads

Introduction

rtide is an R package to calculate tide heights based on tide station harmonics.

It includes the harmonics data for 637 US stations.

Utilisation

library(rtide)
#> rtide is not suitable for navigation
 
data <- rtide::tide_height(
  "Monterey Harbor", from = as.Date("2016-07-13"), to = as.Date("2016-07-15"), 
  minutes = 10L, tz = "PST8PDT")
 
print(head(data))
#> # A tibble: 6 x 3
#>   Station                               DateTime            TideHeight
#>   <chr>                                 <dttm>                   <dbl>
#> 1 Monterey, Monterey Harbor, California 2016-07-13 00:00:00      0.514
#> 2 Monterey, Monterey Harbor, California 2016-07-13 00:10:00      0.496
#> 3 Monterey, Monterey Harbor, California 2016-07-13 00:20:00      0.481
#> 4 Monterey, Monterey Harbor, California 2016-07-13 00:30:00      0.468
#> 5 Monterey, Monterey Harbor, California 2016-07-13 00:40:00      0.457
#> 6 Monterey, Monterey Harbor, California 2016-07-13 00:50:00      0.449
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")

Installation

To install the latest official release from CRAN

install.packages("rtide")

To install the latest development version from GitHub

# install.packages("devtools")
devtools::install_github("poissonconsulting/rtide")

To install the latest development version from the Poisson drat repository

# install.packages("drat")
drat::addRepo("poissonconsulting")
install.packages("rtide")

Interaction

Tide heights can be also obtained using rtide through a shiny interface developed by Seb Dalgarno.

Citation


To cite package 'rtide' in publications use:

  Joe Thorley, Luke Miller and Abram Fleishman (2018). rtide: Tide
  Heights. R package version 0.0.5.
  https://github.com/poissonconsulting/rtide

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {rtide: Tide Heights},
    author = {Joe Thorley and Luke Miller and Abram Fleishman},
    year = {2018},
    note = {R package version 0.0.5},
    url = {https://github.com/poissonconsulting/rtide},
  }

Contribution

Please report any issues.

Pull requests are always welcome.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Inspiration

The harmonics data was converted from harmonics-dwf-20151227-free, NOAA web site data processed by David Flater for XTide. The code to calculate tide heights from the harmonics is based on XTide.

News

rtide 0.0.5

  • Replaced dependency datacheckr with checkr
  • Removed dependencies plyr, magrittr, tidyr, stringr
  • tibble now only suggested

rtide 0.0.4

  • Removed dependency on dplyr

rtide 0.0.3

  • Recognises station names with brackets like 'Annapolis (US Naval Academy), Severn River, Maryland'
  • Calculates tide heights when a station name is subset of another station name. For example 'San Francisco, San Francisco Bay, California' and 'North Point, Pier 41, San Francisco, San Francisco Bay, California' (Issue #10)

rtide 0.0.2

  • Released on CRAN

rtide 0.0.1

  • Released on GitHub

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rtide")

0.0.5 by Joe Thorley, a year ago


https://github.com/poissonconsulting/rtide


Report a bug at https://github.com/poissonconsulting/rtide/issues


Browse source code at https://github.com/cran/rtide


Authors: Joe Thorley [aut, cre] , Luke Miller [aut] , Abram Fleishman [aut] , Poisson Consulting [cph]


Documentation:   PDF Manual  


GPL-3 license


Imports abind, checkr, lubridate, utils

Suggests ggplot2, scales, tibble, testthat


See at CRAN