sb_plot.Rd
The high resolution of bio-logging sensor data relative to the duration of
deployments limits the utility of static figures. sb_plot_data
and
sb_plot_predictions
use plotly to create
interactive figures for looking in-depth at bio-logging data.
sb_plot_data(deployid, sensors, events)
sb_plot_predictions(deployid, sensors, predictions, outcomes = NULL)
[character(1)]
ID of the deployment to visualize. Must be a
deployment in both sensors
and events
.
[Sensors]
Bio-logging sensor data (see
Sensors
).
[Events]
Labeled behavioral events (see
Events
).
[Predictions]
Predicted behavioral events (see
sb_predict
).
[Outcomes]
Outcomes of predicted behavioral events (see
sb_assess
) (optional).
An interactive figure with time on the x-axis and a separate y-axis for each bio-logging sensor variable, arranged vertically. Interaction options include: click-and-drag to zoom in, double-click to zoom out, hover to see details (exact date, time, and value).
sb_plot_predictions
Solid points indicate predicted behavioral events. If actual events are
known (i.e, outcomes
is not NULL), they are plotted as hollow circles and
color-coded as follows: true positive as blue solid point in blue hollow
point, false positive as red solid point, false negative as red hollow
point. In addition to the bio-logging sensor variables, there's an
additional time series for the "local probability" of an event (see
vignette(TODO)
).
# Load sample data and split test/train
c(lunge_sensors, lunge_events) %<-% load_lunges()
test_deployids <- deployments(lunge_sensors)[1:3]
deployid <- test_deployids[1]
c(sensors_test, sensors_train) %<-% divide(lunge_sensors, test_deployids)
c(events_test, events_train) %<-% divide(lunge_events, test_deployids)
# Visualize sensor and event data for one deployment
sb_plot_data(deployid, lunge_sensors, lunge_events)