e_map_3d
family is similar to e_geo_3d
e_map
, or e_globe
.
Choropleth
choropleth <- data.frame(
countries = c("France", "Brazil", "China", "Russia", "Canada", "India", "United States",
"Argentina", "Australia"),
values = round(runif(9, 10, 25))
)
choropleth |>
e_charts(countries) |>
e_map_3d(values, shading = "lambert") |>
e_visual_map(values) # scale to values
Buildings
buildings <- jsonlite::read_json("https://echarts.apache.org/examples/data-gl/asset/data/buildings.json")
heights <- purrr::map(buildings$features, "properties") |>
purrr::map("height") |>
unlist()
names <- purrr::map(buildings$features, "properties") |>
purrr::map("name") |>
unlist()
data <- dplyr::tibble(
name = names,
value = round(runif(length(names), 0, 1), 6),
height = heights / 10
)
data |>
e_charts() |>
e_map_register("buildings", buildings) |>
e_map_3d_custom(name, value, height) |>
e_visual_map(
show = FALSE,
min = 0.4,
max = 1
)