knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

STRIPS2veg

Lifecycle: maturing

Overview

STRIPS2veg is an R package that houses data from Lydia English's Masters Thesis at Iowa State Univeristy. The data in STRIPS2veg consist of vegetation information from surveys conducted in the summers of 2018 and 2019 on farms across the state of Iowa that have installed prairie strips.

You may be asking...what are prairie strips?

Lydia English. Montgomery County, Iowa

Prairie strips are a farming conservation practice whereby native, prairie habitat is planted within or at the edge of crop fields. By incorporating the deep roots and stiff stems of native prairie vegetation, prairie strips not only provide increased water infiltration, erosion control, and nutrient export from fields, but they also provide Iowa with much needed habitat for pollinators, birds, and other native taxa. To find out more information about the project and see to updates, check out the website.

Summary of Package Contents

This package currently contains 5 datasets:

i. all_site_info contains general information about each site visited throughout the study period. ii. strips contains the ID, area, and perimeter of all strips in a site iii. quadrats contains the ID and anonymized location of all quadrats (sampling points) visited in a site. iv. vegetation contains the cover data (abundance information) recorded at every quadrat in every site. v. species_list contains taxonomic and life-history information for all the plant species found throughout the study.

Each of the dataframes can accessed by utilizing the data() call after loading the library. More detailed annotationed can be found in the help pages (ex: ?species_list)

library(STRIPS2veg)
data("vegetation")
head(vegetation)

Installation

You can install the development version of STRIPS2veg from GitHub with:

# install.packages("remotes")
remotes::install_github("lydiaPenglish/STRIPSveg")

Example

Making a summary plot

Here is an example of how to calculate the relative cover (pi) of each species at every site in 2019.

library(STRIPS2veg)
library(dplyr)
library(ggplot2)
data("vegetation")

pi_2019 <- vegetation %>%
  filter(year == "2019") %>%
  # Recoding our cover classes into midpoint values
  mutate(midpoint = dplyr::recode(cover, 
                                  '<1' = "0.5",
                                  '1-5' = "3",
                                  '5-25' = "15", 
                                  '25-50' = "37.5",
                                  '50-75' = "62.5", 
                                  '75-95' = "85", 
                                  '>95' = "97.5"),
         midpoint = as.numeric(as.character(midpoint))) %>%
  group_by(siteID, speciesID) %>%
  # Calculating total values of cover for each species at each site
  summarize(spp_cover = sum(midpoint)) %>%
  group_by(siteID) %>%
  # calculating total cover (all species in a site)
  mutate(total_cover = sum(spp_cover),
         # pi = the proportion of the total cover that is attributed by each species
         pi         = spp_cover/total_cover) %>%
  ungroup()

pi_2019

The relative cover (pi) standardizes all the absolute cover values to 1, with the result that it becomes easier to compare across sites that may vary in their absolute abundances.

We can now join this dataframe with our species list and summarize by total pi by functional group

data("species_list")

site_pi <- pi_2019 %>%
  left_join(., species_list, by = "speciesID") %>%
  group_by(siteID, group_simple) %>%
  summarize(grp_pi = sum(pi)) %>%
  # filter out the NAs, which were "unknown" plants that were never identified 
  filter(!(is.na(group_simple))) %>%
  ungroup()

site_pi

Lastly, we can make a graph of the pi of different functional groups by sites to get an idea how sites vary in their cover of different vegetation groups (i.e. target and non-target). In order to beautify this plot we will need to go through a few extra steps...

# ordering sites by relative cover of prairie grasses instead of alphabetically 
ord <- site_pi %>% 
  filter(group_simple == "prairie grass") %>% 
  arrange(desc(grp_pi)) %>% 
  magrittr::extract2("siteID")

# colors for the different functional groups
mycols <- c("#666666", "#B15928",  "#FFFF99", "#FDBF6F", "#B2DF8A", "#33A02C")

site_pi %>%
  mutate(siteID = factor(siteID, ord)) %>%
  ggplot(aes(siteID, grp_pi))+
  geom_col(aes(fill = factor(group_simple, 
                             levels = c("other", "woody", "weedy forb", 
                                        "weedy grass", "prairie forb",
                                        "prairie grass"))))+
  scale_fill_manual(values = mycols)+
  labs(fill = "Vegetation type",
       x = NULL,
       y = "Relative cover (pi)")+
  theme_bw()+
  theme(axis.text.x = element_blank())

Looks like some sites have nice cover of the target vegetation (prairie grasses and forbs - green bars) while other sites are dominated by non-target vegetation (weedy grasses and forbs - yellow and orange bars). Lydia's Masters thesis attempted to understand what factors were driving this variation.



lydiaPenglish/STRIPS2veg documentation built on June 9, 2020, 10:16 a.m.