Introduction

Introduction This project uses data from eBird to explore the observation records of Owls that were reported in Bayfield County Wisconsin. The eBird dataset has observation reports going back to the 1940’s. This project focuses on three main questions.

1-Which owls have been observed in Bayfield County from 2002-2024

2-Which months have the most records of each owl species?

3-Is there a trend in observations reported for years from 2002-2024? #All About Birds

Barred Owl and Discover Birds Here

Data Sources: All of the data used for this assignment was downloaded and filtered directly from eBird (Sullivan et al. 2009).

“eBird data are a powerful resource for a wide range of scientific questions. By building tools that engage the global birding community, eBird gathers unprecedented volumes of information on where and when birds occur at high spatial and temporal resolutions. When combined and analyzed appropriately, these data enable next generation visualizations of migration and abundance that inform novel conservation actions”(Sullivan et al. 2009).

(https://science.ebird.org/en/use-ebird-data)

Load Libraries

library(here)
library(janitor)
library(skimr)
library(ggbeeswarm)
library(ggplot2)
library(dplyr)
library(readr)
library(lubridate)
library(stringr)

Data Cleanup

### Clean eBird using %/%
eBird<- read_csv(here("data","myowndata","ebird2024.csv"))


# Clean column names and select specific columns
eBird_clean <- eBird %>%
  clean_names() %>%
  select(-has_media, -bcr_code, -behavior_code)

# Display column names of the cleaned dataframe
names(eBird_clean)
##  [1] "global_unique_identifier"   "last_edited_date"          
##  [3] "taxonomic_order"            "category"                  
##  [5] "taxon_concept_id"           "common_name"               
##  [7] "scientific_name"            "subspecies_common_name"    
##  [9] "subspecies_scientific_name" "exotic_code"               
## [11] "observation_count"          "breeding_code"             
## [13] "breeding_category"          "age_sex"                   
## [15] "country"                    "country_code"              
## [17] "state"                      "state_code"                
## [19] "county"                     "county_code"               
## [21] "iba_code"                   "usfws_code"                
## [23] "atlas_block"                "locality"                  
## [25] "locality_id"                "locality_type"             
## [27] "latitude"                   "longitude"                 
## [29] "observation_date"           "time_observations_started" 
## [31] "observer_id"                "sampling_event_identifier" 
## [33] "protocol_type"              "protocol_code"             
## [35] "project_code"               "duration_minutes"          
## [37] "effort_distance_km"         "effort_area_ha"            
## [39] "number_observers"           "all_species_reported"      
## [41] "group_identifier"           "approved"                  
## [43] "reviewed"                   "reason"                    
## [45] "trip_comments"              "species_comments"

Creating a dataset for only Owls

The eBird Data for Bayfield County Contained 451, 701 records, 2503 records were data pertaining to owls.

#filtering on the owls and remving the Helmeted Guineafowl my filtering picks up this bird.
owl_data <- eBird_clean %>%
  filter(grepl("Owl$", common_name, ignore.case = TRUE)) %>%
  filter(!common_name %in% c("Helmeted Guineafowl")) %>%
  mutate(
    observation_date = mdy(observation_date),  # Convert observation_date to Date format
    year = year(observation_date),
    month = month(observation_date, label = TRUE, abbr = TRUE),  # Extract month name abbreviation
    common_name = str_replace_all(common_name, "-?Owl$", "")  # Remove "Owl" or "-Owl" suffix
  ) %>%
  filter(year > 2001)

#Creating a dataset for Owls by month

## owl common name counts by Month--adding a new column "count"
owl_count_month <- owl_data %>%
  count(month, common_name, name = "record_count") %>%
  arrange(month, common_name) %>%
  group_by(month, common_name) %>%
  summarise(total_record_count = sum(record_count))
## `summarise()` has grouped output by 'month'. You can override using the
## `.groups` argument.
glimpse(owl_count_month)
## Rows: 61
## Columns: 3
## Groups: month [12]
## $ month              <ord> Jan, Jan, Jan, Jan, Feb, Feb, Feb, Feb, Feb, Mar, M…
## $ common_name        <chr> "Barred ", "Great Horned ", "Northern Saw-whet ", "…
## $ total_record_count <int> 33, 25, 10, 63, 55, 8, 32, 46, 19, 103, 8, 44, 1, 1…

#Plot

# Plot Month that owls have been observed and exporting the plot to .jpg--
owl_count_month %>%
  ggplot(aes(x = common_name, y = month, colour = common_name)) +
  geom_point()+
  labs(title = "Months Owls have been Observed", x = "Month", y = "Common Name") +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle = 75, hjust = 1)  # Rotate x-axis labels
  ) +
  scale_colour_discrete(name = "Common Name") +
  scale_y_discrete(labels = toupper)  # Capitalize common names in the legend

Chart showing each month that a owl observation was reported.

#Total Recored Count by Month

owl_count_month %>%
  na.omit() %>%
  ggplot(aes(x = total_record_count, y = as.factor(month))) +
  geom_violin() +
  geom_quasirandom(aes(colour = common_name)) +
  ggtitle("Total Record Count Per Month by Owl") +
  scale_colour_discrete(name = "Common Name") +
  scale_y_discrete(labels=toupper)+
  xlab("Total Record Count")+
  ylab("Month")

Violin plot which is not super useful for this data, but still kind of fun.

#Total Observations per Month of Each Species
owl_summary <- owl_count_month %>%
  group_by(common_name, month) %>%
  summarise(total_observations = sum(total_record_count, na.rm = TRUE)) %>%
  ungroup()

#Plot of Observations Per/Month

#Facet Bar Chart of Total Observations Per Month
ggplot(owl_summary, aes(x = common_name, y = total_observations, fill = common_name)) +
  geom_col() +
  ggtitle("Total Observations Per Month by Owl") +
  scale_fill_discrete(name=NULL) + #Removes the "common_name" text above species on Right
  scale_y_discrete(labels = toupper) +
  xlab("Common Name") +
  ylab("Total Observations") + 
  geom_text(aes(label = total_observations), vjust = -0.5, size = 3) + # Add text labels
facet_wrap(~ month)+
  theme(axis.text.x = element_text(angle=70,hjust = 1))

Faceted Bar Char showing the total reported counts of each species for each month.

# Find the month with the maximum observations for each owl species
max_observations <- owl_summary %>%
  group_by(common_name) %>%
  slice(which.max(total_observations)) #slice (dplyr package) selects specific data in this case Max

#Plot
      ggplot(max_observations, aes(x = common_name, y = as.factor(month), fill = common_name)) +
      geom_col() +
      geom_text(aes(label = total_observations), vjust = -0.5, size = 3, colour = "black") +  # Ensure text labels are black
      ggtitle("Maximum Observations of Species per Month") +
      xlab("Common Name") +
      ylab("Month") +
      theme_minimal() +
      theme(
        axis.text.x = element_text(angle = 70, hjust = 1),
        legend.title = element_blank()  # Ensure the legend title is clear
      ) +
      scale_fill_discrete(name = "Common Name")

This bar chart show the month whith the most recorded observations for each spcies.

#Owl Counts Per/Month

#Owls Count By Year
owl_data_Count_Year <- owl_data %>%
      count(year, common_name, name = "record_count") %>%
      group_by(year, common_name) %>%
      summarise(total_record_count = sum(record_count))
glimpse(owl_data_Count_Year) 
## Rows: 92
## Columns: 3
## Groups: year [22]
## $ year               <dbl> 2003, 2004, 2005, 2005, 2005, 2006, 2006, 2006, 200…
## $ common_name        <chr> "Barred ", "Great Horned ", "Barred ", "Great Horne…
## $ total_record_count <int> 1, 1, 1, 3, 8, 2, 1, 2, 1, 19, 1, 1, 19, 3, 10, 9, …
# Create the scatter plot
ggplot(owl_data_Count_Year, aes(x = year, y = total_record_count, color = common_name)) +
  geom_point(size = 3) +
  geom_smooth(method = "loess", se = FALSE) +
  ggtitle("Owl Species Record Counts Over Time") +
  xlab("Year") +
  ylab("Total Record Count") +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle = 45, hjust = 1),
    legend.title = element_blank())

ggsave(here("Owl_Data_Count_Year.jpg"))

This chart shows the trend of reporting observations for each species.

Results

1-Which owls have been observed in Bayfield County from 2002-2024?

Notable Findings • Barred, Eastern Screech, Great Horned, Long Eared, Short-Eared, Northern Saw-Whet, and Snowy Owl were observed in Bayfield County WI

2-Which months have the most records of each owl species? Notable Findings:

• Barred, Eastern Screech, and Great Horned owls all have the most observations being reported in the month of May.

3-Is there a trend in observations reported for years from 2002-2024? Notable Per-Species Trends:

• Barred Owl (Red): The smooth line shows a steady increase in sightings over the years, suggesting a positive trend in the population or increased recording. • Great Horned Owl (Green): This line shows an upward trend, though less steep than the Barred Owl. • Snowy Owl (Pink): There is an upward trend, indicating an increase in sightings over time.

References

Sullivan, Brian L, Christopher L Wood, Marshall J Iliff, Rick E Bonney, Daniel Fink, and Steve Kelling. 2009. “eBird: A Citizen-Based Bird Observation Network in the Biological Sciences.” Biological Conservation 142: 2282–92.