tabulMam: Build report-ready table with all known mammal occurrences...

View source: R/tabulMam.R

tabulMamR Documentation

Build report-ready table with all known mammal occurrences for a region of interest.

Description

The tabulMam function will create a reference table (Excel file) considering all mammal species occurring in a region, joining all relevant information (taxonomic, conservation, occurrence status and legal framework). It will also (in the future) summarize region status (ratios for protected and threatened species).

Usage

tabulMam(
  utm_ae = utm_ae,
  utm_q = utm_contig,
  fielddata = NULL,
  marinhos = FALSE,
  atlas = "all",
  dhab = dh13_18,
  inat = NULL
)

Arguments

utm_ae

character. vector of utm grid cells touching roi.

utm_q

character. vector of utm grid cells around roi

fielddata

dataframe. Table with bid data obtained for the roi. Typically a table with species utm reference.

marinhos

Logical. False (default) exclude marine mammals. To include change to TRUE.

atlas

character. Mammal and Bat Atlas data with references to the UTM 10x10 grid cell.

dhab

character. Use Habitat Direective data from 2013-2018 report published by ICNF.

inat

character. Use Inaturalist Dataset for 2018 and 2019 with thousands of entries available on iNaturalist database from 2018 and 2019.

ae

sf object. any spatial (sp, spatialdataframe) or coordinates vector indicating a region of interest.

Details

ensure that field dataset follow the standardized formatting.

Value

an Excel file with a complete and pre-formatted table, (almost) ready for use on EIA reports.

Author(s)

Paulo E. Cardoso

Examples

## Not run: 
# read roi from shapefile
ae <- sf::read_sf(here::here("sig", "ae_buffer250m.shp"),
  stringsAsFactors = F
) %>%
  st_set_crs(3763)
# Cast multipolygon geometry to single parts
aeu <- st_cast(ae, "POLYGON")
# Add an UID to each
aeu$id <- c(1:2)
# get UTM codes for your roi
utm_all <- utm_id(grid = utm10k, roi = aeu %>% filter(id == 2), buff = NULL, contiguity = "queen")
# tabulate species occurence and status in the area
tmam <- tabulEIA::tabulMam(utm_ae = utm_ae, utm_q = utm_contig, fielddata = NULL, atlas = "all", inat = FALSE)
# export to csv
write_excel_csv(tmam, path = here::here("output", "tab_mammals.csv"))

## End(Not run)

pecard/tabuleia documentation built on June 16, 2022, 3:32 a.m.