anthonynorth / snapbox

Static mapbox basemap for ggplot2.
MIT License
41 stars 4 forks source link
ggplot2 mapbox

release

lifecycle

build

<img src="https://github.com/anthonynorth/snapbox/workflows/R-CMD-check/badge.svg", alt = "GitHub actions build status">

snapbox

Static mapbox basemap for ggplot2.

Installation

remotes::install_github("anthonynorth/snapbox")

Usage

library(sf)
library(ggplot2)
library(snapbox)

area <- st_bbox(
  c(xmin = 147, ymin = -43, xmax = 147.7, ymax = -42.65),
  crs = 4326
)

ggplot() +
  layer_mapbox(area, scale_ratio = 0.5)