In this tutorial we describe how to perform species distribution modelling (SDM) with Niche Of Occurrence (NOO) in ModestR. NOO is a new proposed SDM that offers a very good performance and it's easier to perform and understand than other existing SDM's
1 of 49
Downloaded 18 times
More Related Content
20. Calculating most probable distribution of a species with Niche of Occurrence (NOO) in ModestR (Version ModestR 5.6 or higher)
1. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Step by step tutorial:
Calculating most probable
distribution of a species with
Niche of Occurrence (NOO)
in ModestR
2. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
What do you need for this tutorial:
1. ModestR v.5.6 or higher installed
2. Internet connection
3. About 25 minutes
ModestR software can be freely downloaded from http://www.ipez.es/ModestR
3. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Well describe how to calculate species
distribution with Niche of Occurrence
(NOO2D) in ModestR.
Follow the next steps!
4. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
To calculate species distribution, well need species occurrences. You can download them from GBIF (see tutorials 1 and 2
in http://www.ipez.es/ModestR/Manual_Tutorial.html). You can also import them from a CSV file. For this tutorial well
later provide a sample CSV file with a virtual species generated using the virtualspecies package from R, and the
environmental variables from WorldClim.
They can come from GBIF, or from a CSV file like this one
5. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
To calculate species distribution well also need the environmental data we want to work with.
There are different datasets freely available, such as WorldClim, NOOAs World Ocean Atlas or Copernicus
For this tutorial well use WorldClim data version 2.
To download and integrate these data in ModestR, follow
Tutorial 14- Adding WorldClim data to ModestR
You can find it in the ModestR tutorials page:
http://www.ipez.es/ModestR/Manual_Tutorial.html
6. 1) Select menu Options / Preferences
2) To use Spanish format (default):
Decimal separator ,
Field separator ;
To use English format :
Decimal separator .
Field separator ,
For this tutorial youll find a sample file Single_Virtual_Species_Occurrences_for_Tutorial_20 among the sample files
provided with this tutorial. You can choose it between two CSV options: Format Spanish / Format English
You may select the format depending on the configuration in the "Options / Preferences" menu of the "CSV Exportation
Options" section of any of the ModestR applications.
For example in ModestR DataBase Manager you can find it here:
7. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Download the file Single_Virtual_Species_Occurrences_for_Tutorial_20 from next link:
CSV in Spanish Format / CSV in English Format
Then import it from MapMaker
2) Go to menu Import/Occurrence data from
CSV file then select the downloaded CSV file
1) Run ModestR MapMaker
8. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
When importing occurrences to ModestR, you have to select the valid habitats for the species
2) In the dialog box just
check the Land habitat
3)Then click on Accept
4) Import completed
Then click on Accept
1)Be sure of skipping the first column (species name)
and of adding Longitude and Latitude as the second
and third columns.
The columns to be imported and their order will
depend on the format for the specific CSV file
Pay also attention to select the correct decimal and
field separators, according to the CSV file format
(English-like format uses . and , respectively, while
Spanish-like format uses , and ; respectively)
9. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Once occurrences imported, ModestR checks the habitats and indicates when occurrences are in an invalid habitat for
the species using another color. Those occurrences are shown but are not used in any analysis or calculation
Invalid occurrences (here in black) are
occurrences located in habitats not valid for the
species. As we indicated that only land was valid
for this species, invalid occurrences are those
located in sea or freshwater habitats.
10. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
NOO can be used to calculate a density map that shows species suitability, or to calculate a distribution.
Well first start with the density map
1) Go to menu Mapping/Niche of occurrence/Density Map
11. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Next step is creating or selecting an existing 2D or 3D CEL (Compounded Environmental Layer).
A CEL will bind together several environmental variables in a single multidimensional variable. In this case well
create a new 2D CEL using the WorldClim data we have imported previously (see Tutorial 14)
1) Select Create a new 2D CEL
More details about what are compounded
environmental layers can be found in ModestR Users
Manual on ModestR website.
A tutorial about compounded environmental layers
creation can also be found at
http://www.ipez.es/ModestR/Manual_Tutorial.html
2) Click Accept
If other previously created and stored
CELs exist, they will be show here
A 2D CEL has only longitude and latitude dimensions.
For 3D CELs that can include a 3th dimension such as
time or depth, see tutorials about 3DNOO in
http://www.ipez.es/ModestR/Manual_Tutorial.html
12. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
When creating a 2D CEL you have to select the whished variables you want to work with.
2) For this example, in the
dialog box that will be shown,
select all the variables from
WorldClim
3) Well change the
geographical extent (GE) to
Extent of Occurrence (EOO),
to limit the distribution to be
calculated to the EOO of the
current species
You can use Preview button to see the EOO in
the world map (you probably have to move this
window to be able to see the world map below)
4) Click on Continue
Well keep the default mode to
calculate EOO, which is the
alpha shape (see Tutorial 4- Data
cleaning and hulling for more details
about EOO calculation)
13. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
5) Click on Calculate VIF
In the next step you can calculate VIF (Variance Inflation Factor)
of the variables to detect collinearity and, optionally, delete
some variables that may be redundant
14. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
You can select a variable an delete it from the list.
VIF will be recalculated with the remaining variables. You
can continue deleting other variables, until VIF is considered
acceptable (typically when VIF<30)
For this example well keep only the variables
wc2.0_bio_5m_02, 03, 04, 08, 09, 12, 14, 15, 18 and 19.
Well delete the other variables.
VIF of each variable is shown
VIF >30 is shown in red.
7) Click on Continue
6) Select a variable and click on Delete selected
Note.- to select several variables keep Ctrl key pressed while selecting.
15. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step you can calculate the relative relevance of each variable regarding the species distribution using a
Instability Index (see https://doi.org/10.1016/j.ecoinf.2016.11.004 for more information).
This can help you selecting the most relevant variables for the species
8) Click on Analyse and Contribution
of each variable will appear
When you press on Analyse
the most relevant variables
will be automatically selected.
9) Click on Continue
This step is not mandatory. You can just click on Continue
without performing this analysis neither the variable selection.
In that case all the variables will be used.
16. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step variables are optimally ordered in the polar space using they correlation matrix.
You can eventually reorder variables, but the most of the time youll just continue
10) Click on Continue
17. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step, the 2DCEL is generated and shown in the polar coordinates system
12) Click on Continue
11) Click on Show in map to show the CEL in the world map.
Take into account that a CEL contains only environmental variables. It will
be employed to calculate the species distribution, but it is not related
with a specific species.
18. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the last step, you can optionally save this 2D CEL to be used later. Or you can just load it for the current work
session. For this example well save it to use it later
1) Enter a name
2) Click on Save layer
4) Click on Continue
3) When save completed,
click on Continue
19. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
2) Click Run to calculate density
1) Well leave Smoothing to 1.
But you can also test increasing it to 2 or 3
Once a 2DCEL selected or built, we can perform the NOO2D using this CEL and
the species data.
NOO2D uses a kernel density function to calculate the suitability of the
species. Therefore a smoothing parameter can be adjusted to take into account
the environmental tolerance of the species. The more a species is tolerant, the
higher we may adjust smoothing. Typical values range between 1 and 3
A NOO2D has only longitude and latitude
dimensions. For species distribution niche in 3D, that
can include a 3th dimension such as time or depth,
see tutorials about 3DNOO in
http://www.ipez.es/ModestR/Manual_Tutorial.html
20. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Results will be displayed both in the world map, showing geographic density, and in the dialog, showing polar density map
Use the Clear button to delete
current results, change parameters
(such as smoothing) an run again
the NOO calculation.
Suitability and density rasters can
be saved to files using this button
21. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Going back to MapMaker, you can move the dialog box to be able to show the world map, and see the species
suitability.
1) Drag the dialog box to a side
to be able to see the world map
You can see in the world map the suitability
22. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Close the dialog box and go back to main MapMaker window. If many occurrences are shown on the map, they may
sometimes hide parts of the density map. Try to hide them to see the whole density map.
Uncheck valid and invalid occurrences to only
see the density map.
Then check them again to show the occurrences
before continuing to the next step.
23. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Well now calculate Distribution map
1) Go to menu
Mapping/Niche of occurrence/ Distribution map
24. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Thanks to having saved previously the 2DCEL we built, well now just have to select it to calculate NOO2D distribution
2) Select the previously saved CEL
3) Click on Accept
25. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
5) Click on Run. Calculation will start
Range can be Full layer or EOO. In this case we can
leave Full layer as the 2DCEL we are using is already
limited to the EOO of the species
Add area option (by default) indicates that the
estimated area will be added to the distribution map. The
other option, Hull simulation, adds just a shape only
for visualization purposes, not as part of the species
distribution
4) Leave Smoothing to 1
The parameters to set are the almost the same than for the density map
26. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
If needed click on Clear raster
button to clear density map and see
the species distribution.
The distribution of the species is
shown in the map.
You may save this map in a database
or as a standalone file.
27. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
The procedure previously described is useful when working with one or few species, and when we want to see the results
of each step, test several parameters, etc.
But when working with many species, it may be more useful to use DataManager application from ModestR, that
allows working with databases of hundreds or thousands of species. In DataManager you can perform NOO2D in batch
mode and obtain for example the distribution of many species. In the next steps we explain how.
28. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Download database VirtualSpecies for tutorial 20.MODESTRDB from THIS LINK.
Then open DataMananager and open this database.
1) Select menu File / Open Database and then
select the downloaded database file
29. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
The first step is processing all maps if they still arent (that is, converting them to an internal format that allows ModestR
to work with them more efficiently)
3) Click on Process button, or on menu
Process/Process checked pending maps
2) Check all the species checking the
root node checkbox
4) For this tutorial we can uncheck all
processing options, in order to make it fast
5) Click OK
30. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
If map processing is needed, it will start immediately. If it is not needed, a message will indicate that no maps have to be
processed (the necessity of map processing depends on the ModestR and world map versions you have).
31. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Now we are ready to calculate NOO2D for all the species in the database
2) Go to menu Mapping/Apply niche of
occurrence to checked maps/Using a per-
species layer/2D
1) Check all the species
checking the root node checkbox
The per-species layer option will select the more relevant variables for each
species, create an on-the-fly 2D CEL with them and calculate the NOO2D of the
species. That are the same steps we already explained at the beginning of this tutorial,
but interactively in MapMaker. Here they will be done in batch mode.
The other option, using a stored layer will use the same 2DCEL, previously built and
stored in MapMaker, to calculate the NOO2D for all species.
32. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Now we are ready to calculate NOO2D for all the species in the database.
Well use the same options we already used in MapMaker
1) For this example well use
only the variables:
- wc2.0_bio_5m_02, 03, 04,
08, 09, 12, 14, 15, 18 and 19.
2) Well change the geographical
extent (GE) to Extent of Occurrence
(EOO), to limit the distribution to be
calculated to the EOO of the current
species.
Well keep the default mode to calculate
EOO, which is the Alpha shape
(See Tutorial 4- Data cleaning and hulling
for more details about EOO calculation)
3) Click on Continue
33. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
1) Click on Continue
In the next step you can calculate VIF (Variance Inflation Factor) of
the variables to detect collinearity and, optionally, delete some
variables that may be redundant.
But as we already have done this step in MapMaker and then we
now have just selected the variables with a low VIF, we can just
continue.
34. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step you can set how the relative relevance of each variable regarding the species distribution will be
calculated (see https://doi.org/10.1016/j.ecoinf.2016.11.004 for more information). We already described this step in
MapMaker. The difference is that here well not see the results immediately. They will be calculated for each species
when the batch process will be started.
1) Click on Continue
Here this step is mandatory, as we selected the option of using a per-
species layer to calculate the NOO of each species.
The per-species layer option will select the more relevant variables
for each species, create an on-the-fly 2D CEL with them and calculate
the NOO2D of the species. That are the same steps we already
explained at the beginning of this tutorial, but interactively in
MapMaker.
The other option, using a stored layer will use the same 2DCEL,
previously built and stored in MapMaker, to calculate the NOO2D for all
species. Thus, it will not apply the step to select most relevant variables
for each species, as the same 2DCEL will be used for all of them.
35. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
In the next step you can adjust NOO2D parameters such as smoothing, calculation range and other ones.
2) Click on Start
1) Check Export detailed data. This will export a density
map as an image, as well as density and suitability rasters
for each processed map.
Suitability rasters are the typical output of SDMs, and they
may be used for later analyses, such as estimating species
composition in one or more regions with KnowBR and
ModestR (see Tutorial 18- Estimating species composition in one
or more regions with KnowBR and ModestR for more details)
36. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Select a folder to save detailed result data
37. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
1) Click on Continue without backup
NOO2D will calculate species distributions and save them in the current database. Therefore, ModestR will propose you
to make a backup of the current database before continuing. But as this is just a sample database, well continue
without doing backup.
38. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
NOO2D processing will start, This can take some time!
1) Click on Si/Yes
2) Click on Open file to open the saved
report. As it is a CSV file, it is usually
opened in Excel or the Notepad.
Once ended, you can
save a report about
the process. Save it!
39. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
This report contains the contribution (relative importance) of each variable for each species, the selected
variables used to calculate NOO for each species, the AUC, the Minimum Training Presence Threshold (MTPT)
and some other values for each species
40. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Now go to the folder you selected to save detailed results.
You will find those subfolders:
41. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
CEL_maps contains images of the 2DCELs created for each species
42. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Density_rasters contains rasters of the density map for each species
To display a raster in MapMaker, go to menu
Layers/Rasters/Load raster from ESRI ASC-GeoTIFF file
43. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Image_maps contains images of the species distributions. Anyway, species distribution maps can be
exported as images from MapMaker, with the advantage of being able to zoom specific areas, add grids, etc.
44. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Polar_maps contains images of the polar maps of each species
45. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Suitability_rasters contains rasters of the suitability map for each species
Suitability rasters are the typical
output of SDMs, and they may
be used for later analyses, such as
estimating species composition in
one or more regions with
KnowBR and ModestR (see
Tutorial 18- Estimating species
composition in one or more
regions with KnowBR and
ModestR for more details)
To display a raster in MapMaker, go to menu
Layers/Rasters/Load raster from ESRI ASC-GeoTIFF file
46. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Going back to DataManager, now the species maps have been modified, because the result of the NOO has
been added to each species.
1) Right-click over any species
and select Open map in
Mapmaker to see the resulting
map after the NOO
47. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Uncheck valid and invalid
occurrences to only see
the areas added to the
map by the NOO process
Those areas have been added
as result of the NOO
48. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
Here we explained how to perform NOO2D. But NOO can also be performed in 3D, including a 3th dimension such as
time or depth. See tutorials about 3DNOO in http://www.ipez.es/ModestR/Manual_Tutorial.html, such as:
Tutorial 10- Creating environmental layers 3D
Tutorial 11- Calculating species niche for different periods with ModestR
Tutorial 17- An example using ModestR to assess species distribution in different climatic change scenarios
Tutorial 19- Calculating 3D species niche in marine habitats with ModestR
49. MODESTR QUICK TUTORIALS HTTP://WWW.IPEZ.ES/MODESTR/
It was the Step by step tutorial:
Calculating species niche with Niche of
Occurrence (NOO) in ModestR
Thank you for your interest.
You can find this one and other tutorials in http://www.ipez.es/ModestR
By the ModestR team