You see the maps available by running the following:
Otherwise, the full list of maps is vailable here.
There are 215 maps, here are two.
em_map to add the map, simply pass the name of the country, a valid name as returned by
em_bank, then reference that name in
This will also work in 3d with
library(echarts4r.maps) flights <- read.csv( paste0("https://raw.githubusercontent.com/plotly/datasets/", "master/2011_february_aa_flight_paths.csv") ) flights %>% e_charts() %>% em_map("USA") %>% e_geo("USA") %>% e_lines( start_lon, start_lat, end_lon, end_lat, name = "flights", lineStyle = list(normal = list(curveness = 0.3)) )
library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union data("cities") cities %>% filter(country == "IN") %>% mutate(val = runif(n(), 1, 3)) %>% e_charts(lon) %>% em_map("India") %>% e_geo(map = "India") %>% e_scatter(lat, val, coord_system = "geo", scale = NULL) %>% e_visual_map(min = 1, max = 3)