create_interactive_map: Create interactive map using leaflet (if available)

View source: R/11-visualization.R

create_interactive_mapR Documentation

Create interactive map using leaflet (if available)

Description

Create interactive maps with leaflet integration when available. Falls back gracefully when leaflet is not installed.

Usage

create_interactive_map(
  spatial_data,
  fill_variable = NULL,
  popup_vars = NULL,
  basemap = "terrain",
  color_scheme = "viridis",
  title = "Interactive Map",
  verbose = FALSE
)

Arguments

spatial_data

Spatial data to map (sf object)

fill_variable

Variable for coloring/filling

popup_vars

Variables to show in popups

basemap

Basemap type: "terrain", "satellite", "osm", "light"

color_scheme

Color scheme for continuous variables

title

Map title

verbose

Print progress messages

Value

leaflet map object or NULL if leaflet unavailable

Examples

## Not run: 
# These examples demonstrate workflows with user's own spatial data
# Simple interactive point map
map <- create_interactive_map(study_sites, fill_variable = "ndvi_mean")

# Polygon map with custom basemap
map <- create_interactive_map(counties, fill_variable = "population",
                             basemap = "satellite")

## End(Not run)


geospatialsuite documentation built on Nov. 6, 2025, 1:06 a.m.