View source: R/layers_heatmap-layer.R
add_heatmap_layer | R Documentation |
The HeatmapLayer
can be used to visualize spatial distribution of data.
It internally implements Gaussian Kernel Density Estimation to render heatmaps.
add_heatmap_layer( deckgl, id = "heatmap-layer", data = NULL, properties = list(), ... )
deckgl |
A deckgl widget object. |
id |
The unique id of the layer. |
data |
The url to fetch data from or a data object. |
properties |
A named list of properties with names corresponding to the properties defined
in the deckgl-api-reference
for the given layer class. The |
... |
Named arguments that will be added to the |
https://deck.gl/#/documentation/deckgl-api-reference/layers/heatmap-layer
## @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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.