{"id":46055,"name":"ENMwizard","description":"Advanced Techniques for Ecological Niche Modeling Made Easy.","url":"https://github.com/HemingNM/ENMwizard","last_synced_at":"2026-05-31T17:00:42.655Z","repository":{"id":43778597,"uuid":"104896526","full_name":"HemingNM/ENMwizard","owner":"HemingNM","description":"Advanced Techniques for Ecological Niche Modeling Made Easy","archived":false,"fork":false,"pushed_at":"2023-12-27T14:28:46.000Z","size":712,"stargazers_count":16,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-05-29T16:03:16.647Z","etag":null,"topics":["enmeval","maxent-models","niche-modeling","rasters","species","tunning"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HemingNM.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-26T14:36:50.000Z","updated_at":"2025-12-15T11:55:30.000Z","dependencies_parsed_at":"2024-01-13T07:00:13.148Z","dependency_job_id":"5742277e-ab50-4f37-942a-d83e016761e9","html_url":"https://github.com/HemingNM/ENMwizard","commit_stats":{"total_commits":500,"total_committers":3,"mean_commits":"166.66666666666666","dds":"0.028000000000000025","last_synced_commit":"0d9813d73bc5cb1c32d022224febe3cf4b2f7563"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HemingNM/ENMwizard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HemingNM","download_url":"https://codeload.github.com/HemingNM/ENMwizard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33739861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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"}},"owner":{"login":"HemingNM","name":"Neander Marcel Heming","uuid":"31964343","kind":"user","description":"Biologist that need some programming for data analysis.","email":"","website":null,"location":"Brazil","twitter":null,"company":"@Universidade Estadual de Santa Cruz","icon_url":"https://avatars.githubusercontent.com/u/31964343?u=c0dc903f58afbdb20776e23665899eccf073381b\u0026v=4","repositories_count":2,"last_synced_at":"2023-03-06T02:47:26.721Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/HemingNM","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-16T03:20:03.396Z","updated_at":"2023-03-06T02:47:26.728Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HemingNM","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HemingNM/repositories"},"packages":[],"commits":{"id":1358721,"full_name":"HemingNM/ENMwizard","default_branch":"master","total_commits":500,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":250.0,"dds":0.026000000000000023,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-05-29T17:21:29.915Z","last_synced_commit":"0d9813d73bc5cb1c32d022224febe3cf4b2f7563","created_at":"2023-09-13T08:45:12.162Z","updated_at":"2026-05-29T17:21:29.893Z","committers":[{"name":"HemingNM","email":"neanderh@yahoo.com.br","login":"HemingNM","count":487},{"name":"csdambros","email":"cristian.dambros@ufsm.br","login":"csdambros","count":13}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-31T00:00:10.607Z","repositories_count":6251618,"commits_count":883899898,"contributors_count":35023548,"owners_count":1161577,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"HemingNM/ENMwizard","html_url":"https://github.com/HemingNM/ENMwizard","last_synced_at":"2026-02-14T13:00:26.340Z","status":"error","issues_count":11,"pull_requests_count":0,"avg_time_to_close_issue":2886359.6,"avg_time_to_close_pull_request":null,"issues_closed_count":10,"pull_requests_closed_count":0,"pull_request_authors_count":0,"issue_authors_count":5,"avg_comments_per_issue":4.636363636363637,"avg_comments_per_pull_request":null,"merged_pull_requests_count":0,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-09-13T08:46:09.963Z","updated_at":"2026-02-14T13:00:26.340Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/HemingNM%2FENMwizard/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":11},"pull_request_author_associations_count":{},"issue_authors":{"jorisbertrand":4,"willright28":3,"chenyongpeng1":2,"xunuan2020":1,"futurefanzhang":1},"pull_request_authors":{},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-17T00:00:41.354Z","repositories_count":14626361,"issues_count":34189132,"pull_requests_count":111866994,"authors_count":11264713,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[],"active_maintainers":[]},"events":{"total":{"WatchEvent":2,"ForkEvent":1},"last_year":{}},"keywords":["enmeval","maxent-models","niche-modeling","rasters","species","tunning"],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-09-23T08:53:21.308Z","updated_at":"2022-09-23T08:53:21.308Z","repository_link":"https://github.com/HemingNM/ENMwizard/blob/master/DESCRIPTION","dependencies":[{"id":5943811435,"package_name":"alphahull","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811436,"package_name":"apcluster","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811437,"package_name":"data.table","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811438,"package_name":"dismo","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811439,"package_name":"ENMeval","ecosystem":"cran","requirements":"\u003e= 0.3.0","direct":true,"kind":"imports","optional":false},{"id":5943811440,"package_name":"fields","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811441,"package_name":"graphics","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811442,"package_name":"grDevices","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811443,"package_name":"igraph","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811444,"package_name":"methods","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811445,"package_name":"NbClust","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811446,"package_name":"parallel","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811447,"package_name":"plotrix","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811448,"package_name":"raster","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811449,"package_name":"rgeos","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811450,"package_name":"sp","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811451,"package_name":"spThin","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811452,"package_name":"stats","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811453,"package_name":"utils","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5943811454,"package_name":"devtools","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5943811455,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5943811456,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5943811457,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":3.5263605246161616,"created_at":"2023-09-13T08:45:10.903Z","updated_at":"2026-05-31T17:00:42.658Z","avatar_url":"https://github.com/HemingNM.png","language":"R","category":"Biosphere","sub_category":"Species Distribution Modeling","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"ENMwizard\n======================\n### Advanced Tecniques for Ecological Niche Modeling Made Easy\n\nThis package provides tools to facilitate the use of advanced techniques related to ecological niche modeling (ENM) and the automation of the workflow for modeling multiple species. ENMwizard allows easier: 1. preparation of occurrence and environmental data (selection of environmental variables, selection of calibration and projection areas); 2. model tunning (thanks to the package ENMeval); 3. model selection and projection. Computationally intensive tasks can be performed using a single or multiple cores to speed up processing. ENMwizard also implements AICc Model Averaging for MaxEnt models (Gutierrez \u0026 Heming, 2018, https://arxiv.org/abs/1807.04346).\n\n-----\n\n# Installation\nENMwizard is downloadable from https://github.com/HemingNM/ENMwizard. You can download it using devtools to install from GitHub.\n\n## Install from GitHub using devtools\nRun the following code from your R console:\n\n```r\ninstall.packages(\"devtools\")\ndevtools::install_github(\"HemingNM/ENMwizard\")\n\nlibrary(ENMwizard)\n```\n\n## Notice that ENMwizard is not compatible with ENMeval 2.0. \nSorry for that. I am working to make it compatible with the newest version soon\n\n## Citation\nPlease cite ENMwizard (and other R packages it depends on) by using:\n\n```r\ncitation(\"ENMwizard\")\ncitation(\"spThin\")\ncitation(\"ENMeval\")\ncitation(\"raster\")\n```\n\n\n-----\n\n# Steps for niche modeling using ENMwizard\n\n## Prepare environmental data\n\n### Load occurrence data\n\nFirst, lets use occ data available in dismo package.\n```r\nBvarieg.occ \u003c- read.table(paste(system.file(package=\"dismo\"),\n\"/ex/bradypus.csv\", sep=\"\"), header=TRUE, sep=\",\")\n\nhead(Bvarieg.occ) # Check first rows\n\n```\n\nNow we make it a named list, where names correspond to species names.\n```r\nspp.occ.list \u003c- list(Bvarieg = Bvarieg.occ)\n```\n\n### Create occ polygon to crop rasters prior to modelling\n\nThe occurrence points in the named list are used to create polygons. \nNotice that you can cluster the occ points using several clustering methods. \nSee differences and choose one that fits your needs:\n```r\nocc.polys \u003c- set_calibarea_b(spp.occ.list)\nocc.polys \u003c- set_calibarea_b(spp.occ.list, k=0, c.m=\"AP\", q=.01) # less polygons\nocc.polys \u003c- set_calibarea_b(spp.occ.list, k=0, c.m=\"AP\", q=.3)\nocc.polys \u003c- set_calibarea_b(spp.occ.list, k=0, c.m=\"AP\", q=.8) # more polygons\nocc.polys \u003c- set_calibarea_b(spp.occ.list, k=0, c.m=\"NB\", method = \"centroid\", index = \"duda\")\nocc.polys \u003c- set_calibarea_b(spp.occ.list, k=0, c.m=\"NB\", method = \"centroid\", index = \"sdindex\") \n\n```\n\n### Create buffer\n\n... and the occurrence polygons are buffered using 1.5 degrees.\n```r\nocc.b \u003c- buffer_b(occ.polys, width = 1.5)\n```\n\n### Get and cut enviromental layers\nGet climate data for historical (near current) conditions.\nIn this example, a directory called 'rasters' is created. Then, rasters from historical (near current) are downloaded.\n```r\n# Create directory to store raster files\ndir.create(\"./rasters\")\n\n# Download data for present\nlibrary(raster)\npredictors \u003c- getData('worldclim', var='bio', res=10, path=\"rasters\")\n```\n\nCut environmental variables for each species (and plot them for visual inspection).\n```r\npred.cut \u003c- cut_calibarea_b(occ.b, predictors)\n\nfor(i in 1:length(pred.cut)){\n  plot(pred.cut[[i]][[1]])\n  plot(occ.polys[[i]], border = \"red\", add = T)\n  plot(occ.b[[i]], add = T)\n}\n```\n\n### Select the least correlated variables\n```r\nvars \u003c- select_vars_b(pred.cut, cutoff=.75, names.only = T)\n# See selected variables for each species\nlapply(vars, function(x)x[[1]])\n# remove correlated variables from our variable set\npred.cut \u003c- select_vars_b(pred.cut, cutoff=.75, names.only = F)\n```\n\n\n## Prepare occurrence data\n### Filter original dataset\nNow we want to remove localities that are too close apart. We will do it for all species listed in \"spp.occ.list\".\n```r\nthinned.dataset.batch \u003c- thin_b(loc.data.lst = spp.occ.list)\n```\n\n### Load occurrence data (filtered localities)\nAfter thinning, we choose one dataset for each species for modelling.\n```r\nocc.locs \u003c- load_thin_occ(thinned.dataset.batch)\n```\n\n## Great! Now we are ready for tunning species' ENMs\n\n-----\n## Tunning Maxent's feature classes and regularization multiplier via ENMeval\n### Model tuning using ENMeval\nHere we will run ENMevaluate_b to call ENMevaluate (from ENMeval package). Here we will test which combination of Feature Classes and Regularization Multipliers give the best results. For this, we will partition our occurrence data using the \"block\" method.\n\nBy providing [at least] two lists, occurrence and environmental data, we will be able to evaluate ENMs for as many species as listed in our occ.locs object. For details see ?ENMeval::ENMevaluate. Notice that you can use multiple cores for this task. This is specially usefull when there are a large number of models and species.\n```r\nENMeval.res.lst \u003c- ENMevaluate_b(occ.locs, pred.cut, \n                    RMvalues = c(1, 1.5), fc = c(\"L\", \"LQ\", \"LP\"),\n                    method=\"block\", algorithm=\"maxent.jar\")\n```\n\n-----\n## Model fitting (calibration)\nAfter tuning MaxEnt models, we will calibrate them using all occurrence data (i.e. without partition them).\n\n```r\n# Run model\nmxnt.mdls.preds.lst \u003c- calib_mdl_b(ENMeval.o.l = ENMeval.res.lst, \n                                    a.calib.l = pred.cut,\n                                    mSel = c(\"LowAIC\", \"AUC\"))\n```\n\n##  Projection\n### Prepare projecion area\n#### Download environmental data\nFor projection it is necessary to download raster files with the environmental variables of interest. Rasters with historical (near current) climatic conditions was already created. We will download data of climatic conditions for two future (2050 and 2070) scenarios and create one list with all three climate scenarios.\n\n```r\nlibrary(raster)\n# Get climate data for future conditions (2050) from two GCMs at RCP 8.5\nfutAC5085 \u003c- getData('CMIP5', var='bio', res=10, rcp=85, model='AC', year=50, path=\"rasters\")\nnames(futAC5085) \u003c- names(predictors)\n\nfutCC5085 \u003c- getData('CMIP5', var='bio', res=10, rcp=85, model='CC', year=50, path=\"rasters\")\nnames(futCC5085) \u003c- names(predictors)\n\n# Get climate data for future conditions (2070) from two GCMs at RCP 8.5\nfutAC7085 \u003c- getData('CMIP5', var='bio', res=10, rcp=85, model='AC', year=70, path=\"rasters\")\nnames(futAC7085) \u003c- names(predictors)\n\nfutCC7085 \u003c- getData('CMIP5', var='bio', res=10, rcp=85, model='CC', year=70, path=\"rasters\")\nnames(futCC7085) \u003c- names(predictors)\n\npredictors.l \u003c- list(ncurrent = predictors,\n                futAC5085 = futAC5085,\n                futCC5085 = futCC5085,\n                futAC7085 = futAC7085,\n                futCC7085 = futCC7085)\n\n```\n\n#### Select area for projection based on the extent of occ points\nNow it is time to define the projection area for each species. The projection area can be the same for all species (in this example) of be defined individually. Here, the projection area will be defined as an square area slightly larger than the original occurrence of the species. Then, a two lists with models will be created for a species. In the first list, the projection will be performed using current climatic conditions. In the second list, two cenarios of futurure climate (defined above) are created.\n\n```r\npoly.projection \u003c- set_projarea_b(occ.polys, mult = .1, buffer=FALSE)#\nplot(poly.projection[[1]], col=\"gray\")\nplot(occ.polys[[1]], col=\"yellow\", add=T)\n\npred.cut.l \u003c- cut_projarea_mscn_b(poly.projection, predictors.l)\nplot(poly.projection[[1]], col=\"gray\")\nplot(pred.cut.l[[1]][[1]][[1]], add=T)\nplot(occ.polys[[1]], add=T)\n```\n\n#### ... if the extent to project is the same for all species\nWhen all species are to be projected using the same current and future climates and in the same region, then the following lines can be used to repeat the same lists of cenarios for all species (could be defined differently for each species if wanted).\n\n```r\nproj.extent \u003c- extent(c(-109.5, -26.2, -59.5, 18.1))\n# coerce to a SpatialPolygons object\nproj.extent \u003c- as(proj.extent, 'SpatialPolygons') \npred.cut.l \u003c- cut_projarea_rst_mscn_b(proj.extent, predictors.l, occ.polys)\n```\n\n### Model projections\n\nFinally, the model(s) can be projected on all climatic cenarios. This is performed by `the proj_mdl_b` function. The function has two arguments: 1) MaxEnt fitted models (see step 4.3 above) and 2) list of rasters representing all cenarios onto which models will be projected.\nThis function can be run using a single core (default) or multiple cores available in a computer. There two ways of performing parallel processing: by species or by model. If the distribution of few species is being modelled, and models are computationally intensive, then processing by model will provide best results. If there are many species, probably parallel processing by species (split species across the multiple cores of a computer) will be faster.\n\n```r\n# For single or multiple species\n\n# using a single core (default)\nmxnt.mdls.preds.cf \u003c- proj_mdl_b(mxnt.mdls.preds.lst, a.proj.l = pred.cut.l)\n\n# or using multiple cores\nmxnt.mdls.preds.cf \u003c- proj_mdl_b(mxnt.mdls.preds.lst, a.proj.l = pred.cut.l, numCores=2)\n\n# plot projections\npar(mfrow=c(1,2), mar=c(1,2,1,2))\nplot(mxnt.mdls.preds.cf$Bvarieg$mxnt.preds$ncurrent)\nplot(mxnt.mdls.preds.cf$Bvarieg$mxnt.preds$futAC5085)\n```\n### Create consensual projections across GCMs by (e.g.) year and/or RCP\nThe climate scenario projections can be grouped and averaged to create consensual projections.\nHere we downloaded two GCMs for 2050 and two for 2070, both at RCP 8.5. So, the GCMs will\nbe averaged by year.\n```r\n# create two vectors containing grouping codes\nyr \u003c- c(50, 70)\nrcp \u003c- c(\"45\", \"85\")\ngroups \u003c- list(yr, rcp)\n\n# get names we gave to the predictors\nclim.scn.nms \u003c- names(predictors.l)\nconsensus_gr(groups, clim.scn.nms)\n\n## here we do compute the consensual projections\nmxnt.mdls.preds.cf \u003c- consensus_scn_b(mcmp.l=mxnt.mdls.preds.cf, groups = list(yr, rcp), ref=\"ncurrent\")\n\n\n####\n## just in case you have multiple GCMs by year and RCP, this is an example \n## that return more groups\n\n# grouping codes\nyr \u003c- c(2050, 2070)\nrcp \u003c- c(\"RCP45\", \"RCP85\")\ngroups \u003c- list(yr, rcp)\n\n# names of climate scenarios\nclim.scn.nms \u003c- c(\"CCSM4.2050.RCP45\",  \"MIROC.ESM.2050.RCP45\", \"MPI.ESM.LR.2050.RCP45\",\n                  \"CCSM4.2070.RCP45\",  \"MIROC.ESM.2070.RCP45\", \"MPI.ESM.LR.2070.RCP45\",\n                  \"CCSM4.2050.RCP85\",  \"MIROC.ESM.2050.RCP85\", \"MPI.ESM.LR.2050.RCP85\",\n                  \"CCSM4.2070.RCP85\",  \"MIROC.ESM.2070.RCP85\", \"MPI.ESM.LR.2070.RCP85\")\nconsensus_gr(groups, clim.scn.nms)\n\n\n```\n\n### Apply thresholds on suitability projections\nWe have the projections for each climatic scenario, now we must select one (or more) threshold criteria and apply on the projections.\n```r\n# 1. Fixed.cumulative.value.1 (fcv1);\n# 2. Fixed.cumulative.value.5 (fcv5);\n# 3. Fixed.cumulative.value.10 (fcv10);\n# 4. Minimum.training.presence (mtp);\n# 5. 10.percentile.training.presence (x10ptp);\n# 6. Equal.training.sensitivity.and.specificity (etss);\n# 7. Maximum.training.sensitivity.plus.specificity (mtss);\n# 8. Balance.training.omission.predicted.area.and.threshold.value (bto);\n# 9. Equate.entropy.of.thresholded.and.original.distributions (eetd).\n\nmods.thrshld.lst \u003c- thrshld_b(mxnt.mdls.preds.cf, thrshld.i = c(5,7))\n```\n\n### Identify range shifts\nRange shifts are differences in suitable areas between climate scenarios. \nHere we will map where the range has shifted and compute unchanged, lost, and gained areas.\n```r\nspp_rdiff \u003c- range_shift_b(mods.thrshld.lst, ref.scn = \"ncurrent\")\n\n# plot maps of range change\nbreaks \u003c- round(seq(from=-1, to=1, .666), 2)\ncolors \u003c- colorRampPalette(c(\"red\", \"gray\", \"blue\"))(length(breaks)-1)\nplot(spp_rdiff[[1]][[1]][[1]], col=colors, breaks=breaks)\n\n# area of range changes\nspp_rdiff_a \u003c- get_rsa_b(spp_rdiff)\nspp_rdiff_a\n```\n\n## Visualize\n### Plot one projection for current climate and another for a future climatic scenario\n```r\nplot(mods.thrshld.lst$Bvarieg$ncurrent$binary$x10ptp)\nplot(mods.thrshld.lst$Bvarieg$X50.85$binary$x10ptp)\nplot_mdl_diff(mxnt.mdls.preds.lst[[1]], mods.thrshld.lst[[1]], sp.nm = \"Bvarieg\")\nplot_mdl_diff_b(mxnt.mdls.preds.cf, mods.thrshld.lst, save=T)\n```\n\n### Plot differences between current climate and future climatic scenarios for all thresholds\n```r\nplot_scn_diff_b(mxnt.mdls.preds.cf, mods.thrshld.lst, \n              ref.scn = \"ncurrent\", mSel = \"LowAIC\", save=F)\n```\n\n\n## Compute metrics\n### Compute variable contribution and permutation importance\n```r\nget_cont_permimport_b(mxnt.mdls.preds.cf)\n```\n### Compute \"Fractional Predicted Area\" ('n of occupied pixels'/n)\n```r\nget_fpa_b(mods.thrshld.lst)\n```\n### Compute species' total suitable area\n```r\nget_tsa_b(mods.thrshld.lst)\n```\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/46055","html_url":"https://ost.ecosyste.ms/projects/46055"}