View source: R/VMS_clean_recs.R
VMS_clean_recs | R Documentation |
This function takes raw VMS data (i.e. a dataframe having sequential coordinates and times) and cleans it.
VMS_clean_recs(
df = NULL,
lat.field = "LATITUDE",
lon.field = "LONGITUDE",
objField = "VR_NUMBER",
timeField = "POSITION_UTC_DATE",
minDist_m = 50,
maxBreak_mins = 1440,
minKnots = NULL,
maxKnots = NULL
)
df |
default is |
lat.field |
the default is |
lon.field |
the default is |
objField |
default is |
timeField |
default is |
minDist_m |
the default is |
maxBreak_mins |
the default is |
minKnots |
default is |
maxKnots |
default is |
a dataframe with an additional "trek" column identifying a number of
discrete paths for each unique value of objField
.
The resultant df will likely have less records than the source.
During the cleaning process, values for Latitude and Longitude are rounded
from 5 decimal places to 4 (~1m –> 11m resolution), and times are rounded
to the nearest 5 minutes. If a field called "UPDATE_DATE" exists, it will
be used to "break ties" in the case of duplicate records (i.e. the more recent
record will is retained.
Additionally, data is grouped into "treks" which can be thought of as discrete
forays by a vessel. A new trek occurs when the time between subsequent points
for a vessel exceeds maxBreak_mins
. If no value is provided, 24 hours
(i.e. 1440 minutes) will be used.
Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca
Other vms:
VMS_get_recs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.