Description Usage Arguments Details Value Examples
Generates an animated global map plot of a certain value of data.
1 2 | mapPlotAnimate(data, first_date = NA, last_date = NA,
selected_value_type = NA, color = "red", alpha = 0.5, fps = 10)
|
data |
The data frame that contains the data to be plotted on the world map. This data frame must contain the following columns: "long" (type "numeric"), "lat" (type "numeric"), and "value" (type "numeric"). |
first_date |
This is the first date shown in the animation. |
last_date |
This is the last date shown in the animation. |
selected_value_type |
If the data frame contains a column "value_type" with multiple dates, this parameter must specify a specific data value type to be plotted. Options are "cases", "deaths", and "recovered". |
color |
Color of points on world map. Default is red. |
alpha |
Transparency level of points on world map. Default is 0.5. |
fps |
Number of frames displayed per second for the animation. Default is 10. |
Note: Expect inconsequential warnings when running this function that do not deter the construction or alter the behavior of the animation plot in any way.
Output is an animated ggplot object which maps the chosen value on a world map using latitude and longitude data over the range of dates specified.
1 2 | covid_data <- importCovidData(from_web = FALSE)
mapPlotAnimate(covid_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.