NicheToolBox first stage functions

In this tutorial I am going to show how to use the first stage functions of nichetoolbox. The work was done for GSOC 2016.

Summary

The first stage functions deals with obtaining biodiversity data and data curation.

Installation

Go to the github repo of the project nichetoolbox repo.

Then copy and run the installation instructions on R:

if (!require('devtools')) install.packages('devtools')
devtools::install_github('luismurao/nichetoolbox')

Launching the app

library(nichetoolbox)
run_nichetoolbox()

First look

The AppSettings section

In this section you need to specify the folder that contains the niche layers that you are going to use for the modeling process. Likewise the folder where you are going to save your workflow.

Loading niche layers

On the left panel go to Niche layers section and select the folder where your niche raster layers are. Remeber that they need to have the same extent and resolution (all raster formats are accepted: .asc, .bil, .sdat, .rst, .nc, .tif, .envi, .img).

Press the Load niche layers button and wait. You will find a plot showing one of the layers contained in the folder

Workflow

To get track of the things that you have done in NicheToolBoox, you need to specify the folder where you want to save your analysis, data, maps etc. Go to Workflow section and select the folder.

The Data section

Now we are ready to work on NicheToolBoox. First we need some latitude and longitude records of the species that we want to model. NicheToolBoox can work with two source of longitude an latitude data: a) the one corresponds to GBIF records, you can search and clean GBIF records, b) you can upload and clean your occurrence data from a local file.

Seaching GBIF records

Go to Data -> GBIF data, then in the form enter species genus, species name and specify the number of records that you want to search (occ search limit). Press Search GBIF button and wait. If the species is on GBIF a data table will be displayed, if the species is not in GBIF, it will display the following menssage: No ocurrences found

In our case we searched the species Ambystoma tigrinum which generated 480 records.

Curation of GBIF records

You can remove duplicated records using a threshold distance in grades (the default is 0). For our Ambystoma tigrinum there are 480 records but once I pressed the button Clean duplicates I got 154 so there were 326 duplicated records!!!

Clean duplicates by group

Suppose that your species has a huge geographic range and you want to work only with the records that match certain criteria, by example the species records that lie inside Canada. You can curate duplicated records using a grouping variable; in this example the grouping variable must be country. Go to Clean duplicates by group section and select the grouping variable in this case country, then select the country (Canada) and press Clean duplicates by group button.

From 154 records only 2 are in Canada.

GBIF visualizations

The GBIF dataset has some fields that can be used to see some exciting visualizations, particulary the fields related to observation date (year, month, day) and the country field. In Data -> GBIF data -> GBIF visualizations tab you can play with interactive plots, create animated visualizations and display a calendar of the reported records by year.

User data

You can use your own latitude and longitude data for the curation and modeling process. Go to Data -> User data and upload your data. The data curation process is just the same as the GBIF data.