Giter VIP home page Giter VIP logo

habitatconnectivity's Introduction

Github Pages CRAN status

geohabnet

This package expands on Xing et al (2021). It adds capabilities to customize parameter values using functions and shows the results of habitat connectivity risk index in the form of plots. The goal of geohabnet is to enable users to visualize a habitat connectivity risk index using their own parameter values. The risk analysis outputs 3 maps -

  1. Mean habitat connectivity (based on a habitat connectivity index defined by the user)

  2. Difference in habitat connectivity

  3. Variance in habitat connectivity

This package currently supports crop maps sourced from geodata::monfredaCrops() and geodata::spamCrops(). This analysis produces the 3 maps listed above. There are multiple ways in which functions can be used - generate the final outcome and then the intermediate outcomes for more sophisticated use cases. The vignettes provide several examples. The output values are propagated to other functions for performing operations such as distance matrix calculation. The values are set in parameters.yaml and it can be accessed using get_parameters(). See the usage below.

Installation

Package can either be installed from CRAN:

install.packages("geohabnet")
#> Installing package into '/private/var/folders/r5/zggvft9d3yn5kh51wqp78rd00000gn/T/RtmpBU77e3/temp_libpath4f5365f57439'
#> (as 'lib' is unspecified)
#> 
#> The downloaded binary packages are in
#>  /var/folders/r5/zggvft9d3yn5kh51wqp78rd00000gn/T//RtmpBqmkXl/downloaded_packages

or the source version of package can be installed from GitHub with:

if (!require("devtools")) {
  install.packages("devtools")
}

devtools::install_github("GarrettLab/HabitatConnectivity", subdir = "geohabnet")

geohabnet Example

library(geohabnet)

param_file <- geohabnet::get_parameters()
# now edit the file
geohabnet::set_parameters(new_params = param_file)

Run the analysis using -

geohabnet::sensitivity_analysis()

parameters.yaml stores the parameter and its values. It can be accessed and set using get_parameters() and set_parameters() respectively. By default risk analysis is run on global index, for which scales are present in global_scales() .

Refer to help using ?geohabnet::fun or help(geohabnet::fun)

Refer to article Analyzing risk index using cropland connectivity for more elaborate description and usages of functions in this package.

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.