Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
library(ggplot)
library(sf)
library(ggspatial)
library(snapbox)
library(raster)
worldclim <- raster::getData('worldclim', var='prec', res=2.5, lon = 142.61, lat = -23.64)
area <- st_bbox(
c(xmin = 101.03, ymin = -44.82, xmax = 168.23, ymax = -9.09),
crs = 4326
)
rast <- raster::crop(worldclim[[1]], extent(area))
ggplot() +
layer_spatial(rast) +
layer_mapbox(area,
map_style = "mapbox://styles/noamross/ckipi0rfl3ybv17p9dnom27ir/draft",
scale_ratio = 1)
@noamross

This comment has been minimized.

Copy link
Owner Author

@noamross noamross commented Dec 15, 2020

Screen Shot 2020-12-15 at 8 54 36 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment