View source: R/animate_polygons.R
animate_polygons | R Documentation |
Generate animation of chorolepth map of cases by grouping region
animate_polygons( region, t, sf, interval = c("day", "week", "month"), breaks = NULL, gridLonLat = TRUE, width = 600, height = 400, delay = 50 )
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). |
data("EpiTrans") covid = GeoLocater(TimeDF = covid19,PointsDF = RndPts) animate_polygons(region = covid$region,t = covid$date,sf = Taipei)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.