getFireHydro: Generate fire-hydro shapefile

View source: R/getFireHydro.R

getFireHydroR Documentation

Generate fire-hydro shapefile

Description

Generates shapefile showing fire potential. Presently only works on the SFNRC network (for EDEN data access)

Usage

getFireHydro(
  EDEN_date,
  output_shapefile = NULL,
  waterLevelExport = NULL,
  fireSpreadExport = NULL,
  csvExport = NULL,
  EDEN_GIS_directory = "detect",
  vegetation_shp = fireHydro::vegetation,
  BICY_EVER_PlanningUnits_shp = fireHydro::BICY_EVER_PlanningUnits,
  returnShp = TRUE,
  figureWidth = 6.5,
  figureHeight = 4,
  ggBaseSize = 12,
  burnHist = TRUE,
  burnData = list(fireHydro::fire192, fire_2020_cy, rbind(fire_2021_cy, fire_2022_cy))
)

Arguments

EDEN_date

EDEN date to be used for water levels. Should be a character or date class in format YYYY-MM-DD, e.g., "2018-10-18"

output_shapefile

file address for shapefile output. Driver is inferred from file extnesion, so may not be correct. In this case, user can export shapefile after generating the sf object through getFireHydro().

waterLevelExport

NULL or a character vector specifying the file address/name used for exporting an image file of water level categories (e.g., /home/waterLevels.pdf).

fireSpreadExport

NULL or a character vector specifying the file address/name used for exporting an image file of fire spread risk (e.g., /home/fireSpreadRisk.pdf).

csvExport

If an exported .csv file of the output is desired, include a file addess/name here (e.g., "fireHydroOutput.csv")

EDEN_GIS_directory

The source for EDEN data. Can be an sf object already in the working environment (such as the data output from getEDEN) or, for users with access to the SFNRC's physical drive, the default value ("detect") will identify the parent directory where EDEN water level data are located ("/opt/physical/gis/eden/" on linux; "Y:/gis/eden/" on Windows). This can alternatively be the specific address of a shapefile of EDEN data or a character string naming an object in the working environment, such as that generated from getEDEN().

vegetation_shp

shapefile of vegetation data in Big Cypress and Everglades

BICY_EVER_PlanningUnits_shp

shapefile of polygons representing Big Cypress and Everglades planning units

returnShp

TRUE/FALSE determinant of whether output is returned to the working environment

figureWidth

width of output figure, in inches

figureHeight

height of output figure, in inches

ggBaseSize

base_size argument passed to ggplot theme.

burnHist

logical; if FALSE, fire spread risk is a binary variable (high/low); if TRUE, fire history during the preceding three years is used to split fire spread risk into a gradient of risk: High = high current fire spread risk and no burn history in past 3 years; Moderately High = high current fire spread risk and burned three years ago; Moderate = high current fire spread risk and burned two years ago; Moderately Low = high current fire spread risk and burned in the past year; Low = low current fire spread risk (regardless of burn history)

burnData

list with three elements: simple feature polygon files with burn history data. Data must be in ascending chronological order; this will be used to parse areas of high fire spread risk into finer categories.

Value

sf

Examples


## Not run: 

# produce maps with the most recent EDEN data
EDENdat <- getEDEN()
fireDat <- getFireHydro(EDEN_date = EDENdat$date, 
     EDEN_GIS_directory = EDENdat$data,
     fireSpreadExport = paste0("fireRisk_", EDENdat$date, ".png"), 
     waterLevelExport = paste0("waterLevels_", EDENdat$date, ".png"))

### some more examples:
getFireHydro(EDEN_date = "2018-10-18",
     fireSpreadExport = "fireRisk.png", waterLevelExport = "waterLevels.png")

# save output in multiple file types (and exclude burn history)
getFireHydro(EDEN_date = "2018-10-18", 
     burnHist = FALSE,
     fireSpreadExport = c("fireRisk.png", "fireRisk.pdf"))
     
# incorportate burn history to fire spread risk maps
getFireHydro(EDEN_date = "2018-10-18", 
     fireSpreadExport = c("fireRisk.png", "fireRisk.pdf"))


## End(Not run)


troyhill/fireHydro documentation built on Feb. 2, 2023, 12:09 p.m.