Interactive Powerpoint_How to Master effective communication
DSM software tools
1. FAO- Global Soil
Partnership
Training on
Digital Soil Organic Carbon
Mapping
20-24 January 2018
Tehran/Iran
Yusuf YIGINI, PhD - FAO, Land and Water Division (CBL)
Guillermo Federico Olmedo, PhD - FAO, Land and Water Division (CBL)
2. DSM Software
GSP GSOCMap Cookbook Manual recommends
using open source software.
The instructions and screen captures below will
guide you through installing and manually
configuring the software to be used for digital soil
mapping procedures
3. Complete list of GIS Tools And Software
https://en.wikipedia.org/wiki/List_of_geographic_i
nformation_systems_software
4. SAGA GIS
SAGA is the abbreviation for System for Automated
Geoscientific Analyses
SAGA is a Free Open Source Software (FOSS),
which generally means that you have the freedom
5. SAGA GIS
SAGA is the abbreviation for System for Automated
Geoscientific Analyses
SAGA is a Free Open Source Software (FOSS),
which generally means that you have the freedom
Download: http://www.saga-
gis.org/en/index.html
6. SAGA GIS
SAGA is the abbreviation for System for Automated
Geoscientific Analyses
SAGA is a Free Open Source Software (FOSS),
which generally means that you have the freedom
Download: http://www.saga-
gis.org/en/index.html
STANDART MODULES
Gridding
Geostatistics
Grid calculator
Grid discretisation
Grid tools
Image classification
Projections
Simulation of dynamic processes
Terrain analysis
Vector tools
7. Installing SAGA GIS
Download the ZIP of the latest SAGA MS Windows
binary release (sagaversionbin_mswvc.zip) and
extract all files to a directory of your choice.
Alternatively you can download the installer
sagaversionsetup.exe and execute the file.
http://sourceforge.net/project/showfiles.php?grou
p_id=102728
11. QGis
QGIS is a user friendly Open Source
Geographic Information System (GIS)
licensed under the GNU General
Public License. QGIS is an official
project of the Open Source
Geospatial Foundation (OSGeo). It
runs on Linux, Unix, Mac OSX,
Windows and Android and supports
numerous vector, raster, and
database formats and functionalities.
12. QGis
QGIS is a user friendly Open Source
Geographic Information System (GIS)
licensed under the GNU General
Public License. QGIS is an official
project of the Open Source
Geospatial Foundation (OSGeo). It
runs on Linux, Unix, Mac OSX,
Windows and Android and supports
numerous vector, raster, and
database formats and functionalities.
13. QGis
QGIS is a user friendly Open Source
Geographic Information System (GIS)
licensed under the GNU General
Public License. QGIS is an official
project of the Open Source
Geospatial Foundation (OSGeo). It
runs on Linux, Unix, Mac OSX,
Windows and Android and supports
numerous vector, raster, and
database formats and functionalities.
● View data
● Explore data and compose maps
● Create, edit, manage and export data
● Analyze data
● Publish maps on the Internet
● Extend QGIS functionality through
plugins
● External Python Plugins
● Python Console
14. Installing - QGIS
The current version is QGIS 2.18.6 'Las Palmas' and was
released on 07.04.2017.
QGIS is available on Windows, MacOS X, Linux and
Android.
Binary packages (installers) for current stable version
2.18 can be downloaded at
http://www.qgis.org/en/site/forusers/download.html
15. Installing - QGIS
The current version is QGIS 2.18.6 'Las Palmas' and was
released on 07.04.2017.
QGIS is available on Windows, MacOS X, Linux and
Android.
Binary packages (installers) for current stable version
2.18 can be downloaded at
http://www.qgis.org/en/site/forusers/download.html
17. R and R Studio
R is a language and environment for statistical
computing. R provides a wide variety of statistical
(linear modelling, statistical tests, time-series,
classification, clustering, …) and graphical methods,
and is highly extensible.
18. R and R Studio
R was originally developed in 1992 by Ross Ihaka
and Robert Gentleman at the University of
Auckland (New Zealand). The R language is a
dialect of the S language which was developed by
John Chambers at Bell Laboratories. This software
is currently maintained by the R Development Core
Team, which consists of more than a dozen people,
and includes Ihaka, Gentleman, and Chambers.
19. R and R Studio
Additionally, many other people have contributed
code to R since it was first released. The source
code for R is available under the GNU General
Public Licence, meaning that users can modify,
copy, and redistribute the software or derivatives,
as long as the modified source code is made
available. R is regularly updated, however,
changes are usually not major.
Using R for Digital Soil Mapping,
Brendan P. Malone • Budiman
Minasny Alex B. McBratney
20. R- Advantages
• R is free and open source software, allowing
anyone to use and, importantly, to modify it. R is
licensed under the GNU General Public License,
with copyright held by The R Foundation for
Statistical Computing.
• R has no license restrictions (other than ensuring
our freedom to use it at our own discretion), and
so it can be run anywhere and at any time.
21. R- Advantages
• The graphical capabilities of R are outstanding,
providing a fully programmable graphics language
that surpasses most other statistical and graphical
packages.
• The validity of the R software is ensured through
openly validated. Because R is open source, unlike
closed source commercial software, it has been
reviewed by many internationally renowned
statisticians and computational scientists.
22. R- Advantages
• Anyone is welcome to provide bug fixes, code
enhancements, and new packages, and the
wealth of quality packages available for R is a
testament to this approach to software
development and sharing.
• Currently, the CRAN package repository features
10489 available packages from multiple
repositories specializing in topics like
econometrics, data mining, spatial analysis, and
bio-informatics.
23. R- Advantages
• R is cross-platform. R runs on many operating
systems and different hardware. It is popularly
used on GNU/Linux, Macintosh, and Microsoft
Windows, running on both 32 and 64 bit
processors.
• R plays well with many other tools, importing
data, for example, from CSV files, SAS, and SPSS,
Minitab or directly from Microsoft Excel,
Microsoft Access, Oracle, MySQL, and SQLite. It
can also produce graphics output in several image
formats, and table output for LATEX and HTML.
24. R- Advantages
• R has active user groups where questions can be
asked and are often quickly responded to, often
by the very people who developed the
environment|this support is second to none.
• New books for R (the Springer Use R! series) are
emerging, and there is now a very good library of
books for using R.
25. R- Disadvantages
R has a steep learning curve. it does take a while to
get used to . But no steeper than for other
statistical languages. R is not so easy to use for the
novice. There are several simple-to use graphical
user interfaces (GUIs) for R that enable point and-
click interactions, but they generally do not have
the polish of the commercial offerings.
29. R- Disadvantages
Some R commands give little thought to
memory management, and so R can very
quickly consume all available memory. This can
be a restriction when doing data mining at large
scales. There are various solutions, including
using 64 than 32 bit OS.
30. R- Disadvantages
There is, in general, no one to complain to if
something doesn’t work. R is a software
application that many people freely devote their
own time to developing. Problems are usually
dealt with quickly on the open mailing lists, and
bugs disappear with lightning speed. Users who
do require it can purchase support from a
number of vendors internationally.
31. R- Disadvantages
it is sometimes difficult to manage if your code
grows bigger. it is possible if you really pay
attention to strict rules which are not imposed by
the language.
32. RStudio is an integrated
development
environment (IDE) for R.
It includes a console,
syntax-highlighting
editor that supports
direct code execution,
as well as tools for
plotting, history,
debugging and
workspace
management.
46. Installing RStudio
● Beginners will find very hard to start using R because it has
no Graphical User Interface (GUI). There are some GUIs
which offer some of the functionality of R. RStudio makes R
easier to use. It includes a code editor, debugging and
visualization tools. In this training we will use RStudio which
makes R easier to use.
● R Studio’s Open Source Edition can be downloaded at
https://www.rstudio.com/products/rstudio/download/ . On
the download page, “RStudio Desktop, Open Source
License” option should be selected.
56. R Packages
● When you download R, you get that ``base" R
system
● The R system comes with basics; implements
the R language
● R becomes so useful with the large collection of
packages that extend the basic functionality of
R
● R packages are developed by the R community
57. Finding R Packages
● The primary source for the R packages is
CRAN’s official website. For spatial
applications, many packages are available.
● You can obtain information about the available
packages on CRAN with the
available.packages() function. The function
returns a matrix of details corresponding to
packages currently available at one or more
repositories.
58. Finding R Packages
● The primary source for the R packages is
CRAN’s official website. For spatial
applications, many packages are available.
● You can obtain information about the available
packages on CRAN with the
available.packages() function. The function
returns a matrix of details corresponding to
packages currently available at one or more
repositories.
60. Finding R Packages
For example, the Task View for Analysis of Spatial Data can
be accessed at: https://CRAN.R-project.org/view=Spatial.
61. Finding R Packages
The following the code installs the “ggplot2” package from CRAN
> install.packages("ggplot2")
62. Finding R Packages
The packages can be installed also using the graphical user
interface.
63. Finding R Packages
The packages can be installed also using the graphical user
interface.
64. R - DSM Packages
Most used R Packages for Digital Soil Mapping
As was previously mentioned, R is extensible
trough packages.
R packages are collections of R functions, data,
documentation and compiled code easy to share
with others. There are more than 10000 R
packages available on the Comprehensive R
Archive Network (CRAN) (cran.r-project.org).
65. R - DSM Packages
Soil Science and Pedometrics
aqp: Algorithms for quantitative pedology. http://cran.r-project.org/web/
packages/aqp/index.html. A collection of algorithms related to modeling of soil
resources, soil classification, soil profile aggregation, and visualization..
GSIF: Global soil information facility. http://cran.r-project.org/web/packages/
GSIF/index.html. Tools, functions and sample datasets for digital soil mapping.
Global Soil Information Facilities - tools (standards and functions) and sample
datasets for global soil mapping.
> install.packages("aqp")
> install.packages("GSIF")
66. R - DSM Packages
Spatial Analysis
sp: http://cran.r-project.org/web/packages/sp/index.html. A package that provides
classes and methods for spatial data. The classes document where the spatial location
information resides, for 2D or 3D data.
raster: http://cran.r-project.org/web/packages/raster/index.html. Reading, writing,
manipulating, analyzing and modeling of gridded spatial data. The package
implements basic and high-level functions and processing of very large files is
supported.
> install.packages("sp")
> install.packages("raster")
67. R - DSM Packages
Spatial Analysis
rgdal: http://cran.r-project.org/web/packages/rgdal/index.html. Provides bindings to
Frank Warmerdam’s Geospatial Data Abstraction Library (GDAL).
RSAGA: http://cran.r-project.org/web/packages/RSAGA/index.html. RSAGA provides
access to geocomputing and terrain analysis functions of SAGA GIS http://www.saga-
gis.org/en/index.html from within R by running the command line version of SAGA.
> install.packages("rgdal")
> install.packages("RSAGA")
68. R - DSM Packages
Modeling
caret: http://cran.r-project.org/web/packages/caret/index.html.
Extensive range of functions for training and plotting classification and
regression models.
Cubist: http://cran.r-project.org/web/packages/Cubist/index.html.
Regression modeling using rules with added instance-based
corrections. Cubist models were developed by Ross Quinlan.
C5.0: http://cran.r-project.org/web/packages/C50/index.html. C5.0
decision trees and rule-based
> install.packages("caret")
> install.packages("Cubist")
> install.packages("C50")
69. R - DSM Packages
Modeling
gam: http://cran.r-project.org/web/packages/gam/index.html.
Functions for fitting and working with generalized additive
models.
nnet: http://cran.r-project.org/web/packages/nnet/index.html.
Software for feed-forward neural networks with a single hidden
layer, and for multinomial log-linear models.
> install.packages("gam")
> install.packages("nnet")
70. R - DSM Packages
Modeling
gstat: http://cran.r-project.org/web/packages/gstat/. Variogram
modelling; simple, ordinary and universal point or block
(co)kriging, sequential Gaussian or indicator (co)simulation;
variogram and variogram map plotting utility functions.
> install.packages("gstat")
71. R - DSM Packages
Mapping and Plotting
Both raster and sp have handy functions for plotting spatial
data. Besides using the base plotting functionality, another
useful plotting package is ggplot2 http://cran.r-
project.org/web/packages/ggplot2/index.html
plotKML: Writes sp-class, spacetime-class, raster-class and
similar spatial and spatio-temporal objects to KML following
some basic cartographic rules.
> install.packages("plotKML")
72. The easiest way to get help in R is using the ‘?’ operator.
Just append a ‘?’ before the name of a function you want to
get help, R will open find information about the function from
the set of installed packages. If you want to search for it
outside the installed packages, use ‘??’ before the function
name. ?? can also help search for partial and incomplete
terms.
R - Getting Help
help (merge) # get help page for 'merge'
?merge # lookup 'merge' from installed pkgs
??merge # search
example (merge) # show code examples
73. Working Directory
What is a working directory and how to set up
one?
-A working directory is the reference directory from
which R has direct access to read in files.
-You can read in and write files directly to the
working directory without using the full file path. -
The directory names should be separated by
forward slash (/) or double back slash () instead
of () even for a windows PC.
76. Error Handling
There are several ways to handle error messages in R.
The first and the most simple way is to tell R not to display
any error messages, no matter how bad it is :)
Try the following code in your R console, you will notice
that you R does not display error messages right after turn
error messages OFF. You can turn it back ON by setting
this to TRUE again.
> setwd("f:/")
Error in setwd("f:/") : cannot change working directory
> options(show.error.messages=F) # turn off
> setwd("f:/")
77. Error Handling
Though you have turned off displaying error messages
above, you have not actually ‘handled’ it. You can say the
error messages are ‘handled’ when you are able to
perform some alternative measures in the event errors
happen.
More on Error Handling: https://www.r-bloggers.com/error-
handling-in-r/