Learn R Programming

covid19.analytics (version 1.0)

live.map: function to map cases in an interactive map

Description

function to map cases in an interactive map

Usage

live.map(
  data = covid19.data(),
  projctn = "orthographic",
  title = "",
  szRef = 0.2,
  fileName = NULL
)

Arguments

data

data to be used

projctn

initial type of map-projection to use, possible values are: "equirectangular" | "mercator" | "orthographic" | "natural earth" | "kavrayskiy7" | "miller" | "robinson" | "eckert4" | "azimuthal equal area" | "azimuthal equidistant" | "conic equal area" | "conic conformal" | "conic equidistant" | "gnomonic" | "stereographic" | "mollweide" | "hammer" | "transverse mercator" | "albers usa" | "winkel tripel" | "aitoff" | "sinusoidal"

title

a string with a title to add to the plot

szRef

numerical value to use as reference, to scale up the size of the bubbles in the map, from 0 to 1 (smmaller value --> larger bubbles)

fileName

file where to save the HTML version of the interactive figure

Examples

Run this code
# NOT RUN {
# retrieve aggregated data
data <- covid19.data("aggregated")
# interactive map of aggregated cases -- with more spatial resolution
live.map(data)
# }
# NOT RUN {
# interactive map of the time series data of the confirmed cases
# with less spatial resolution, ie. aggregated by country
live.map(covid19.data("ts-confirmed"))

# }

Run the code above in your browser using DataLab