animate_annual: Plot an animation of forest change within a given area of...

Description Usage Arguments See Also

View source: R/animate_annual.R

Description

Produces an animation of annual forest change in the area bounded by the extent of a given AOI, or AOIs. The AOI polygon(s) is(are) also plotted on the image. The gfc_stack must be pre-calculated using the annual_stack function. The animation can be either an animated GIF (if type is set to 'gif') or a series of '.png' files with a corresponding '.html' webpage showing a simple viewer and the forest change animation (if type is set to 'html'). The HTML option is recommended as it requires no additional software to produce it. The animated GIF option will only work if the imagemagicK software package is installed beforehand (this is done outside of R).

Usage

1
2
3
animate_annual(aoi, gfc_stack, out_dir = getwd(),
  out_basename = "gfc_animation", site_name = "", type = "html",
  height = 3, width = 3, dpi = 300, data_year = 2015)

Arguments

aoi

one or more AOI polygons as a SpatialPolygonsDataFrame object. If there is a 'label' field in the dataframe, it will be used to label the polygons in the plots. If the AOI is not in the WGS84 geographic coordinate system, it will be reprojected to WGS84.

gfc_stack

a GFC product subset as a RasterStack (as output by annual_stack)

out_dir

folder for animation output

out_basename

basename to use when naming animation files

site_name

name of the site (used in making title)

type

type of animation to make. Can be either "gif" or "html"

height

desired height of the animation GIF in inches

width

desired width of the animation GIF in inches

dpi

dots per inch for the output image

data_year

which version of the Hansen data was used when annual_stack was run

See Also

annual_stack


azvoleff/gfcanalysis documentation built on June 4, 2017, 12:07 a.m.