A Javascript tide height predictor.
Many agencies like NOAA provide high-quality tide data and prediction services. But these services require online access, and are not available for every country.
Neaps uses standard algorithims to predict tide levels anywhere that has well-defined harmonic constituents. This is useful for:
Here's a chart comparing Neaps, NOAA prediction, and actual observed water levels for Monterey, California. View other comparisons.
Red is Neaps, dark blue is NOAA, and light blue is observed water levels.
Install with your favorite package manager.
# yarnyarn install @neaps/tide-prediction#npmnpm install --save @neaps/tide-prediction
import TidePrediction from "@neaps/tide-prediction";const constituents = [{phase_GMT: 98.7,phase_local: 313.7,amplitude: 2.687,name: "M2",speed: 28.984104}//....there are usually many, read the docs];const highLowTides = tidePrediction(constituents, {phaseKey: "phase_GMT"}).getExtremesPrediction({start: new Date("2019-01-01"),end: new Date("2019-01-10")});