# GridLayer

The GridLayer renders a grid heatmap based on an array of points. It takes the constant size all each cell, projects points into cells. The color and height of the cell is scaled by number of points it contains.

sample_data <- paste0(
"https://raw.githubusercontent.com/",
"uber-common/deck.gl-data/",
"master/website/sf-bike-parking.json"
)

properties <- list(
extruded = TRUE,
cellSize = 200,
elevationScale = 4,
getPosition = get_property("COORDINATES"),
getTooltip = JS("object => ${object.position.join(', ')}<br/>Count:${object.count}"),
fixedTooltip = TRUE
)

deck <- deckgl(zoom = 11, pitch = 45, bearing = 35) %>%
add_grid_layer(data = sample_data, properties = properties) %>%
if (interactive()) deck