Includes:
Use in echarts4r.
library(dplyr)
library(echarts4r)
library(echarts4r.maps)
data("cities")
cities %>%
filter(country == "US") %>%
mutate(val = runif(n(), 1, 3)) %>%
e_charts(lon) %>%
em_map("USA") %>%
e_geo(map = "USA") %>%
e_scatter(lat, val, coord_system = "geo", scale = NULL, legend = FALSE) %>%
e_visual_map(min = 1, max = 3) %>%
e_title("US Cities", "Cities with over 1,000 inhabitants")