animate_polygons: Visualizing the spatio-temporal pattern of choropleth map

View source: R/animate_polygons.R

animate_polygonsR Documentation

Visualizing the spatio-temporal pattern of choropleth map

Description

Generate animation of chorolepth map of cases by grouping region

Usage

animate_polygons(
  region,
  t,
  sf,
  interval = c("day", "week", "month"),
  breaks = NULL,
  gridLonLat = TRUE,
  width = 600,
  height = 400,
  delay = 50
)

Arguments

region

Vector of region (polygon) name of data points.

t

Vector of time of data points.

sf

Object of class 'sf'; polygon layer of statistical data (region data of these data points).

interval

Character; time resolution(day, week, month) of animation ; aggregrate data through day, week or month.

breaks

Numeric vector to tell how chorolepth classify.

gridLonLat

Logical; draw latitude and longitude grid on non-interactive map.

width

Width of the animation file (in pixels).

height

Height of the animation file (in pixels).

delay

Delay time between images (in 1/100th of a second).

Examples

data("EpiTrans")
covid = GeoLocater(TimeDF = covid19,PointsDF = RndPts)

animate_polygons(region = covid$region,t = covid$date,sf = Taipei)

wenlab501/EpiTrans documentation built on July 8, 2022, 9:14 a.m.