Draws any time window of one deployment from the smru_suggest_trim() review data: a map of the locations in the window, coloured by time, beside their latitude and longitude against time and the counts of locations, dives and CTD profiles. All location classes are shown, including Z. The suggested end date, the anchor and the dates in the draft track truncation file are drawn as vertical lines, so a start or end date can be placed at an exact time, clear of a messy stretch of track. Locations more than outlier_km from the running median position (7 locations, centred) are ringed in red: a cluster of rings marks a messy stretch. A table of the last n locations in the window is printed, with the distance, time and speed from the previous location and the distance from the running median; outlying locations are marked *.

In imos_smru_dm_qc() it is offered at the track end date review menu.

trim_zoom(
  trim,
  ref,
  from = NULL,
  to = NULL,
  draft = NULL,
  outlier_km = 100,
  file = NULL,
  n = 30
)

Arguments

trim

the data frame returned by smru_suggest_trim()

ref

the deployment reference (- and _ are treated as the same)

from, to

the window, as "YYYY-MM-DD" or "YYYY-MM-DD HH:MM" (UTC). Default: the start and the end of the track

draft

optional path to the draft track truncation file (<cid>_trimIDs_draft.csv); its start_date and end_date for ref are drawn as blue dashed lines

outlier_km

distance (km) from the running median position beyond which a location is marked as outlying

file

optional PDF file to write the plot to. Default: the current graphics device (the RStudio Plots pane, which can be enlarged)

n

the number of locations listed: the last n in the window (0 lists none)

Value

invisibly, a data frame of the locations in the window

Examples

if (FALSE) { # \dontrun{
trim <- smru_suggest_trim(wd = dm, config = "pending/config_ct23.json")
trim_zoom(trim, "ct23-C12-06", from = "2007-08-01", to = "2007-08-20 12:00",
          draft = file.path(dm, "ct23_trimIDs_draft.csv"))
} # }