animate: Animate the trajectory of devices

animate_pagR Documentation

Animate the trajectory of devices

Description

Animate the trajectory of devices, while showing the likelihood/event location probabilities (pag), the posterior probabilties (pg) or any other probabilities p. See the vignette of the simulator how they are used.

Usage

animate_pag(
  rst,
  dt,
  traj,
  cp,
  region = NULL,
  settings = mobvis_settings_animation(),
  title = NA,
  filename = "event_location_dev_%s.mp4",
  width = 700,
  height = 700,
  fps = 3
)

animate_pga(
  rst,
  dt,
  traj,
  cp,
  region = NULL,
  settings = mobvis_settings_animation(),
  title = NA,
  filename = "posterior_dev_%s.mp4",
  width = 700,
  height = 700,
  fps = 3
)

animate_p(
  rst,
  dt,
  traj,
  cp,
  region = NULL,
  settings = mobvis_settings_animation(),
  title = NA,
  filename = "prob_dev_%s.mp4",
  width = 700,
  height = 700,
  fps = 3
)

Arguments

rst

raster

dt

data.table for animate_pag and animate_pga the following columns should be present: cell, rid, dist and either pag or pga. For animate_p the columns should be t, dev, rid and p.

traj

sf object with the following columns: t, cell, dev, and geometry (the sf geometry column with points).

cp

sf object of the cellplan

region

sf object containing the region borders

settings

settings of the animation. By default mobvis_settings_animation

title

title of the animation. Can be either gif or mp4. Use the percentages for the device id.

filename

filename. Can be either gif or mp4. Use percentage signs for the time id.

width

width of the animation

height

height of the animation

fps

frame per second


MobilePhoneESSnetBigData/mobvis documentation built on Feb. 3, 2024, 2:49 p.m.