https://github.com/johncoene/echarts4r.maps
Maps for echarts4r
https://github.com/johncoene/echarts4r.maps
echarts rstats visualisation
Last synced: 14 days ago
JSON representation
Maps for echarts4r
- Host: GitHub
- URL: https://github.com/johncoene/echarts4r.maps
- Owner: JohnCoene
- License: other
- Created: 2018-11-11T19:52:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-11T22:08:03.000Z (over 4 years ago)
- Last Synced: 2025-04-12T00:42:33.125Z (14 days ago)
- Topics: echarts, rstats, visualisation
- Language: R
- Homepage: http://echarts4r-maps.john-coene.com/
- Size: 10.6 MB
- Stars: 19
- Watchers: 5
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---[](https://travis-ci.org/JohnCoene/echarts4r.maps)
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(echarts4r.maps)
```# echarts4r.maps
Includes:
- 215 maps for [echarts4r](https://echarts4r.john-coene.com/).
- A dataset of the latitude and longitude of all cities on planet earth with greater than 1000 people.## Installation
Install `echarts4r`.
```r
install.packages("echarts4r")
```Then install `echarts4r.maps`
```r
install.packages("remotes")
remotes::install_github('JohnCoene/echarts4r.maps')
```## Example
Use in echarts4r
```r
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](https://code.highcharts.com/mapdata/) (use with `e_map_register`).
```{r}
em_bank()
```