knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of gurugis is to provide a series of functions useful to the regular GIS spatial analysis workflow.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("damienjacques/gurugis")
This is a basic example which shows you how to make quick zonal statistics from a raster and a vector layer describing the areas:
library(gurugis) library(raster) library(sf) # raster file for which I want to compute zonal statistics plot(precipitation) # vector layer with the zones plot(belgium[10], main = "Belgium ADM 3") # compute average of precipiation in each zone output <- zonal_pipe(precipitation, belgium, stats = "mean") # plot 6 first months plot(output[18:23])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.