This document describes the maps.

Choropleth

Pass countries as x argument.

sessions <- read.csv(
  paste0("https://raw.githubusercontent.com/JohnCoene/projects/",
         "master/htmlwidgets/echarts/data/sessions.csv")
)

sessions %>% 
  e_country_names(Country, Country, type = "country.name") %>% # helper
  e_charts(Country) %>% 
  e_map(Sessions) %>% 
  e_visual_map(Sessions)
#> Warning in countrycode::countrycode(data[[src]], origin = type, destination = "country.name", : Some values were not matched unambiguously: , (not set)

Lines

Use e_lines (not e_line)

flights <- read.csv(
  paste0("https://raw.githubusercontent.com/plotly/datasets/",
         "master/2011_february_aa_flight_paths.csv")
)

flights %>% 
  e_charts() %>% 
  e_geo() %>% 
  e_lines(
    start_lon, 
    start_lat, 
    end_lon, 
    end_lat,
    name = "flights",
    lineStyle = list(normal = list(curveness = 0.3))
   )

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)