Skip to content

tmap extension featuring two new modes: 'mapbox' and 'maplibre'

License

Notifications You must be signed in to change notification settings

r-tmap/tmap.mapgl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmap.mapgl

Two new tmap modes! Thanks to mapgl, this extension package features two new modes "mapbox" for which an (free for personal use) API key is required, and "maplibre".

Installation

# install.packages("remotes")
install_github("r-tmap/tmap")
install_github("r-tmap/tmap.mapgl")

Example

library(tmap)
library(tmap.deckgl)

# getting API: https://walker-data.com/mapgl/articles/getting-started.html
# check API envir var: Sys.getenv("MAPBOX_PUBLIC_TOKEN")

tmap_mode("mapbox")
tm_shape(World) +
  tm_polygons("HPI", fill.scale = tm_scale_intervals(values = "brewer.rd_yl_gn"))

tm_shape(NLD_dist) +
	tm_polygons("employment_rate",
				fill.scale = tm_scale_intervals(values = "scico.roma"),
				lwd = 0.1) +
tm_shape(NLD_muni) +
	tm_polygons(fill = NULL, lwd = 1) +
	tm_mapbox(pitch = 60) +
	tm_basemap(.tmap_providers$dark)

About

tmap extension featuring two new modes: 'mapbox' and 'maplibre'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages