Skip to contents

Takes a date, and a collection of points, then plots a track of all points which have the same date as the one specified. Points with NA values for latitude and/or longitude will be filtered out. Remaining points will be converted to_linestrings() before plotting. Return value is the plot object, i.e. additional plot layers can be added in the usual ggplot way.

Usage

plot_track(track_date, points)

Arguments

track_date

the date for which to plot the track

points

A data.frame or tibble with (at least) a date and an sf geometry column containing a point for each observation

Value

a basic ggplot2::ggplot() with a ggplot2::geom_sf() layer for the track

Examples

plot_track(lubridate::ymd("2020-05-20"), track_details)