{"id":23627197,"url":"https://github.com/cadam00/prior3d","last_synced_at":"2026-03-06T08:01:57.594Z","repository":{"id":250585606,"uuid":"834862672","full_name":"cadam00/prior3D","owner":"cadam00","description":"Toolset for 3D systematic conservation planning, conducting nested prioritization analyses across multiple depth levels and ensuring efficient resource allocation throughout the water column","archived":false,"fork":false,"pushed_at":"2025-01-25T07:49:23.000Z","size":3900,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-09T07:26:07.728Z","etag":null,"topics":["biodiversity","conservation","conservation-planning","depth","marine-spatial-planning","multidimensional-environments","prioritization","r","r-package"],"latest_commit_sha":null,"homepage":"https://cadam00.github.io/prior3D/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadam00.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-28T15:35:44.000Z","updated_at":"2025-01-25T07:46:00.000Z","dependencies_parsed_at":"2025-04-12T23:39:42.925Z","dependency_job_id":"960a3ef5-b567-4cb9-9659-cd478b4dfb57","html_url":"https://github.com/cadam00/prior3D","commit_stats":null,"previous_names":["cadam00/prior3d"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cadam00/prior3D","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fprior3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fprior3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fprior3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fprior3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadam00","download_url":"https://codeload.github.com/cadam00/prior3D/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadam00%2Fprior3D/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30166859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biodiversity","conservation","conservation-planning","depth","marine-spatial-planning","multidimensional-environments","prioritization","r","r-package"],"created_at":"2024-12-27T23:57:11.733Z","updated_at":"2026-03-06T08:01:57.553Z","avatar_url":"https://github.com/cadam00.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/prior3D)](https://CRAN.R-project.org/package=prior3D)\n[![Developmental version](https://img.shields.io/badge/devel%20version-0.1.5-blue.svg)](https://github.com/cadam00/prior3D)\n[![R-CMD-check](https://github.com/cadam00/prior3D/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cadam00/prior3D/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n**This research was conducted at the Department of Marine Sciences, University\nof the Aegean, Greece, supported by the European Union’s Horizon 2020 research\nand innovation programme HORIZON-CL6–2021-BIODIV-01–12, under grant agreement\nNo 101059407, “MarinePlan – Improved transdisciplinary science for effective\necosystem-based maritime spatial planning and conservation in European Seas”.**\n\n## 1 **Introduction to the prior3D Package (tutorial)**\n\nThe **prior3D** package offers a comprehensive toolset for 3D systematic\nconservation planning, conducting nested prioritization analyses across\nmultiple depth levels and ensuring efficient resource allocation\nthroughout the water column ([Doxa et al. 2022](#ref-doxa20224d)). It\nprovides a structured workflow designed to address biodiversity\nconservation and management challenges in the 3 dimensions, such as the\nincorporation of multiple costs at different depth levels, while\nfacilitating users’ choices and parameterization. The process initiates\nfrom the deepest level and progressively moves toward the surface, by\nconducting a step-by-step prioritization analysis at each depth Figure\n[1](#fig-Figure1). The optimization result at each depth level is considered as\na cost layer for the layer above. This approach gives priority to areas chosen\nin deeper waters when selecting areas at the subsequent upper level, thus\ncreating a cascading prioritization structure. The **prior3D** package is built\nupon the **prioritizr** package ([Hanson et al. 2024](#ref-prioritizr)), using\ncommercial and open-source exact algorithm solvers that ensure optimal solutions\nto prioritization problems.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig1.jpg\"\n  alt=\"Figure 1: Flow chart of the 3D prioritization analysis for the four depth\n  zones considered in the @doxa20224d analysis\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure1\"\u003e\u003c/span\u003eFigure 1: Flow chart of the 3D\nprioritization analysis for the four depth zones considered in the Doxa\net al. (\u003ca href=\"#ref-doxa20224d\"\u003e2022\u003c/a\u003e) analysis\n\u003c/p\u003e\n\nThis tutorial will guide you through the key functions of the package,\nfrom data preparation to generating informative outputs to address\nconservation challenges in diverse marine (and terrestrial) ecosystems\nand enable informed decision-making in biodiversity conservation,\nrestoration and management.\n\n## 2 **Workflow: Running the analysis**\n\nThe package provides two options for conducting analyses:\n\n1.  Running a Step-by-Step 3D SCP analysis\n\n2.  Running a Comparative Analysis of a 2D and a 3D SCP approach\n\nWhen opting for the step-by-step analysis (first option), the workflow\nproceeds as follows:\n\n1.  Use the `split_rast()` function to convert 2D distribution rasters\n    of biodiversity features into a 3D format.\n\n2.  Use the `prioritize_3D()` function to set the optimization problem\n    and define its parameters. This function also solves the problem and\n    provides the solution in the form of a map.\n\n3.  Use the `evaluate_3D()` function to obtain detailed results in a\n    tabular format.\n\n4.  Use the `plot_3D()` function to generate graphs based on the\n    solution results.\n\nWhen opting for a comparative analysis of a 2D and a 3D SCP approach\n(second option), users can use the `Compare_2D_3D()` function. This\nfunction incorporates the aforementioned detailed workflow and applies\nit to both 2D and 3D approaches, streamlining and simplifying the\nanalysis process for users. By using this function, users provide the\ninput data, define the optimization problem and its parameterization,\nrun the analysis and finally obtain the results in the form of maps,\ngraphs and tables.\n\nThe **spatial coherence** of the solution maps can be evaluated through\na post-processing analysis, which can be conducted after either the\nstep-by-step or the comparative analysis. The necessary functions for\nthis assessment are also provided within the package.\n\n## 3 **Installation**\n\nAll the functions of the package prior3D can be installed in R via:\n``` r\ninstall.packages(\"prior3D\")\n```\n\nAlternatively, development version of the package can be installed using:\n``` r\nif (!require(remotes)) install.packages(\"remotes\")\nremotes::install_github(\"cadam00/prior3D\")\n```\n\n## 4 **Citation**\n\u003e Doxa A, Adam C, Nagkoulis N, Mazaris AD, Katsanevakis S, 2025. prior3D: An R\npackage for three-dimensional conservation prioritization. Ecological Modelling\n\u003cb\u003e499\u003c/b\u003e: 110919. https://doi.org/10.1016/j.ecolmodel.2024.110919\n\n## 5 **Illustration example**\n\nLet us consider the following dataset as an illustrative example. It\nrepresents a subset of the species analyzed in Doxa et al.\n([2022](#ref-doxa20224d)). For simplicity reasons, we have included only\n20 species for demonstration purposes.\n\n**Biodiversity features**\n\nTwo types of input data are needed for the biodiversity features.\n\n1.  Species information tables in tabular form (`data.frame`). The first\n    `data.frame` contains information about the features. If the\n    biodiversity features concern species then this data.frame must\n    indicate at least the species name and species classification as\n    pelagic or benthic (mandatory). Additional optional data may include\n    species assignment to prioritization groups and, if available, the\n    species’ bathymetric range (min and max depth at which the species\n    occurs). The second `data.frame` is a prioritization weights table,\n    where users can assign specific weights to different prioritization\n    groups. These groups can represent any meaningful categorization for\n    the prioritization process, like taxonomical, functional, or\n    conservation status categories, such as those defined by the IUCN.\n\n2.  Biodiversity distribution data in 2D raster form. These rasters\n    contain the information on the spatial distribution of the features\n    across the study area. Biodiversity distribution information can\n    represent either presence-absence data (binary) or any continuous\n    information, such as biomass/abundance, probability of occurrences.\n\n``` r\n# Import prior3D R package\nlibrary(prior3D)\n\n# Species information table\ndata(biodiv_df)\nhead(biodiv_df)\n```\n\n``` r\n##               species_name pelagic min_z max_z\n## 1   acanthocybium_solandri       1   -20     0\n## 2    acantholabrus_palloni       0  -500   -30\n## 3 acanthomysis_longicornis       0  -100    -2\n## 4      abraliopsis_morisii       0 -3660     0\n## 5          abralia_veranyi       0  -900    -1\n## 6     abraliopsis_pfefferi       0  -750    -1\n```\n\n``` r\n# Biodiversity distribution data in 2D raster form\nbiodiv_raster \u003c- get_biodiv_raster()\nbiodiv_raster\n```\n\n``` r\n## class       : SpatRaster \n## dimensions  : 31, 83, 20  (nrow, ncol, nlyr)\n## resolution  : 0.5, 0.5  (x, y)\n## extent      : -5.5, 36, 30.5, 46  (xmin, xmax, ymin, ymax)\n## coord. ref. : lon/lat WGS 84 (EPSG:4326) \n## source      : biodiv_raster.tif \n## names       : aapto~aptos, abiet~etina, abra_alba, abral~ranyi, abral~risii, abral~fferi, ... \n## min values  :        0.01,        0.01,      0.01,        0.01,        0.01,        0.01, ... \n## max values  :        1.00,        0.63,      1.00,        1.00,        1.00,        1.00, ... \n```\n\n**Planning site, planning units and depth levels**\n\nIn the illustration example, we consider as our planning site the\nMediterranean Sea, with 0.5\u0026deg;x0.5\u0026deg; cells as our planning unites (PUs).\nWe consider four depth levels: (i) 0 to 40 m (infralittoral zone, extending to\nthe lower limit of photophilic algae and seagrasses), (ii) 40 to 200 m\n(circalittoral zone, continental shelf, animal-dominated), (iii) 200 to 2000 m\n(~continental slope), and (iv) exceeding 2000 m in depth (lower bathyal plains\nand abyssal zone) (Figure [2](#fig-Figure2)).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig2.jpg\"\n  alt=\"Figure 2: The study area and the considered depth zones\" width=\"50%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure2\"\u003e\u003c/span\u003eFigure 2: The study area and the\nconsidered depth zones\n\u003c/p\u003e\n\nTo conduct the analysis, a SpatRaster object containing bathymetric data\nfor the planning site is needed. This raster should represent depths\nwith negative values and match the extent and resolution of the\nbiodiversity rasters. Alternatively, if bathymetry maps of greater\nresolution and broader extent are available, they can also be used, as\nthe prior3D functions internally conduct cropping and resampling to\nmatch the biodiversity data. Producing the final depth raster that\ndelineates the desired depth zones is also produced by the prior3D\nfunctions.\n\n``` r\n# Biodiversity distribution data in 2D raster form\ndepth_raster \u003c- get_depth_raster()\ndepth_raster\n```\n\n``` r\n## class       : SpatRaster \n## dimensions  : 31, 83, 1  (nrow, ncol, nlyr)\n## resolution  : 0.5, 0.5  (x, y)\n## extent      : -5.5, 36, 30.5, 46  (xmin, xmax, ymin, ymax)\n## coord. ref. : lon/lat WGS 84 (EPSG:4326) \n## source      : depth_raster.tif \n## name        : depth_raster \n## min value   :  -4082.70312 \n## max value   :     -6.60191\n```\n\n## 6 **Step-by-Step 3D SCP analysis**\n\n### 6.1 **Step 1: Data Preparation**\n\n**Transforming Biodiversity Distributions into Multilevel (3D) Data**\n\nThe `split_rast()` function is used to convert 2D distributions of\nbiodiversity features (rasters) into a 3D format.\n\n``` r\n# Splitting features' 2D distributions into 3D ones\nsplit_features \u003c- split_rast(biodiv_raster,\n                             depth_raster,\n                             breaks = c(0, -40, -200, -2000, -Inf),\n                             biodiv_df,\n                             val_depth_range=TRUE)\n```\n\nThe output is a list containing species distributions for each\nbathymetric layer, necessary for the analysis next steps.\n\n### 6.2 **Step 2: 3D Prioritization Algorithm**\n\nThe 3D prioritization algorithm is implemented using the\n`prioritize_3D()` function, the core function of the **prior3D**\npackage. This function uses the list generated from the `split_rast()`\nfunction and other necessary inputs.\n\n``` r\nsingle_3D \u003c- prioritize_3D(split_features  = split_features,\n                           depth_raster    = depth_raster,\n                           breaks          = c(0, -40, -200, -2000, -Inf),\n                           biodiv_df       = biodiv_df,\n                           budget_percents = 0.3,\n                           budget_weights  = \"richness\",\n                           threads         = parallel::detectCores(),\n                           portfolio       = \"gap\", #\"shuffle\"\n                           portfolio_opts  = list(number_solutions = 10))\n```\n\n``` r\n## Budget: 0.3\n```\n\n\u003cu\u003eNotes:\u003c/u\u003e\n\n`budget_percent`: Contrarily to its strict economic definition, budget\nreflects the desired level of protection to be modeled. It ranges from 0\nto 1, with 0 indicating no resources available for protection, while 1\nsignifies resources sufficient to protect the entire study area.\nTypically, setting a budget of 0.3 corresponds to the 30% conservation\ntarget (i.e. 30% of the total area set aside for conservation). Users\nalso have the flexibility to define multiple budget levels using a\nvector, allowing for the exploration of various protection scenarios.\nFor instance, a vector like `c(0.1, 0.3, 0.5)` represents three\nscenarios where 10%, 30%, and 50% of the study area are designated for\nprotection.\n\n`budget_weights`: The `prioritize_3D()` function allows users to specify\nhow the budget is distributed among depth levels. Three allocation\nmethods are available:\n\n1.  Equal Distribution: Allocates an equal share of the budget to each\n    depth level (`budget_weights =\"equal\"`).\n\n2.  Proportional to Area: Allocates budget based on the spatial extent\n    of each depth level (`budget_weights =\"area\"`).\n\n3.  Proportional to Species Richness: Prioritizes budget allocation to\n    depth levels with higher species diversity (number of species).\n    (`budget_weights = \"richness\"`)\n\n### 6.3 **Step 3: Generating Outputs**\n\n**Prioritization Maps**\n\nThe `prioritize_3D()` function is used to generate prioritization maps.\nSingle budget settings (ex. `total_budget=0.3`) produce standard maps,\nas typical Marxan outputs. Multiple budgets, by using a vector (ex.\n`c(0.1,0.3,0.5)`, indicating available resources sufficient to protect\n10%, 30% and 50% of the area) result in cumulative maps, illustrating\nareas selected by various budget levels. Although this output follows a\ndifferent approach, it resembles to typical Zonation output maps.\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig3.jpg\"\n  alt=\"Figure 3: Prioritization maps for single and multiple budget percentages\"\n  width=\"100%\" style=\"display: block; margin: auto;\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure3\"\u003e\u003c/span\u003eFigure 3: Prioritization maps for single and\nmultiple budget percentages\n\u003c/p\u003e\n\n``` r\n# Create plot of outputs for a single budget percentage\nplot_3D(single_3D, to_plot=\"all\", add_lines=FALSE)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig4.jpg\"\n  alt=\"Figure 4: Output for 30% budget percentage\"\n  width=\"60%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure4\"\u003e\u003c/span\u003eFigure 4: Output for 30% budget percentage\n\u003c/p\u003e\n\nAnd for multiple budgets\n\n``` r\n# Create plot of outputs for multiple budget percentages\nmultiple_3D \u003c- prioritize_3D(split_features  = split_features,\n                             depth_raster    = depth_raster,\n                             breaks          = c(0, -40, -200, -2000, -Inf),\n                             biodiv_df       = biodiv_df,\n                             budget_percents = seq(0,1,0.1),\n                             budget_weights  = \"richness\",\n                             threads         = parallel::detectCores(),\n                             portfolio       = \"gap\",\n                             portfolio_opts  = list(number_solutions = 10))\n```\n\n``` r\n## Budget: 0\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Budget: 0.1\n## Budget: 0.2\n## Budget: 0.3\n## Budget: 0.4\n## Budget: 0.5\n## Budget: 0.6\n## Budget: 0.7\n## Budget: 0.8\n## Budget: 0.9\n## Budget: 1\n## Warning: Problem failed presolve checks.\n## \n## These checks indicate that solutions might not identify meaningful priority\n## areas:\n## \n## ✖ Budget is greater than the total cost of selecting all planning units.\n## → Maybe you made a mistake when setting the `budget` in the objective function?\n## \n## ℹ For more information, see `presolve_check()`.\n```\n\n``` r\nplot_3D(multiple_3D)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig5.jpg\"\n  alt=\"Figure 5: Output for multiple budget percentages\"\n  width=\"75%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure5\"\u003e\u003c/span\u003eFigure 5: Output for multiple budget\npercentages\n\u003c/p\u003e\n\n## 7 **Comparative Analysis of a 2D and a 3D SCP approach**\n\nTo facilitate comparisons between 3D and 2D approaches, the\n`compare_2D_3D()` function is provided in the package. This function\nenables users to conduct all the above mentioned steps of analysis (data\ngeneration, setting and solving the optimization problem and producing\noutputs), by executing both 2D and 3D approaches, with similar settings,\nthat facilitate comparisons. The function `plot_Compare_2D_3D()`\ngenerates corresponding maps and graphs for both approaches.\n\n``` r\nout_2D_3D \u003c- Compare_2D_3D(biodiv_raster   = biodiv_raster,\n                           depth_raster    = depth_raster,\n                           breaks          = c(0, -40, -200, -2000, -Inf),\n                           biodiv_df       = biodiv_df,\n                           budget_percents = seq(0, 1, 0.1),\n                           budget_weights  = \"richness\",\n                           threads         = parallel::detectCores(),\n                           portfolio       = \"gap\", #\"shuffle\"\n                           portfolio_opts  = list(number_solutions = 10))\n```\n\n```r\n## Budget: 0\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Warning: Portfolio could only find 1 out of 10 solutions.\n## Budget: 0.1\n## Budget: 0.2\n## Budget: 0.3\n## Budget: 0.4\n## Budget: 0.5\n## Budget: 0.6\n## Budget: 0.7\n## Budget: 0.8\n## Budget: 0.9\n## Budget: 1\n## Warning: Problem failed presolve checks.\n## \n## These checks indicate that solutions might not identify meaningful priority\n## areas:\n## \n## ✖ Budget is greater than the total cost of selecting all planning units.\n## → Maybe you made a mistake when setting the `budget` in the objective function?\n## \n## ℹ For more information, see `presolve_check()`.\n## Warning: Problem failed presolve checks.\n## \n## These checks indicate that solutions might not identify meaningful priority\n## areas:\n## \n## ✖ Budget is greater than the total cost of selecting all planning units.\n## → Maybe you made a mistake when setting the `budget` in the objective function?\n## \n## ℹ For more information, see `presolve_check()`.\n```\n\n```r\nplot_Compare_2D_3D(out_2D_3D, to_plot=\"all\", add_lines=TRUE)\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/fig6.jpg\"\n  alt=\"Figure 6: Comparison of 2D vs 3D approach for multiple budget\n  percentages\"\n  width=\"75%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure6\"\u003e\u003c/span\u003eFigure 6: Comparison of 2D vs 3D approach\nfor multiple budget percentages\n\u003c/p\u003e\n\n## 8 **Spatial Coherence Metrics**\n\nThe spatial coherence of the prioritization output (optimization\nsolution) maps is assessed using three metrics: average surface\nroughness (SA), surface kurtosis (SKU), and the RAO index. These can be\nused for comparison among solution 2D and 3D solutions.\n\nHigh SA values signify that there is a high spatial heterogeneity,\nindicating lower spatial coherence. High SKU indicate high spatial\ncoherence. Both SA and SKU are calculated using R package **geodiv**\n([Smith et al. 2023](#ref-geodiv)), applying `geodiv::focal_metrics`\nfunctions “sa” and “sku” to optimization solution rasters.\n\nHigh RAO values suggest increased spatial heterogeneity, thus low\nspatial coherence. To compute the RAO metric, a moving window approach\nis employed on optimization solution maps, using function\n`rasterdiv::paRao` from R package **rasterdiv** ([Rocchini, Thouverai,\net al. 2021](#ref-rasterdiv); [Rocchini, Marcantonio, et al.\n2021](#ref-rasterdivpaper)). The dimensions of the window chosen is 3×3.\nThe new raster, which is a result of the application of the algorithm,\nis used to get an average RAO value for the whole raster.\n\n``` r\ncoherence(out_2D_3D, w=3)\n```\n\n``` r\n## Progress metrics:  1 / 1\n## Progress metrics:  1 / 1\n##  sa2D  sa3D sa2Dw sa3Dw \n## 3.806 3.503 2.413 2.118 \n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/sa.jpg\" alt=\"Figure 7: SA\" width=\"75%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure7\"\u003e\u003c/span\u003eFigure 7: SA\n\u003c/p\u003e\n\n``` r\ncoherence(out_2D_3D, w=3, metric=\"sku\")\n```\n\n``` r\n## Progress metrics:  1 / 1\n## Progress metrics:  1 / 1\n## sku2D  sku3D sku2Dw sku3Dw \n## 0.347  1.138 -0.536 -0.374 \n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/sku.jpg\" alt=\"Figure 8: SKU\" width=\"75%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure8\"\u003e\u003c/span\u003eFigure 8: SKU\n\u003c/p\u003e\n\n``` r\ncoherence(out_2D_3D, w=3, metric=\"rao\")\n```\n\n``` r\n## 2D RAO\n## \n## \n## Processing alpha: 1 Moving Window: 3\n## \n## \n## Processing alpha: 1 Moving Window: 3\n## \n## [============================\u003e----------------]  64% in  0s\n## [============================\u003e----------------]  65% in  0s\n## [=============================\u003e---------------]  66% in  0s\n## [=============================\u003e---------------]  67% in  0s\n## [==============================\u003e--------------]  69% in  0s\n## [==============================\u003e--------------]  70% in  0s\n## [===============================\u003e-------------]  71% in  0s\n## [================================\u003e------------]  72% in  0s\n## [================================\u003e------------]  73% in  0s\n## [=================================\u003e-----------]  75% in  0s\n## [=================================\u003e-----------]  76% in  0s\n## [==================================\u003e----------]  77% in  0s\n## [==================================\u003e----------]  78% in  0s\n## [===================================\u003e---------]  80% in  0s\n## [===================================\u003e---------]  81% in  0s\n## [====================================\u003e--------]  82% in  0s\n## [====================================\u003e--------]  83% in  0s\n## [=====================================\u003e-------]  84% in  0s\n## [=====================================\u003e-------]  86% in  0s\n## [======================================\u003e------]  87% in  0s\n## [=======================================\u003e-----]  88% in  0s\n## [=======================================\u003e-----]  89% in  0s\n## [========================================\u003e----]  90% in  0s\n## [========================================\u003e----]  92% in  0s\n## [=========================================\u003e---]  93% in  0s\n## [=========================================\u003e---]  94% in  0s\n## [==========================================\u003e--]  95% in  0s\n## [==========================================\u003e--]  96% in  0s\n## [===========================================\u003e-]  98% in  0s\n## [===========================================\u003e-]  99% in  0s\n## [=============================================] 100% in  0s\n## \n## 3D RAO\n## \n## \n## Processing alpha: 1 Moving Window: 3\n## \n## \n## Processing alpha: 1 Moving Window: 3\n## \n## [=============================\u003e---------------]  67% in  0s\n## [==============================\u003e--------------]  69% in  0s\n## [==============================\u003e--------------]  70% in  0s\n## [===============================\u003e-------------]  71% in  0s\n## [================================\u003e------------]  72% in  0s\n## [================================\u003e------------]  73% in  0s\n## [=================================\u003e-----------]  75% in  0s\n## [=================================\u003e-----------]  76% in  0s\n## [==================================\u003e----------]  77% in  0s\n## [==================================\u003e----------]  78% in  0s\n## [===================================\u003e---------]  80% in  0s\n## [===================================\u003e---------]  81% in  0s\n## [====================================\u003e--------]  82% in  0s\n## [====================================\u003e--------]  83% in  0s\n## [=====================================\u003e-------]  84% in  0s\n## [=====================================\u003e-------]  86% in  0s\n## [======================================\u003e------]  87% in  0s\n## [=======================================\u003e-----]  88% in  0s\n## [=======================================\u003e-----]  89% in  0s\n## [========================================\u003e----]  90% in  0s\n## [========================================\u003e----]  92% in  0s\n## [=========================================\u003e---]  93% in  0s\n## [=========================================\u003e---]  94% in  0s\n## [==========================================\u003e--]  95% in  0s\n## [==========================================\u003e--]  96% in  0s\n## [===========================================\u003e-]  98% in  0s\n## [===========================================\u003e-]  99% in  0s\n## [=============================================] 100% in  0s\n## \n## $rao2D.mean\n## [1] 1.872\n## \n## $rao3D.mean\n## [1] 1.709\n## \n## Warning messages:\n## 1: In rasterdiv::paRao(x = raster_data_2D, window = w, na.tolerance = 1,  :\n##   Simplify=0. Rounding data to 0 decimal places.\n## 2: In rasterdiv::paRao(x = raster_data_2D, window = w, na.tolerance = 1,  :\n##   Input data are float numbers. Converting data to integer matrices.\n## 3: In rasterdiv::paRao(x = raster_data_3D, window = w, na.tolerance = 1,  :\n##   Simplify=0. Rounding data to 0 decimal places.\n## 4: In rasterdiv::paRao(x = raster_data_3D, window = w, na.tolerance = 1,  :\n##   Input data are float numbers. Converting data to integer matrices.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"man/figures/rao.jpg\" alt=\"Figure 9: RAO\" width=\"75%\" /\u003e\n\u003c/p\u003e\n\u003cp class=\"caption\" align=\"center\"\u003e\n\u003cspan id=\"fig-Figure9\"\u003e\u003c/span\u003eFigure 9: RAO\n\u003c/p\u003e\n\n## 9 **References**\n\nDoxa, Aggeliki, Vasiliki Almpanidou, Stelios Katsanevakis, Ana M\nQueirós, Kristin Kaschner, Cristina Garilao, Kathleen Kesner-Reyes, and\nAntonios D Mazaris. 2022. “\u003cspan class=\"nocase\" id=\"ref-doxa20224d\"\u003e4D marine\nconservation networks: Combining 3D prioritization of present and future\nbiodiversity with climatic refugia\u003c/span\u003e.\n” *Global Change Biology* 28 (15): 4577–88. https://doi.org/10.1111/gcb.16268\n\nHanson, Jeffrey O, Richard Schuster, Nina Morrell, Matthew\nStrimas-Mackey, Brandon P M Edwards, Matthew E Watts, Peter Arcese,\nJoseph Bennett, and Hugh P Possingham. 2024.\n*\u003cspan class=\"nocase\" id=\"ref-prioritizr\"\u003eprioritizr: Systematic Conservation\nPrioritization in R\u003c/span\u003e*. https://prioritizr.net\n\nRocchini, Duccio, Matteo Marcantonio, Daniele Da Re, Giovanni Bacaro,\nEnrico Feoli, Giles Foody, Reinhard Furrer, et al. 2021.\n“\u003cspan class=\"nocase\" id = \"ref-rasterdivpaper\"\u003eFrom zero to infinity: Minimum \nto maximum diversity of the planet by spatio-parametric Rao’s quadratic\nentropy\u003c/span\u003e.” *Global Ecology and Biogeography* 30 (5): 2315.\nhttps://doi.org/10.1111/geb.13270\n\nRocchini, Duccio, Elisa Thouverai, Matteo Marcantonio, Martina\nIannacito, Daniele Da Re, Michele Torresani, Giovanni Bacaro, et al.\n2021. “\u003cspan class=\"nocase\" id = \"ref-rasterdiv\"\u003e\nrasterdiv - An Information Theory tailored R package for measuring ecosystem\nheterogeneity from space: To the origin and back\u003c/span\u003e.” *Methods in Ecology\nand Evolution* 12 (6): 2195. https://doi.org/10.1111/2041-210X.13583\n\nSmith, Annie C., Phoebe Zarnetske, Kyla Dahlin, Adam Wilson, and Andrew\nLatimer. 2023. \u003cspan class=\"nocase\" id = \"ref-geodiv\"\u003e\u003c/span\u003e*Geodiv: Methods\nfor Calculating Gradient Surface Metrics*.\nhttps://doi.org/10.32614/CRAN.package.geodiv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadam00%2Fprior3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadam00%2Fprior3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadam00%2Fprior3d/lists"}