Skip to contents

Leaflet only works with e_scatter and e_effect_scatter.

Scatter

url <- "https://echarts.apache.org/examples/data-gl/asset/data/population.json"
data <- jsonlite::fromJSON(url)
data <- as.data.frame(data)
names(data) <- c("lon", "lat", "value")
data$value <- log(data$value)

data |> 
  e_charts(lon) |> 
  e_leaflet() |>
  e_leaflet_tile() |>  
  e_scatter(lat, size = value, coord_system = "leaflet")