globe_hex.Rd
Add hexbin to a globe.
globe_hex( globe, ..., data = NULL, inherit_coords = TRUE, on_click = NULL, on_right_click = NULL, on_hover = 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, on_right_click, on_hover | JavaScript functions as JS
or |
Valid coordinates (depending on layer).
lat
, lon
,
altitude
margin
weight
resolution
merge
transition
# basic create_globe() %>% globe_pov(-21, 179) %>% globe_hex(coords(lat, long, weight = 1L), data = quakes) %>% scale_hex_side_color(max = 5) %>% scale_hex_cap_color(max = 5) library(shiny) ui <- fluidPage( actionButton("add", "Add hex"), globeOutput("globe") ) server <- function(input, output){ output$globe <- renderGlobe({ create_globe() }) observeEvent(input$add, { globeProxy("globe") %>% globe_hex(coords(lat, long, weight = mag), data = quakes) %>% globe_pov(-21, 179) }) }# NOT RUN { shinyApp(ui, server) # }