globe_choropleth.RdAdd points to a globe.
globe_choropleth( globe, ..., data = NULL, inherit_coords = TRUE, on_click = NULL, on_right_click = NULL, on_hover = NULL, match = c("auto", "iso2", "iso3", "name"), polygons = NULL )
| globe | An object of class |
|---|---|
| ... | Coordinates, as specified by |
| data | A data.frame of points to draw. |
| inherit_coords | Whether to inherit the coordinates ( |
| on_click | JavaScript functions as JS
or |
| on_right_click | JavaScript functions as JS
or |
| on_hover | JavaScript functions as JS
or |
| match | The type of |
| polygons | Polygons to match data against, if
|
By default the function will match the
coords country argument
against an internal dataset of country names,
and iso codes.
In order to use other polygons, one can pass
GeoJSON as a list to the polygons
argument and specify polygon argument in
coords: this will match the latter
against the data, see
online documentation
for a full example.
Valid coordinates.
country
polygon
altitude
label
side_color, cap_color
transition
create_globe() %>% globe_img_url() %>% globe_choropleth( data = agriland, coords(country = country_code, cap_color = percent) )