plot_province_map: China ncov map

Description Usage Arguments

View source: R/province_map.R

Description

China ncov map

Foreign ncov map

Plot maps for nCoV

Plot world ncov map

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
plot_china_map(
  ncov,
  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"
)

plot_foreign_map(
  ncov,
  country,
  key = c("confirmedCount", "suspectedCount", "curedCount", "deadCount"),
  bins = c(0, 10, 100, 500, 1000),
  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

country

country name

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

x

ncov data


yiluheihei/ncovmap documentation built on March 30, 2020, 5:27 a.m.