Description

This code creates a graph with year on the x-axis and proportion of observations (per checklist) that are yellow warblers.

Questions:

  • Is this what you were looking for?
  • Would this be more helpful if broken down to individual solar arrays?
  • Would you like more of these for different species?
1. Load libraries
2. Inits
3. Define WI Region & Season of interest
4. Load 2023 ERD & SRD & Solar data
5. Plot proportion of checklists that observed yellow warblers
erd.yelwar = erd %>% select(checklist_id, longitude, latitude, year, yelwar)

Create tibble with number of checklists where yelwar > 0 and total number of checklists

Number of columns where yelwar > 0

I am trying to plot ratio:

number of checklists where yelwar > 0 / total number of checklists.

The total number of checklists:

total_check = length(erd.yelwar$checklist_id)

filter data so only include yelwar > 0 then group by year then calcuate proportion of yelwar > 0 per checklist per year

erd.yelwar.grtr0 = erd.yelwar %>% filter (yelwar > 0) %>% group_by(year) %>%
  mutate(prop.yelwar = length(yelwar) /total_check)
ggplot(erd.yelwar.grtr0,aes(x=year,y=prop.yelwar)) + 
  geom_point() +
  labs(x = "", title = "proportion of checklists that observed yellow warblers")

6. Plot proportion of birds per checklist that were yellow warblers

Gather in groups of species (I had to do this in chunks otherwise I got an error saying I’d max’d my vector limit) with number of detections per species per checklist.

Concatenate groups

Create tibble with proportion of yewa observations per total observations by year