knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Gurugis - the voice of GISdom

Lifecycle: experimental

The goal of gurugis is to provide a series of functions useful to the regular GIS spatial analysis workflow.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("damienjacques/gurugis")

Example

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])


damienjacques/gurugis documentation built on Aug. 3, 2020, 12:58 p.m.