Description Usage Arguments Examples
Add coordinates to map.
1 2 3 | emap_coords(p, lon, lat)
emap_coords_(p, lon, lat)
|
p |
an echart object |
lon, lat |
coordinates to plot. |
1 2 3 4 5 6 7 8 9 10 11 12 | coords <- data.frame(city = c("London", "New York", "Beijing", "Sydney"),
lon = c(-0.1167218, -73.98002, 116.3883, 151.18518),
lat = c(51.49999, 40.74998, 39.92889, -33.92001))
edges <- data.frame(source = c("Beijing", "Beijing", "New York"),
target = c("Sydney", "London", "London"))
coords %>%
echart(city) %>%
emap() %>%
emap_coords(lon, lat) %>%
emap_lines(edges, source, target)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.