Created
December 15, 2020 13:55
-
-
Save noamross/c887d6a0c1d85bba683f43086d78f7a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
Author
noamross
commented
Dec 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment