Travis build status

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(echarts4r.maps)

echarts4r.maps

Includes:

Installation

Install echarts4r.

install.packages("echarts4r")

Then install echarts4r.maps

install.packages("remotes")
remotes::install_github('JohnCoene/echarts4r.maps')

Example

Use in echarts4r

library(echarts4r)
library(echarts4r.maps)

df <- data.frame(
  x = c(
    "Rajasthan",
    "Gujarat",
    "Odisha"
  ), 
  y = 1:3
)

df %>% 
  e_charts(x) %>%
  em_map("India") %>% 
  e_map(y, map = "India") %>% 
  e_visual_map(y)

# cities
library(dplyr)
data("cities")

cities %>% 
  filter(country == "US") %>% 
  mutate(val = runif(n(), 1, 2)) %>% 
  e_charts(lon) %>%
  em_map("USA") %>% 
  e_geo(map = "USA") %>% 
  e_scatter(lat, val, coord_system = "geo", scale = NULL) %>% 
  e_visual_map(min = 1, max = 2)

Bank

Another great resource for detailed maps is here (use with e_map_register).

em_bank()


JohnCoene/echarts4r.maps documentation built on Jan. 12, 2021, 12:45 a.m.