View source: R/animate_annual.R
animate_annual | R Documentation |
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).
animate_annual(
aoi,
gfc_stack,
out_dir = getwd(),
out_basename = "gfc_animation",
site_name = "",
type = "html",
height = 3,
width = 3,
dpi = 300,
dataset = "GFC-2022-v1.10"
)
aoi |
one or more AOI polygons as a |
gfc_stack |
a GFC product subset as a
|
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 |
dataset |
which version of the Hansen data to use
|
annual_stack
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.