inst/examples/deckgl-api-reference/heatmap-layer.R

## @knitr heatmap-layer
data("sf_bike_parking")

map <- deckgl() %>%
  add_heatmap_layer(
    data = sf_bike_parking,
    getPosition = ~lng + lat,
    getWeight = ~spaces
  ) %>%
  add_basemap()

if (interactive()) map

Try the deckgl package in your browser

Any scripts or data that you put into this service are public.

deckgl documentation built on July 1, 2020, 7:36 p.m.