High-Performance 'WebGL' Mapping Widgets for R

Creates interactive maps using 'MapLibre GL' and 'deck.gl' via 'htmlwidgets'. Provides GPU-accelerated layers for points, lines and polygons, plus linked user interface components such as filters, views and summary cards for exploratory analysis and production dashboards.


maplamina

GPU-accelerated interactive maps for R (MapLibre GL + deck.gl via htmlwidgets).

Status: early / MVP. APIs may change.

  • Fast: WebGL rendering with binary (typed-array) attributes for smooth interaction with millions of features.
  • R-native syntax: pipe-friendly add_*() verbs plus formula mappings like radius = ~value.
  • First-class components: views, filters, and summaries are built in - no more layer-control workarounds.
  • Composable UI: bind components into shared controls, and mount them in an optional panel UI.
  • sf-friendly: works naturally with sf objects for points, lines, and polygons.
  • Quarto/R Markdown ready: designed to drop into reports and dashboards.

Installation

CRAN submission is pending. Install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("jhumbl/maplamina")

Quick start (views)

A minimal example showing views switching the radius mapping:

set.seed(1)
n <- 2000
d <- data.frame(
  lon   = runif(n, -60, 60),
  lat   = runif(n, -60, 60),
  value = runif(n, 1, 10)
)

maplamina() |>
  add_circles(d, stroke = FALSE, fill_color = "darkblue") |>
  add_views(
    view("Value",         radius = ~value),
    view("Inverse Value", radius = ~(max(value) - value + 1))
  )

Other components

  • add_filters()
    • filter_range() numeric slider
    • filter_select() categorical selector
  • add_summaries()
    • summary_count(), summary_mean(), summary_min(), summary_max(), summary_sum()
  • Tooltips/popups: tmpl()
  • Optional UI: add_panel() + section() / sections()
  • Legends: add_legend()

Layers

  • add_circles() points/circles
  • add_lines() paths/lines
  • add_polygons() filled polygons (+ stroke)
  • add_icons() / add_markers() point icons/markers

Getting help

Roadmap

Planned improvements include more layer types, additional components, and alternative themes.

License

MIT.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("maplamina")

0.1.0 by Jack Humble, 7 months ago


https://github.com/jhumbl/maplamina


Report a bug at https://github.com/jhumbl/maplamina/issues


Browse source code at https://github.com/cran/maplamina


Authors: Jack Humble [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmlwidgets, digest, base64enc, sf

Suggests testthat, jsonlite


See at CRAN