% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fires.R
\name{plot_fires_area}
\alias{plot_fires_area}
\title{Download and plot essential climate data}
\usage{
plot_fires_area(
  dataset = get_fires_area(),
  var = c("area", "count"),
  style = c("cumulative", "weekly"),
  print = TRUE
)
}
\arguments{
\item{dataset}{Name of the tibble generated by \code{get_fires_area}}

\item{var}{(string) Select which variable to plot. May be \code{"area"} (burnt area in hectares, the default)
or \code{"count"} (number of fire events).}

\item{style}{(string) Select cumulative or weekly view. May be \code{"cumulative"} (year-to-date totals,
the default) or \code{"weekly"} (weekly values).}

\item{print}{(boolean) Display the ggplot2 chart, defaults to TRUE. Use FALSE to suppress display.}
}
\value{
Invisibly returns a ggplot2 object with the wildfire chart
}
\description{
Plots the wildfire burnt area or fire count data retrieved using \code{get_fires_area()} with ggplot2.
The output ggplot2 object may be further modified.
}
\details{
\code{plot_fires_area} invisibly returns a ggplot2 object with a pre-defined wildfire chart using
data from \code{get_fires_area}. By default the chart is also displayed. The shaded ribbon shows the
historical minimum-to-maximum range since 2012, and the blue line shows the historical average.
Users may further modify the output ggplot2 chart.
}
\examples{
\donttest{
# Fetch wildfire data:
fires <- get_fires_area()
#
# Plot output using package's built-in ggplot2 defaults
plot_fires_area(fires)

# Or just call plot_fires_area(), which defaults to get_fires_area() dataset
plot_fires_area()

# Plot weekly fire count instead of cumulative burnt area
plot_fires_area(fires, var = 'count', style = 'weekly')

p <- plot_fires_area(fires, print = FALSE)
# Modify plot such as: p + ggplot2::labs(title='Global Wildfire Burnt Area') }

}
\author{
Hernando Cortina, \email{hch@alum.mit.edu}
}
