MaxAnomaly: Maximum Anomaly

Description Usage Arguments Details Author(s) See Also Examples

Description

The function MaxAnomaly compute the anomaly map of the difference between the maximum of each year and their mean.

Usage

1
2
3
4
5
MaxAnomaly(ndvidirectory, region, Ystart, Yend, 
    outname = "anomaly", outext = "show", xlim = NULL, 
    ylim = NULL, type="VITO_CLIP", shapefile = NULL, 
    shapedir = NULL, shapeext = "shp", label = FALSE, 
    pal = "Spectral")

Arguments

ndvidirectory

path to the ndvi images folder (GeoTIFF files).
Please note that paths to files in R can be specified with either "/" or "\\" in Windows OS and with "/" in UNIX OS.

region

name of the region, same as in the name of the ndvi images.
Please refer to details section for more information on the nomenclature.

Ystart

starting year of the analysis (in four-digit format).

Yend

ending year of the analysis (in four-digit format).

outname

prefix of the name of the files where the anomaly maps are saved.
By default outname="anomaly"

outext

extension of the created maps.
If outext = "show", maps are displayed in the R graphics console.
Choose between "jpg", "png" or "pdf" to save the map in the corresponding format.
By default, outext = "show".

xlim

a two dimensions vector containing the longitude limits of the area of interest.
xlim=NULL indicates no longitude limits. By default, xlim=NULL.
Please note that xlim have to be in the same units and projection as the ndvi maps.

ylim

a two dimensions vector containing the latitude limits of the area of interest.
ylim=NULL indicates no longitude limits. By default, ylim=NULL.
Please note that ylim have to be in the same units and projection as the ndvi maps.

type

type of nomenclature followed by the NDVI images : "VITO_CLIP", "VITO_VGT" or "GIMMS" (see details for more information).
By default, type = "VITO_CLIP".

shapefile

name of the shape/kml file with objects (points or polygons) to be displayed on the maps.
For a shapefile called ‘name.shp’ , shapefile="name".
For a kml file, write the name of the layer.
If shapefile=NULL, no object will be added to the map.
By default, shapefile=NULL.

shapedir

path to the shape/kml file.
For a shapefile, shapedir is the path to the folder containing the shapefile. For example if the directory of the shapefile is ‘C:/Dir/name.shp’, shapefile="C:/Dir/".
For a kml file, shapedir is the full directory of the kml file. For example shapefile="C:/Dir/name.kml".
Please note that paths to files in R can be specified with either "/" or "\\" in Windows OS and "/" in UNIX OS.

shapeext

extension of the shape/kml file : "shp" for a Esri shapefile or "kml" for a kml file from Google earth .
By default, shapeext = "shp".

label

name of the label of the points to be displayed on the map.
For a shapefile, please indicates the name of the category you want to see. For a kml file, label="Name". If label=FALSE, no label will be plotted. By default, label=FALSE.

pal

name of the palette of colors used to make the map from the package RColorBrewer.
To see the different palettes available for your map, please type display.brewer.all().
By default, pal="Spectral".

Details

The map of the max of each year between Ystart and Yend is computed. Then, the mean is calculated. The anomaly map comes from the difference between the mean of the max and the max of the specific year. It is saved automatically in geotiff and displayed by default (show=TRUE) in the graphic of R. To go from one graph to another, click on the graph or press enter in the R console.

More about the variable type :
type = GIMMS : nomenclature from Global Land Cover Facility
[RE][YY][MMM][DDD].[SAT]-VIg.tif

type = VITO_VGT : FreeVGT VITO's nomenclature
NDV_[YYYYMMDD]_[REGION]_Extract.tif

type = VITO_CLIP : nomenclature after clipping the images in a particular region.
[REGION][YYYY]M[MM]P[D].tif

Author(s)

Romain Frelat and Bruno Gerard

See Also

maplocalstat, PeriodAnomaly

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#local variables
ndvidirectory=paste(system.file("extdata/VITO_Mzimba",
    package="ndvits"), "/", sep="")
region="Mzimba"
Ystart=2004
Yend=2009

#executing MaxAnomaly
MaxAnomaly(ndvidirectory, region, Ystart, Yend,
    outname="Mzimba", outext="show")

#adding points to the map
shape="SLP_Mzimba"
shapedir=paste(system.file("extdata/shape", package="ndvits"),
    "/", sep="")
MaxAnomaly(ndvidirectory, region, Ystart, Yend,
    outname="Mzimba", outext="show", shapefile=shape,
    shapedir=shapedir, label="Village")

ndvits documentation built on May 2, 2019, 4:47 p.m.

Related to MaxAnomaly in ndvits...