plotTreeMap: plotTreeMap: creates plot of trees by status and size

View source: R/plotTreeMap.R

plotTreeMapR Documentation

plotTreeMap: creates plot of trees by status and size

Description

This function converts tree distance and azimuth values to coordinates and plots the coordinates of live, dead, or excluded trees. Trees are color coded by status, and size is relative to DBH. Note that if multiple visits for a given plot are included in the function argument, only the most recent visit will be plotted. Therefore this function is best used on 1 to 4 year periods. Note that QA/QC events are not plotted with this function. Excluded trees are plotted with 10 cm DBH assigned, as these don't get a DBH measurement when excluded.

Usage

plotTreeMap(
  park = "all",
  from = 2006,
  to = as.numeric(format(Sys.Date(), "%Y")),
  locType = c("VS", "all"),
  panels = 1:4,
  eventType = c("complete", "all"),
  dist_m = NA,
  status = c("all", "active", "live", "dead"),
  speciesType = c("all", "native", "exotic", "invasive"),
  canopyPosition = c("all", "canopy"),
  plotName = NA,
  path = NA,
  output_to = c("view", "file")
)

Arguments

park

Combine data from all parks or one or more parks at a time. Valid inputs:

"all"

Includes all parks in the network

"ACAD"

Acadia NP only

"MABI"

Marsh-Billings-Rockefeller NHP only

"MIMA"

Minute Man NHP only

"MORR"

Morristown NHP only

"ROVA"

Roosevelt-Vanderbilt NHS only

"SAGA"

Saint-Gaudens NHS only

"SARA"

Saratoga NHP only

"WEFA"

Weir Farm NHS only

from

Year to start analysis, ranging from 2006 to current year

to

Year to stop analysis, ranging from 2006 to current year

locType

Allows you to only include plots that are part of the GRTS sample design or include all plots, such as deer exclosures

"VS"

Only include plots that are part of the Vital Signs GRTS sample design

"all"

Include all plots, such as plots in deer exclosures or test plots.

panels

Allows you to select individual panels from 1 to 4. Default is all 4 panels (1:4). If more than one panel is selected, specify by c(1, 3), for example.

eventType

Allows you to include only complete sampling events or all sampling events

"complete"

Default. Only include sampling events for a plot that are complete.

"all

Include all plot events with a record in tblCOMN.Event, including plots missing most of the data associated with that event (eg ACAD-029.2010). This feature is currently hard-coded in the function.

dist_m

Filter trees by a distance that is less than or equal to the specified distance in meters of the tree to the center of the plot. If no distance is specified, then all trees will be selected. For example, to select an area of trees that is 100 square meters in area, use a distance of 5.64m.

status

Filter by live, dead, or all. Acceptable options are:

"all"

Default. Includes all trees with any status, including excluded or missing.

"active"

Includes all trees with an active monitoring status, including "DF".

"live"

live trees only

"dead"

dead trees only

speciesType

Allows you to filter on native, exotic or include all species.

"all"

Default. Returns all species.

"native"

Returns native species only

"exotic"

Returns exotic species only

"invasive"

Returns species on the Indicator Invasive List

canopyPosition

Allows you to filter on tree crown class

"all"

Returns all canopy positions

"canopy"

Returns only dominant, codominant, and intermediate crown classes. Since only live trees are assigned crown classes, this also only returns live trees.

plotName

Allows you to select a specific plot to run function for. Value inputs are "PARK-###", like "ACAD-001". If no plot name is specified, then function will save a tree map for each plot that matches the function arguments. Function only set up to handle 1 plotName specified at a time. If you want to save more, leave this argument blank and select plots based on other arguments in function. Note that function runs faster if you specify the park along with the plot name.

path

Quoted path to save plots to. Required if output_to = 'file'

output_to

Select whether to plot in current session or save to pdf

"file"

Saves individual plots to pdf. Must also specify a path to save plots to.

"view"

Default. Plot in current R session. Note that this may be slow if multiple plots are included in the function arguments.

Value

Returns a map of trees on a given plot. Trees are color coded by status, with AB= Alive Broken, AF= Alive Fallen, AL= Alive Leaning, AS= Alive Standing, DB= Dead Broken, DL= Dead Leaning, and DS= Dead Standing. The size of the circle is relative to the DBH of the tree. The plot is relative to the plot Orientation, which is North (360 degrees) on flat lands, and upslope on slopes.

Examples

## Not run: 
importData()

# make map for single plot
plotTreeMap(park = "MABI", from = 2016, to = 2019, plotName = "MABI-001")

# save pdfs of maps for panel 3
plotTreeMap(from = 2016, to = 2019, panels = 3, output_to = "file", path = "C:/Temp")

## End(Not run)


KateMMiller/forestNETN documentation built on March 8, 2024, 4:19 a.m.