Create a globe object.

create_globe(
  data = NULL,
  coords = NULL,
  antialias = TRUE,
  alpha = TRUE,
  animate_in = TRUE,
  width = "100%",
  height = NULL,
  elementId = NULL
)

Arguments

data

A data.frame containing coordinates (coords).

coords

Coordinates as specified by coords.

antialias, alpha

Configuration parameters to pass to the ThreeJS WebGLRenderer constructor.

animate_in

Whether to animate the globe initialization, by scaling and rotating the globe into its inital position.

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

elementId

Id of element.

Examples

create_globe() %>% globe_pov(-21, 179) %>% globe_bars(coords(lat, long, label = stations), data = quakes)