Skip to content

geohabnet

2.3

Geographical Risk Analysis Based on Habitat Connectivity

0packages depend
6.8Kdownloads / year
60.1%test coverage
13/13checks pass

Overview

About
Maintained by Krishna KeshavFirst published 2023-10-209 releasesCRAN page ↗GitHub ↗

The 'geohabnet' package is designed to perform a geographically or spatially explicit risk analysis of habitat connectivity. Xing et al (2021) doi:10.1093/biosci/biaa067 proposed the concept of cropland connectivity as a risk factor for plant pathogen or pest invasions. As the functions in 'geohabnet' were initially developed thinking on cropland connectivity, users are recommended to first be familiar with the concept by looking at the Xing et al paper. In a nutshell, a habitat connectivity analysis combines information from maps of host density, estimates the relative likelihood of pathogen movement between habitat locations in the area of interest, and applies network analysis to calculate the connectivity of habitat locations. The functions of 'geohabnet' are built to conduct a habitat connectivity analysis relying on geographic parameters (spatial resolution and spatial extent), dispersal parameters (in two commonly used dispersal kernels: inverse power law and negative exponential models), and network parameters (link weight thresholds and network metrics). The functionality and main extensions provided by the functions in 'geohabnet' to habitat connectivity analysis are a) Capability to easily calculate the connectivity of locations in a landscape using a single function, such as sensitivity_analysis() or msean(). b) As backbone datasets, the 'geohabnet' package supports the use of two publicly available global datasets to calculate cropland density. The backbone datasets in the 'geohabnet' package include crop distribution maps from Monfreda, C., N. Ramankutty, and J. A. Foley (2008) doi:10.1029/2007gb002947 "Farming the planet: 2. Geographic distribution of crop areas, yields, physiological types, and net primary production in the year 2000, Global Biogeochem. Cycles, 22, GB1022" and International Food Policy Research Institute (2019) doi:10.7910/DVN/PRFF8V "Global Spatially-Disaggregated Crop Production Statistics Data for 2010 Version 2.0, Harvard Dataverse, V4". Users can also provide any other geographic dataset that represents host density. c) Because the 'geohabnet' package allows R users to provide maps of host density (as originally in Xing et al (2021)), host landscape density (representing the geographic distribution of either crops or wild species), or habitat distribution (such as host landscape density adjusted by climate suitability) as inputs, we propose the term habitat connectivity. d) The 'geohabnet' package allows R users to customize parameter values in the habitat connectivity analysis, facilitating context-specific (pathogen- or pest-specific) analyses. e) The 'geohabnet' package allows users to automatically visualize maps of the habitat connectivity of locations resulting from a sensitivity analysis across all customized parameter combinations. The primary functions are msean() and sensitivity analysis(). Most functions in 'geohabnet' provide three main outcomes: i) A map of mean habitat connectivity across parameters selected by the user, ii) a map of variance of habitat connectivity across the selected parameters, and iii) a map of the difference between the ranks of habitat connectivity and habitat density. Each function can be used to generate these maps as 'final' outcomes. Each function can also provide intermediate outcomes, such as the adjacency matrices built to perform the analysis, which can be used in other network analysis. Refer to article at https://garrettlab.github.io/HabitatConnectivity/articles/analysis.html to see examples of each function and how to access each of these outcome types. To change parameter values, the file called 'parameters.yaml' stores the parameters and their values, can be accessed using 'get_parameters()' and set new parameter values with 'set_parameters()'. Users can modify up to ten parameters.

Install

Health

CRAN checks
13OK
Slowest check: 2.2 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.05
60.1%
Coverage · measured lines
96%
Documentation · exports
19
Dependencies · direct
Check history
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 289 wordsVignettesNopkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
98%
Return-value docs
96%
References docs
13%

Downloads

6.8K
CRAN downloads in the past year
Rank #6,113 · ~19/day · ~569/mo
Daily download trend is not available in this view yet.
38830 days
1.6K90 days
6.8K1 year
Compare downloads with other packages →
Also on103 r2u21 autocran

Repository

Repository
6Stars
5Forks
14Open issues
2Open PRs
8Releases
497Commits
5Contributors
agriculturecropgeographical-information-systemgeographynetwork-analysisnetworksrsurveillance
License GPL-3.0 · 497 commits · Last activity 2026-07-18

Stars over time

2024-05-09 · 62026-07-07 · 6

Repository practices

Upstream repositoryBeta

3 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/garrettlab/habitatconnectivity on 2026-07-19.

Continuous integration (1)
GitHub Actions
Lint, format, editor (1)
RStudio project
Governance and community (1)
CODEOWNERS
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
22 external dependencies (excludes base and recommended)
Depends (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 2,872 (65%)Rd 1,522 (34%)YAML 30 (1%)
Code characteristics
Object systems
S4 class4S4 generic4S4 method9RC2
Cyclomatic complexity
2.0 median / 9 max
Test cases
10 / 0.05 per code line

Test coverage

Line coverage

60%

Expression

56.7%

Tests / Examples

60.1% / 6% ex

Functions

89 22 exported

Complexity

2.2 avg / 9 max

Call network

89 nodes / 135 edges

Loading call graph…

Lowest coverage

89 functions
FunctionCycloCoverage
.indices exp10%
geoscale_param exp40%
gplot exp10%
reset_params exp10%
sa_onrasters exp10%
sensitivity_analysis exp40%

People & History

People (5)
Maintainer (1)
Author, Maintainer
Authors (3)
Author, Maintainer
Author
Contributors (1)
Contributor
Copyright holders (1)
Copyright holder, Funder
Funders (1)
Copyright holder, Funder
Package Timeline

9 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 2.3Latest
    2026-05-26 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 2.2
    2025-05-21 · diff ↗
  • unarchivedReturned to CRAN
    2025-05-21
  • R
    R 4.5.0 released · 2025-04-11
  • archivedRemoved from CRAN
    2024-09-28
    issues were not corrected despite reminders
  • 2.1.3
    2024-06-27 · diff ↗
  • unarchivedReturned to CRAN
    2024-06-27
  • archivedRemoved from CRAN
    2024-05-27
    requires archived package 'geodata'
  • R
    R 4.4.0 released · 2024-04-24
  • 2.1.2
    2024-04-08 · diff ↗
  • 2.1.1
    2024-04-05 · diff ↗
  • 2.1.0
    2024-03-28 · diff ↗
  • 2.0.0
    2024-02-27 · diff ↗
  • 1.0.1
    2023-10-31 · diff ↗
  • 1.0.0
    2023-10-20
Show 1 earlier events
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-10-20
Total releases
9 / 3 yrs
License
GPL-3 OSI
Download size
715 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Report a problem with this page →