Plot maps for nCoV

plot_china_map(
  ncov,
  key = c("confirmedCount", "suspectedCount", "curedCount", "deadCount"),
  filter = "unkown",
  bins = c(0, 10, 100, 500, 1000, 10000),
  legend_title = "Confirmed",
  legend_position = c("bottomright", "topright", "bottomleft", "topleft"),
  color = "Reds"
)

plot_province_map(
  ncov,
  province,
  key = c("confirmedCount", "suspectedCount", "curedCount", "deadCount"),
  legend_position = c("bottomright", "topright", "bottomleft", "topleft"),
  legend_title = "Confirmed",
  color = "Reds",
  scale = c("cat", "log"),
  bins = c(0, 10, 100, 1000),
  map_title = paste0(province, "nCoV")
)

plot_province_map2(
  ncov,
  province,
  key = c("confirmedCount", "suspectedCount", "curedCount", "deadCount"),
  legend_position = c("bottomright", "topright", "bottomleft", "topleft"),
  legend_title = "Confirmed",
  color = "Reds",
  scale = c("cat", "log"),
  bins = c(0, 10, 100, 1000),
  tile_type = NULL,
  map_title = paste0(province, "nCoV")
)

plot_world_map(
  x,
  key = c("confirmedCount", "suspectedCount", "curedCount", "deadCount"),
  bins = c(0, 10, 100, 500, 1000, 10000),
  legend_title = "Confirmed",
  legend_position = c("bottomright", "topright", "bottomleft", "topleft"),
  color = "Reds"
)

Arguments

ncov

ncov data

key

the feature to plot

bins

a numberic vector to cut the value to format the value to

legend_title

legend title

legend_position

legend position

color

color palette

province

which province to plot

scale

category or factor

map_title

map title category, only worked while scale is "cat"

tile_type

function to define tile like amap or addTiles, default NULL

Details

For plot_province_map(), the color is set to white manually if there is no ncov.