% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hex_browse.R
\name{hex_browse}
\alias{hex_browse}
\title{Interactive Hex Map}
\usage{
hex_browse(
  hex_data,
  grid = NULL,
  value = NULL,
  palette = "viridis",
  opacity = 0.7
)
}
\arguments{
\item{hex_data}{A HexData object, or a data.frame with a \code{cell_id} column.}

\item{grid}{A HexGridInfo object. Required if \code{hex_data} is a data.frame.}

\item{value}{Optional column name (character) to color cells by.
If \code{NULL}, cells are colored uniformly.}

\item{palette}{Color palette name for continuous values. Default \code{"viridis"}.}

\item{opacity}{Fill opacity (0-1). Default 0.7.}
}
\value{
A \code{leaflet} map object (can be printed or embedded in Shiny).
}
\description{
Opens an interactive leaflet map with hexagonal cell polygons.
Cells can be colored by a data column, with popups showing cell
information on click.
}
\details{
Requires the \code{leaflet} package (in Suggests). The map is built using
\code{\link[=as_sf]{as_sf()}} to generate polygon geometries, then rendered as a leaflet
choropleth.
}
\examples{
\donttest{
if (requireNamespace("leaflet", quietly = TRUE)) {
  df <- data.frame(
    lon = runif(50, -5, 5),
    lat = runif(50, 45, 55),
    value = rnorm(50)
  )
  hd <- hexify(df, lon = "lon", lat = "lat", area_km2 = 500)
  hex_browse(hd, value = "value")
}
}
}
\seealso{
\code{\link[=hexify_heatmap]{hexify_heatmap()}} for static ggplot2 maps,
\code{\link[=as_sf]{as_sf()}} for sf conversion
}
