Giter Site home page Giter Site logo

bcgov / wetlandmapr Goto Github PK

View Code? Open in Web Editor NEW
17.0 8.0 6.0 7.83 MB

Scripts, tools and example data for mapping wetland ecosystems using data driven R statistical methods like Random Forests and open source GIS

License: Apache License 2.0

R 100.00%
package mapping-wetland-ecosystems wetland-model raster rsaga saga-gis data-driven random-forests statistical-methods random-forest

wetlandmapr's Introduction

wetlandmapR

Lifecycle:Maturing R package for mapping wetland ecosystems using data driven R statistical methods like Random Forests and open source GIS.

Introduction

This package (in development) provides tools for running the ModelMap::model.build and ModelMap::model.mapmake R functions, specifically for modeling and mapping wetland ecosystems. Additional functions help generate the necessary input training data and raster look up table inputs.

Wetland models can be run using area of interest polygons, restricting output to specific drainage basins, for example.

wetlandmapR depends on RSAGA for some raster processing. RSAGA depends on SAGA GIS being installed and accessible on your computer. Please see the RSAGA documentation for instructions on how to do this. Optionally, if the user wishes to attribute upstream basin statistics to provided pour points GRASS-GIS version 7.6.0 or higher must also be installed in addition to the rgrass7 R package.

Functions

create_dem_products

Creates raster derivatives (products) from an input Digital Elevation Model (DEM) using SAGA-GIS.

stack_rasters

Aligns input raster(s) to a target raster so that extent, cell size, and cell origin are the same, returning a RasterStack object.

grid_values_at_sp

Adds cell values from a Raster object as attributes to a SpatialPoints object.

wetland_model

This function runs ModelMap::model.build to build a wetland model using training data attributed with predictor values.

wetland_map

This function runs ModelMap::model.mapmake to generate raster prediction surfaces using model output from wetland_model.

raster_to_clean_polygon

This function reads in classified raster values and creates polygons from contiguous cell values, these polygons are then simplified.

set_grass_env

This function initializes a GRASS-GIS environment using the rgrass7 package in order to calculate upstream basin statistics of user provided pour points of interest.

run_basin_stats

This function assumes set_grass_env has been called. This function attributes upstream basin statistics calculated from provided input raster layers for specified pour point locations.

Installation

Get the latest version from GitHub with:

devtools::install_github("bcgov/wetlandmapR")

Or with Docker

Download a Docker image based on rocker/geospatial:3.6.3 with all the required dependencies and packages pre-installed with:

docker pull huntgdok/wetlandmapr:latest

The image can then be run by passing the command:

docker run -e PASSWORD=URPassword -p 8787:8787 --rm huntgdok/wetlandmapr:latest 

Where URPassword is any password of your choice, and username rstudio. The running container can be viewed by passing localhost to your browser. Be sure to copy all outputs locally before exiting as all data will be lost.

Examples

See the example vignette which describes wetlandmapR_example how to use the functions in this package together for mapping wetlands.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.