% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fires.R
\name{get_fires_area}
\alias{get_fires_area}
\title{Download and plot essential climate data}
\usage{
get_fires_area(
  place = "WORLD",
  year = as.numeric(format(Sys.Date(), "\%Y")),
  use_cache = TRUE,
  write_cache = getOption("hs_write_cache")
)
}
\arguments{
\item{place}{(string) Region or country for which to retrieve data. May be one of the
following regional aggregates: \code{"WORLD"} (default), \code{"UN_EUR"} (Europe),
\code{"UN_AFR"} (Africa), \code{"UN_ASI"} (Asia), \code{"UN_AME"} (Americas),
or \code{"UN_OCE"} (Oceania). Alternatively, supply an ISO 3166-1 alpha-3 country
code such as \code{"USA"}, \code{"CAN"}, or \code{"BRA"}.}

\item{year}{(numeric) Four-digit year for which to retrieve data. Must be 2012 or later.
Defaults to the current year.}

\item{use_cache}{(boolean) Return cached data if available, defaults to TRUE. Use FALSE to fetch updated data.}

\item{write_cache}{(boolean) Write data to cache, defaults to FALSE. Use TRUE to write data to cache for later use. Can also be set using options(hs_write_cache=TRUE)}
}
\value{
Invisibly returns a tibble with weekly and cumulative wildfire burnt area and fire
count data for the requested place and year. Weekly columns include \code{date},
\code{events}, \code{events_min}, \code{events_max}, \code{events_avg},
\code{area_ha}, \code{area_ha_min}, \code{area_ha_avg}, and \code{area_ha_max}.
Cumulative columns are prefixed with \code{cum_}.
}
\description{
Retrieves global wildfire burnt area and fire count data from the
Global Wildfire Information System (GWIS), operated by the Copernicus
Emergency Management Service.
\url{https://gwis.jrc.ec.europa.eu/apps/gwis.statistics/seasonaltrend}
}
\details{
\code{get_fires_area} invisibly returns a tibble with weekly and year-to-date cumulative
wildfire burnt area (in hectares) and fire event counts sourced from the GWIS API.
Historical minimum, maximum, and average baselines are included for comparison.
Data coverage begins in 2012. Cache filenames include the place and year so that
multiple queries can be cached independently.
}
\examples{
\donttest{
# Fetch global data for the current year from cache if available:
fires <- get_fires_area()
#
# Fetch data for Canada in 2023:
fires_can <- get_fires_area(place = 'CAN', year = 2023)
#
# Force cache refresh:
fires <- get_fires_area(use_cache = FALSE)
#
# Review cache contents and last update dates:
hockeystick_cache_details() }

}
\references{
Global Wildfire Information System (GWIS), Copernicus Emergency Management Service / European Commission Joint Research Centre.
\url{https://gwis.jrc.ec.europa.eu/apps/gwis.statistics/seasonaltrend}
}
\author{
Hernando Cortina, \email{hch@alum.mit.edu}
}
