Learn R Programming

stormwindmodel (version 0.1.4)

interp_track: Interpolate a storm track

Description

This function takes a wider-spaced storm track (e.g., every 6 hours) and interpolates to a finer interval (e.g., every 15 minutes). To do this, it fits GLMs of latitude and longitude regressed on natural cubic splines of date-time, and then predicts these splines to new intervals. These splines use degrees of freedom equal to the number of original observations divided by two.

Usage

interp_track(track, tint = 0.25)

Arguments

track

A dataframe with hurricane track data for a single storm. See the floyd_tracks dataset that comes with the package for an example of the required format for this dataframe.

tint

A numeric vector giving the time interval to impute to, in units of hours (e.g., 0.25, the default, interpolates to 15 minute-intervals).

Value

A dataframe with hurricane track data for a single storm, interpolated to the interval specified by tint.