plotArea: Plotting maps

Description Usage Arguments Value Author(s) See Also Examples

Description

Method for plotting time series of maps.

Usage

1
2
plotArea(x, time.levels = NULL, time.labels = NULL, class.levels = NULL,
  class.labels = NULL, class.colors = NULL)

Arguments

x

An object of class twdtwRaster.

time.levels

A character or numeric vector with the layers to plot. For plot type ”change” the minimum length is two.

time.labels

A character or numeric vector with the labels of the layers. It must have the same length as time.levels. Default is NULL.

class.levels

A character or numeric vector with the levels of the raster values. Default is NULL.

class.labels

A character or numeric vector with the labels of the raster values. It must have the same length as class.levels. Default is NULL.

class.colors

a set of aesthetic values. It must have the same length as class.levels. Default is NULL. See scale_fill_manual for details.

Value

A ggplot object.

Author(s)

Victor Maus, vwmaus1@gmail.com

See Also

twdtwRaster-class, twdtwApply, plotMaps, plotChanges, and plotDistance.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
# Run TWDTW analysis for raster time series 
patt = yearly_patterns_mt
evi = brick(system.file("lucc_MT/data/evi.tif", package="dtwSat"))
ndvi = brick(system.file("lucc_MT/data/ndvi.tif", package="dtwSat"))
red = brick(system.file("lucc_MT/data/red.tif", package="dtwSat"))
blue = brick(system.file("lucc_MT/data/blue.tif", package="dtwSat"))
nir = brick(system.file("lucc_MT/data/nir.tif", package="dtwSat"))
mir = brick(system.file("lucc_MT/data/mir.tif", package="dtwSat"))
doy = brick(system.file("lucc_MT/data/doy.tif", package="dtwSat"))
timeline = scan(system.file("lucc_MT/data/timeline", package="dtwSat"), what="date")
rts = twdtwRaster(evi, ndvi, red, blue, nir, mir, timeline = timeline, doy = doy)

time_interval = seq(from=as.Date("2007-09-01"), to=as.Date("2013-09-01"), 
                    by="12 month")
log_fun = weight.fun=logisticWeight(-0.1,50)

r_twdtw = twdtwApply(x=rts, y=patt, weight.fun=log_fun, breaks=time_interval, 
          filepath="~/test_twdtw", overwrite=TRUE, format="GTiff", mc.cores=3)

r_lucc = twdtwClassify(r_twdtw, format="GTiff")

plotArea(r_lucc)


## End(Not run)


Search within the dtwSat package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.