data <- read_excel(here::here("./notebooks/MBFI EXT 28 Keep Grazing Data 2019.xlsx"), sheet = 1) %>%
mutate_all(~str_replace(., "<1", "0.1")) %>%
mutate(across(everything(), ~replace_na(.x, "0"))) %>%
mutate(across(`Poa pratensis`: `Phragmites australis`, ~as.numeric(.x))) %>%
mutate(Plot = case_when(Plot == "High Density" ~ "High Graze",
Plot == "Low Density" ~ "Regular Graze",
TRUE ~ Plot)) %>%
mutate(`Area in landscape` = case_when(`Area in landscape` == "Upland" ~ "Upper",
`Area in landscape` == "Midland" ~ "Middle",
`Area in landscape` == "Lowland" ~ "Lower")) %>%
pivot_longer(cols = `Poa pratensis`: `Phragmites australis`, names_to = "Plant", values_to = "Cover (%)") %>%
mutate(location = paste(Plot, `Area in landscape`, sep= "-")) %>%
mutate(total = sum(`Cover (%)`), .by = "Plant") %>%
filter(total > 0) %>%
arrange(total) %>%
mutate(Plant = factor(Plant, level = unique(Plant)))