Skip to content
Back to skills

Mapview

ASecurity

R mapview package for quick interactive maps. Use for rapid spatial data exploration.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 4, 2026
datagoapi

Works with

  • api

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill mapview --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mapview?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mapview
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-mapview/badge)](https://www.skillsdirectory.com/skills/leolin990405-mapview)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mapview
description: R mapview package for quick interactive maps. Use for rapid spatial data exploration.
---

# mapview Package

Quick interactive maps for spatial data exploration.

## Basic Usage

```r
library(mapview)
library(sf)

# Quick view
mapview(shp)

# With column
mapview(shp, zcol = "value")
```

## Customization

```r
mapview(shp,
  zcol = "value",
  col.regions = viridisLite::viridis,
  alpha.regions = 0.8,
  layer.name = "My Layer",
  legend = TRUE
)
```

## Multiple Layers

```r
# Add layers with +
mapview(polygons) + mapview(points)

# Or combine
m1 <- mapview(polygons, col.regions = "blue")
m2 <- mapview(points, col.regions = "red")
m1 + m2
```

## Different Data Types

```r
# sf objects
mapview(sf_object)

# Raster
library(terra)
mapview(raster_object)

# sp objects
mapview(sp_object)
```

## Options

```r
# Global options
mapviewOptions(
  basemaps = c("OpenStreetMap", "Esri.WorldImagery"),
  layers.control.pos = "topright"
)

# Reset
mapviewOptions(default = TRUE)
```

## Basemaps

```r
mapview(shp, map.types = c(
  "OpenStreetMap",
  "Esri.WorldImagery",
  "CartoDB.Positron"
))
```

## Popups

```r
mapview(shp,
  popup = popupTable(shp, zcol = c("name", "value"))
)
```

## Save

```r
m <- mapview(shp)
mapshot(m, file = "map.html")
mapshot(m, file = "map.png")
```

## Sync Maps

```r
# Side by side
sync(m1, m2)

# Lattice view
latticeView(m1, m2)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.