icons-plugin: Add icons

Description Usage Arguments See Also Examples

Description

Add icons at coordinates.

Usage

1
2
3
add_icons(p, lon, lat, ...)

icons_options(p, class = "datamaps-icon", ...)

Arguments

p

a datamaps object.

lon, lat

coordinates.

...

any other parameter.

class

a valid CSS class.

See Also

Plugin documentation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
)

coords %>% 
  datamaps() %>% 
  add_icons(lon, lat)
                     

JohnCoene/datamaps documentation built on May 17, 2018, 12:17 p.m.