Downloads data from CWFIS Datamart at http://cwfis.cfs.nrcan.gc.ca/datamart. This runs prepInputs internally, so use can pass studyArea etc.

prepFireCanada(
  year,
  type = c("NBAC", "Polygon", "Point"),
  urlBase = "http://cwfis.cfs.nrcan.gc.ca/downloads/nbac/",
  ...
)

Arguments

year

Numeric, length 1. Which year, from 1986 to 2018 (currently) to download

type

Either "NBAC", "Polygon" or "Point" to get the National Burn Area Composite, the Polygon or the Point datasets.

urlBase

The url of the directory where the NBAC are stored. Default is the currently known url. If this url becomes stale, please notify the predictive ecology team.

...

Additional arguments.

Value

A SpatialPolygonsDataFrame plus several downloaded files, including the .zip archive and the extracted files. Because it is running prepInputs, checksumming is occurring too.

Examples

if (FALSE) {
  # This will download 2 recent years
  library(sf)
  NBAC <- lapply(2016:2017, function(yr) a <- prepFireCanada(yr))
  Points <- prepFireCanada(yr, type = "Points", fun = "st_read")
  Polygons <- prepFireCanada(yr, type = "Polygons")
}