knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(intercali)

Extract map with desired densities

This function allows, from a density map density_obj (density object of the dsims packages), to provide a map of class sf (data.frame).
It allows to recalculate the correct density ratios of the provided map according to the desired number of individuals in the area N.

Example

An example of this function use a dataset of density dataset_density created thanks to the package dsims.

From this density object, the aim is to create a map with the correct densities. Here a density corresponding to 500 individuals in the study area.

data(dataset_density)

map <- extract_map(density_obj = dataset_density,
                   N = 500,
                   crs = 2154)


head(map)

Plot map

This fonction allows to plot the map created with the extract_map function. It is nessary to use the map_obj, a sf dataframe, contaning at least, a column density_km. The title and the legend can be personnalized.

Example

An example of this function use a dataset of density dataset_density created thanks to the package dsims.

From this density object, a map is created thanks to the extract_map function. Then the function plot_map allows to plot the map with the correct densities.

data(dataset_density)

map <- extract_map(density_obj = dataset_density,
                   N = 500,
                   crs = 2154)

plot_map(map_obj = map)


maudqueroue/intercali documentation built on Oct. 8, 2022, 2:09 p.m.