class: center, middle, inverse, title-slide # Model-R ## and related projects ### Andrea Sánchez-Tapia, Diogo SB Rocha, Sara Mortara, Marinez Ferreira de Siqueira ### 2019-02-13 --- class: middle # Model-R + Three-step workflow wrapping around functions in __dismo__ package. + Started in Oct 2013 to execute niche modeling for species from the Brazilian Atlantic Forest - now published. + Added an initial `shiny` app in 2014/2015 (Rafael Oliveira JBRJ) + Turned into `R` package in 2015 (Guilherme Gall - LNCC) + Added more members to the team: Diogo SB Rocha (2017), Sara Mortara (2019) --- ## Setup the data Functions `setupsdmdata()` and `createbuffer()`: + Data partitioning (crossvalidation or bootstrap, once or multiple times) + Cleaning (removes NA and duplicates) + Buffer to restrain pseudoabsence selection (mean, max or median distance between occurrences + absolute distance) + Exclusion buffer to select from a minimum distance + Geographic filtering (a spatial grid as in Varela et al 2015 but we aim to use package __spThin__) + Environmental filters on the way: a bioclim\* boundary to exclude pseudoabsences too close from the occurrences .footnote[[*] ideally a distance approach] --- ## Fit the models: Functions `do_any()` and `do_enm()`: + `do_any` fits one model per algorithm with parameter `algo = "maxent"` + `do_enm` calls `do_any` to fit multiple algorithms (`bioclim = T, maxent = T` as in BIOMOD2) A nested approach: `createbuffer()` is called by `setupsdmdata()` `setupsdmdata()` is called by `do_any()` `do_any()` is called by `do_enm()` __So the whole model setup and fitting can be executed through a single `do_enm()` call.__ --- class: bottom, right background-image: url(figs/final_model_english.png) background-size: contain ##Select and join the partitions __(one per species per algorithm)__ --- ##Create the ensemble models __(multi-algorithm consensus)__ + Joins the final models of the models created in step 2: + One or several algorithms + Joins one or several of the models created in step 2 (`which.models` can be `raw_mean`, or `c(raw_mean, bin_consensus)`,for example) + Can calculate a mean, standard deviation, median + If `consensus = T` can cut the mean ensemble by a threshold (0.5 -> 50% of the algorithms) --- # Supplementary options + Projection into other sets of environmental variables + Final and ensemble for the projected results were implemented + Current work: + A possibility to shorten the workflow into two steps (1. fitting and 2. joining, with the option to omit the single-algorithm part) is being discussed (Diogo) + Adapting the `shiny` app into the package + Writing or improving the functionalities + __Making them work with the rest of the `R` ecosystem__ --- class: inverse, middle, center # Projects 1 and 2 ## Unraveling geographic and climatic patterns in the Neotropics: A study case with tribe _Bignonieae_ (Bignoniaceae) ## _Bignonieae_ (Bignoniaceae) in the Atlantic Forest: endemism and disjunction patterns ### Juan Pablo Narváez-Gómez<sup>\*</sup> Andrea Sánchez-Tapia, Marinez Ferreira de Siqueira, Lúcia G. Lohmann<sup>\*</sup> .footnote[[*]Universidade de São Paulo] --- background-image: url(/Users/Sanchez/Documents/1\ Artículos/Bignonieae/output/biomas/biomas\ e\ posicao\ filogenetica.png) background-size: contain --- class: inverse, middle, center # Projects 3 (and 4) ## Past isolation of the Brazilian high-altitude grasslands through paleodistribution models ## Tracking treeline changes in the Brazilian high-altitude grasslands ### Andrea Sánchez-Tapia, Marinez Ferreira de Siqueira, (Andrew Townsend Peterson) --- # High-altitude grasslands + No comprehensive species lists but: + A preliminary list by Safford and Martinelli (never published, needs revision + vouchers) + SpeciesLink + rgbif + Few publications in these areas - many indets. + Flora do Brasil appears to overestimate the richness (3000 spp. in 350km2), most probably due to problems in the definition of the _campos de altitude_ (some authors mix rupestrian grasslands and tepui formations in the Amazon) We could clean Safford and Martinelli's list or perform a search Remote sensing/shapefiles available: + Problem: small areas - LANDSAT resolution may not fit + Recently: Rapid-eye classification by FBDS (contact: Camila Rezende) + good: high resolution - we could get a _very good_ shapefile. + bad: no time series + __but__ it could lead the searches in other remote imaging systems/satellites (SPOT?) --- evet balık sağlıktır!