% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fires.R
\name{plot_fires_emissions}
\alias{plot_fires_emissions}
\title{Download and plot essential climate data}
\usage{
plot_fires_emissions(
  dataset = get_fires_emissions(),
  pollutant = c("CO2", "BC", "C", "CH4", "CO", "NMHC", "NOX", "OC", "PM2.5", "SO2", "TC"),
  style = c("cumulative", "weekly"),
  print = TRUE
)
}
\arguments{
\item{dataset}{Name of the tibble generated by \code{get_fires_emissions}}

\item{pollutant}{(string) Select which pollutant to plot. May be one of \code{"CO2"} (the default),
\code{"BC"}, \code{"C"}, \code{"CH4"}, \code{"CO"}, \code{"NMHC"}, \code{"NOX"},
\code{"OC"}, \code{"PM2.5"}, \code{"SO2"}, or \code{"TC"}.}

\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 emissions chart
}
\description{
Plots the wildfire greenhouse gas emissions data retrieved using \code{get_fires_emissions()} with ggplot2.
The output ggplot2 object may be further modified.
}
\details{
\code{plot_fires_emissions} invisibly returns a ggplot2 object with a pre-defined wildfire
emissions chart using data from \code{get_fires_emissions}. By default the chart is also displayed.
The shaded ribbon shows the historical minimum-to-maximum range since 2003, and the blue line
shows the historical average. Emissions are expressed in millions of tons. Users may further
modify the output ggplot2 chart.
}
\examples{
\donttest{
# Fetch wildfire emissions data:
emissions <- get_fires_emissions()
#
# Plot output using package's built-in ggplot2 defaults
plot_fires_emissions(emissions)

# Or just call plot_fires_emissions(), which defaults to get_fires_emissions() dataset
plot_fires_emissions()

# Plot weekly PM2.5 emissions instead of cumulative CO2
plot_fires_emissions(emissions, pollutant = 'PM2.5', style = 'weekly')

p <- plot_fires_emissions(emissions, print = FALSE)
# Modify plot such as: p + ggplot2::labs(title='Global CO2 Emissions from Wildfires') }

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