PeriodAnomaly: Period Anomaly map

Description Usage Arguments Details Author(s) See Also Examples

Description

The function PeriodAnomaly compute the anomaly map on a given period of time.

Usage

1
2
3
4
5
PeriodAnomaly(ndvidirectory, region, Ystart, Yend, period, 
    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).

period

vector containing the period to focus.
For example, if you want to focus on the period May - July with VGT's dataset, period=15:23.

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

Computing seasonal anomaly put the emphasis on the difference of NDVI signal for a given period, often the growing season.
For each year, the mean of the NDVI is computed over the given period. Then, the global mean over the year is calculated for this period. Anomaly maps comes from the difference between the annual mean of the period and the global mean. If the difference is positive, it means the season was greener than usual. On the contrary, if it is negative, the season was worst than normal. These values are computed for each pixel and the output maps of anomaly are coded with 16 bits, with a factor of 10000 to get value between -10000 and 10000.
The map of global mean over the years for the given season is also saved in the same way (a factor of 10000 is applied) as well as the standard deviation map.

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,MaxAnomaly

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
period=2:18
#executing PeriodAnomaly
PeriodAnomaly(ndvidirectory, region, Ystart, Yend, 
    period = period, outname="Mzimba", outext="show") 

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

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

Related to PeriodAnomaly in ndvits...