# HexagonLayer

The `HexagonLayer` renders a hexagon heatmap based on an array of points. It takes the radius of hexagon bin, projects points into hexagon bins. The color and height of the hexagon is scaled by number of points it contains.

    data("sf_bike_parking")

    properties <- list(
      extruded = TRUE,
      radius = 200,
      elevationScale = 4,
      getPosition = ~lng + lat,
      getTooltip = JS("object => `${object.position.join(', ')}<br/>Count: ${object.points.length}`"),
      fixedTooltip = TRUE
    )

    deck <- deckgl(zoom = 11, pitch = 45, bearing = 35) %>%
      add_hexagon_layer(data = sf_bike_parking, properties = properties) %>%
      add_mapbox_basemap()

    if (interactive()) deck

See also deckgl-api-reference-hexagon-layer