Description Usage Arguments Details Value Examples
Pass IUCN habitat classification preferences, and habitat classification matrix, and the function will return a dataframe that contains information whether the specific habitat is suitable or unsuitable. Currently the function is intended for use in the amphibians project, and some options that a general user might want to change are hardcoded.
1 | get_habitat_suitability(species_habitat, conversion_matrix, species_name)
|
species_habitat |
Test. |
conversion_matrix |
Test. |
species_name |
Test. |
Use rredlist::rl_habitats()
function to retrieve species habitat preference data. Currently only
IUCN -> ESA CCI land cover conversion matrix is supported.
dataframe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | None.
library(rredlist)
library(Rahat)
library(tidyverse)
habitat_conversion_matrix <- "Projects/Amphibians/Documents/Notes/Habitat_suitability/Habitats_conversion.csv" %>%
milkunize2() %>%
read_csv() %>%
mutate(IUCN_code = as.character(IUCN))
my_sp <- "Salamandra salamandra"
# Get IUCN species habitat data preferences
# Originally stored in individual csv's, here everything is stored in one rds file
species_habitat_data <- "Projects/Amphibians/data/IUCN_habitat_data/Species_habitat_data.rds" %>%
milkunize2() %>%
read_rds()
sp_data <- species_habitat_data %>%
filter(Species == my_sp)
habitat_data <- rl_habitats(my_sp)$results
get_habitat_suitability(species_habitat = sp_data,
conversion_matrix = habitat_conversion_matrix, species_name = my_sp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.