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 < ftp://ftp.flaterco.com/xtide/harmonics-dwf-20151227-free.tar.bz2>, which is NOAA web site data processed by David Flater for XTide. The code to calculate tide heights from the harmonics is based on XTide.


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

It includes the harmonics data for 637 US stations.

library(rtide)
 
data <- rtide::tide_height(
  "Monterey Harbor", from = as.Date("2015-01-01"), to = as.Date("2015-01-01"), 
  minutes = 10L, tz = "PST8PDT")
 
print(head(data))
#> # A tibble: 6 × 3
#>                                 Station            DateTime TideHeight
#>                                   <chr>              <dttm>      <dbl>
#> 1 Monterey, Monterey Harbor, California 2015-01-01 00:00:00  0.6452338
#> 2 Monterey, Monterey Harbor, California 2015-01-01 00:10:00  0.6353040
#> 3 Monterey, Monterey Harbor, California 2015-01-01 00:20:00  0.6281772
#> 4 Monterey, Monterey Harbor, California 2015-01-01 00:30:00  0.6240083
#> 5 Monterey, Monterey Harbor, California 2015-01-01 00:40:00  0.6229294
#> 6 Monterey, Monterey Harbor, California 2015-01-01 00:50:00  0.6250485
library(ggplot2)
library(scales)
ggplot(data = data, aes(x = DateTime, y = TideHeight)) + 
  geom_line() + 
  scale_x_datetime(name = "1st January 2015", 
                   labels = date_format("%H:%M", tz="PST8PDT")) +
  scale_y_continuous(name = "Tide Height (m)") +
  ggtitle("Monterey Harbour")

To install the release version from CRAN

install.packages("rtide")

Or the development version from GitHub

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

Please report any issues.

Pull requests are always welcome.

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

NEWS rtide

  • 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)
  • Released on CRAN
  • 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.4 by Joe Thorley, 4 months 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], Abram Fleishman [aut], Luke Miller [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports abind, datacheckr, lubridate, magrittr, plyr, stringr, tidyr, tibble, utils

Suggests dplyr, ggplot2, scales, testthat


See at CRAN