How it Works

Methods and Process

Linked Paper

For more of the literature and science behind the project, please check out the paper associated with this site (hyperlinked)!

Underlying Principles

The design of the site is intended to collect information about plants and the landscape for public use. Combining both, and allowing users to filter for convenience, hopefully introduces a utility that residents of the Amherst area can benefit from.

Calculations and ArcGIS

From a combination of the hydrographic and wetland layers of the Town of Amherst, a multiple-ring buffer layer was composed in ArcGIS to encompass buffers at 150, 300, and 600 feet around those features. The reasoning for the distances is partly based on a finding from the Planner’s Guide to Wetland Buffers for Local Governments (McElfish et al. 2008). Per their documentation, the effective recommended buffer for wildlife connectivity is roughly 300 feet, or 1 football field. The incremental rings of 150 and 600 were added too introduce the idea of local connectivity and proximity to wetland areas. Being closer to an area allows more interactions with that area, and illustrating that to a userbase is important to show how the environment around them interacts with their choice of plants. For visual impact, a Significant Wetland buffer around the Great Baehre Swamp was created to provide an extended range to increase resident awareness of the rare Silver-Maple Ash Swamp biome type.

The Wetland Value related to shape area for both wetland and hydrologic shapefiles was decided by taking the log of the area, dividing by 2 and rounding it to the nearest whole number. This allowed some level of relation of wetland size to native species hosting capacity. The buffer rings for Significant Wetland were given values of 4, 3, and 2 for 150, 300, and 600 feet from the center shapes respectively. The Hydrology layer’s buffers had values of 3, 2, and 1. Using ArcGIS Pro’s union function, the shapefiles were added and the resultant values tallied. This layer was union joined to the Soil Survey Geographic Database (SSURGO) file so soil name and hydric type could be included in the web map, making smaller sections for more accurate information about a user’s site.

Plant Database

The plants data in this project is currently a product of David Werier and the New York Flora Association, who allowed permission of its use in this project. Plants therein are those documented by NYFA in their Atlas project as native to Erie County, albeit acknowledging that their list is not complete. The list of plants has the fields of scientific name, common name,family, genus, species, infraspecies, Coefficient of Conservatism, State Status, National Wetland Plant List code for Northcentral and Northeast, State Rank, Global Rank, Habitat, Growth Habit, and Duration.

Data Management in R

The shapefiles within this project are from the Town of Amherst’s GIS division, Soil Survey Geographic Database (SSURGO), and from the New York Natural Heritage Program(NYNHP). The plant data is divided into the above categories, but also must be split due to New York laws about threatened, endangered and rare species. It is forbidden to cause any bother or harm to these species, and so their data must be removed.

Libraries

Code
library(tidyverse)
library(leaflet)
library(kableExtra)
library(htmlwidgets)
library(widgetframe)
library(dplyr)
library(reactable)
library(crosstalk)
library(sf)
library(mapview)
library(leafem)
library(terra)
knitr::opts_chunk$set(widgetframe_widgets_dir = 'widgets' ) 
knitr::opts_chunk$set(cache=FALSE)  # cached results off


plant_data <- read.csv("data/Copy_NYFA_Erie_Native_pared.csv")
#Downloading data

It is necessary to download several libraries to allow their use in the website construction.

This first section of code divides the plant data based on rarity status. Extirpated plants should be removed as well.

Code
plant_data <- plant_data %>%
  filter(plant_data[,14] != "SX")
         
common_plants <- plant_data %>%
  filter(!(plant_data[,12] %in% c("Endangered-State", "Threatened-State", "Rare-State")))
#first filter for non-threatened data

threatened_plants <- plant_data %>%
  filter(plant_data[,12] %in% c("Endangered-State", "Threatened-State", "Rare-State"))
#second filter for threatened plant species

Now we have a list of common plants we can export to csv.

Code
write.csv(common_plants,"data/common_plants.csv", row.names = FALSE)

We also need to alter the new csv to make filtering possible.

Code
native_plants <- read.csv("data/common_plants.csv")

native2 <- native_plants[,c("Scientific_Name", "Common_Name", "CoC", "nwpl_ncne", "Growth_Habit", "Duration")]

#Fewer columns, edit the col names so it's more clear what each refers to

native2 <- native2 %>%
  rename(
    `Scientific Name` = Scientific_Name,
    Common = Common_Name,
    Difficulty = CoC,
    `Wetland Status` = nwpl_ncne,
    `Growth Habit` = Growth_Habit,
    Duration = Duration
  )

# Normalize and Un-nest the Growth Habit data 
native2_cleaned <- native2 %>%
  # Split cells with multiple values into separate rows
  separate_rows(`Growth Habit`, sep = ",|;\\s*") %>% 
  # Clean up whitespace/case again after splitting
  mutate(
    `Growth Habit` = str_trim(`Growth Habit`),
    `Growth Habit` = str_to_title(`Growth Habit`)
  ) %>%
  # Remove rows that ended up blank after the split/trim
  filter(!is.na(`Growth Habit`), `Growth Habit` != "")
  
write_csv(native2_cleaned, "data/native2_cleaned.csv")

We can call the cleaned csv on the other page.

Calling Data

Layer files from the project are transformed into geojson for call expediency and ease of display.

Code
ditches <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=1SLCufnLDpR4bEJeUB1usJ2OFzBlWXtEY&export=download")
town_bound <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=1WScoYQWLa9_jaobUhm-0xcf1MtTaqoE6&export=download")
state_wetld <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=1uS0oYTaWLGhwGyYHnhkBxn8RZRlwNFkk&export=download")
#Wetland makes up 20.2228% of area of Amherst NY
soils_C <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=1zItxfisuLYZP6ZhnyUzMGH80UShGLAUQ&export=download")
nysnh_cl <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=1Mjfgt23T8KmxcY5OzBJ0DZ4dgW2jnoHd&export=download")
hydro_cl <- read_sf("https://drive.usercontent.google.com/u/0/uc?id=13OIxXMGIlrMYLmIUJuhU8ElM9Dpkoz11&export=download")
wetldsum <- rast("data/WtldSumVal1_8.tif")

town_bound <- st_transform(town_bound, crs = 4326)
state_wetld <- st_transform(state_wetld, crs = 4326)
soils_C <- st_transform(soils_C, crs = 4326)
ditches <- st_transform(ditches, crs = 4326)
nysnh_cl <- st_transform(nysnh_cl, crs = 4326)
hydro_cl <- st_transform(hydro_cl, crs = 4326)
wetldsum <- project(wetldsum, "EPSG:4326")

soil_names <- (unique(soils_C$SOIL_NAME))
wetldsumpal <- colorNumeric(palette = "viridis", domain = values(wetldsum), na.color = "transparent")
soils_pal <- colorFactor(palette = "turbo", domain = soil_names, na.color = "transparent")

The second half of this code block focuses on projection and the creation of palettes for the display of various layers, both shapefile and raster(image).

Display

The following is the first iteration of code for a map of wetland proximity.

Code
m <- leaflet(town_bound) %>%
  addTiles() %>% # Add a default base layer
  addPolygons(data = town_bound, group = "Amherst Boundary", stroke = TRUE, color = "black", fill = FALSE, weight = 3) %>%
    addPolygons(data = state_wetld, group = "State Wetland", color = "gray", weight = 1, fillOpacity = 0.5, fillColor = "green") %>%
  addPolygons(data = soils_C, group = "Soil Types", color = "gray", weight = 1, fillOpacity = 0.5, fillColor = ~soils_pal(SOIL_NAME), label = ~SOIL_NAME,
    highlightOptions = highlightOptions(weight = 3, color = "white", bringToFront = FALSE)) %>%
  addPolygons(data = nysnh_cl, group = "Significant Wetland", color = "gray", weight = 1, fillOpacity = 0.5, fillColor = "yellow") %>%
  addPolygons(data = hydro_cl, group = "Hydrology", color = "gray", weight = 1, fillOpacity = 0.5, fillColor = "blue") %>%

  addRasterImage(wetldsum, group = "Wetland Proximity Values", colors = wetldsumpal, opacity = 0.8) %>%
  
  addLegend(pal = wetldsumpal, values = values(wetldsum), title = "Wetland Proximity values", opacity = 1) %>%

  addLayersControl(
    baseGroups = c("OSM (default)"),
    overlayGroups = c("Amherst Boundary", "State Wetland", "Soil Types", "Significant Wetland", "Hydrology", "Ditches", "Wetland Proximity Values"),
    options = layersControlOptions(collapsed = FALSE)
  )

m

Sources and Retrieval

The data and files used in the creation of this site are listed in the following table, along with their date of last update and retrieval for use in the project. Citiations for the paper are contained in the paper.

Table Updated May 8th 2026
Name(s) of Data Used Published or Authored Date Accessed Most Recent Source Change or Publication Date
New York Flora Atlas New York Flora Association June 4th 2025 April 27th 2025
Town Boundary, Hydrography, State Informational Wetlands, Soils (SSURGO), Ditches Official Town of Amherst Map: Town of Amherst GIS June 8th 2025 November 14th 2025
Planner’s Guide to Wetland Buffers for Local Governments McElfish et al., Environmental Law Institute,
ISBN 978-1-58576-137-1
July 12th 2025 Published March 2008
2022 National Wetland Plant List, version 3.6 U.S. Army Corps of Engineers August 16th 2025 January 20th 2023
Natural Heritage Communities New York State Department of Environmental Conservation August 16th 2025 February 11th 2026
New York Protected Areas Database New York Natural Heritage Program August 12th 2025 2023 (shapefile date)
Online Conservation Guide for Silver maple-ash swamp New York Natural Heritage Program August 13th 2025 December 26th 2024
crosstalk: Inter-Widget Interactivity for HTML Widgets Joe Cheng & Carson Sievert 2025 March 9th 2026