Learn R Programming

echarts4r (version 0.1.1)

e_map: Choropleth

Description

Draw maps.

Usage

e_map(e, serie, map = "world", name = NULL, rm.x = TRUE,
  rm.y = TRUE, ...)

e_map_(e, serie, map = "world", name = NULL, rm.x = TRUE, rm.y = TRUE, ...)

e_map_3d(e, serie, map = "world", name = NULL, rm.x = TRUE, rm.y = TRUE, ...)

e_map_3d_(e, serie, map = "world", name = NULL, rm.x = TRUE, rm.y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts.

serie

Values to plot.

map

Map type.

name

name of the serie.

rm.x, rm.y

Whether to remove x and y axis, defaults to TRUE.

...

Any other option to pass, check See Also section.

See Also

e_country_names, https://ecomfe.github.io/echarts-doc/public/en/option.html#series-map, http://echarts.baidu.com/option-gl.html#series-map3D

Examples

Run this code
# NOT RUN {
choropleth <- data.frame(
  countries = c("France", "Brazil", "China", "Russia", "Canada", "India", "United States",
                "Argentina", "Australia"),
  values = round(runif(9, 10, 25))
)

choropleth %>% 
  e_charts(countries) %>% 
  e_map(values) %>% 
  e_visual_map(min = 10, max = 25)

choropleth %>% 
  e_charts(countries) %>% 
  e_map_3d(values, shading = "lambert") %>% 
  e_visual_map(min = 10, max = 30)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab