This document describes the maps.

Choropleth

Pass countries as x argument.

Lines

Use e_lines (not e_line)

Countries

The companion package echarts4r.maps comes with 215 maps.

You can install the package with:

install.packages("remotes")
remotes::install_github('JohnCoene/echarts4r.maps')

View the full list of maps with echarts4r.maps::em_bank().

library(echarts4r.maps)

df <- data.frame(
    region = c("Rajasthan", "Odisha", "Gujarat"), 
    value = c(1,2, 3)
)

df %>% 
    e_charts(region) %>%
    em_map("India") %>% 
    e_map(value, map = "India") %>% 
    e_visual_map(value) %>% 
    e_theme("infographic")

GeoJSON support

Use a custom geojson map; 1) read the json and register it with e_register_map.

json <- jsonlite::read_json("http://www.echartsjs.com/gallery/data/asset/geo/USA.json")

USArrests %>%
  dplyr::mutate(states = row.names(.)) %>%
  e_charts(states) %>%
  e_map_register("USA", json) %>%
  e_map(Murder, map = "USA") %>% 
  e_visual_map(Murder)