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


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.


  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")



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


Includes all parks in the network


Acadia NP only


Marsh-Billings-Rockefeller NHP only


Minute Man NHP only


Morristown NHP only


Roosevelt-Vanderbilt NHS only


Saint-Gaudens NHS only


Saratoga NHP only


Weir Farm NHS only


Year to start analysis, ranging from 2006 to current year


Year to stop analysis, ranging from 2006 to current year


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


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


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


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.


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


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


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.


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.


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


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


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


live trees only


dead trees only


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


Default. Returns all species.


Returns native species only


Returns exotic species only


Returns species on the Indicator Invasive List


Allows you to filter on tree crown class


Returns all canopy positions


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


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.


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


Select whether to plot in current session or save to pdf


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


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


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.


## Not run: 

# 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 April 29, 2023, 10:36 p.m.