Where are bee colonies experiencing the highest percentage of losses in the United States? ## Plot Data
plot_data <- data %>%
group_by(year, state) %>%
summarise(avg_pct = mean(colony_lost_pct, na.rm = TRUE)) %>%
filter(year == 2021) %>%
arrange(-avg_pct) %>%
slice(1:10)
## `summarise()` has regrouped the output.
## ℹ Summaries were computed grouped by year and state.
## ℹ Output is grouped by year.
## ℹ Use `summarise(.groups = "drop_last")` to silence this message.
## ℹ Use `summarise(.by = c(year, state))` for per-operation grouping
## (`?dplyr::dplyr_by`) instead.
plot_data %>%
ggplot(aes(x = avg_pct,
y = fct_reorder(state, avg_pct))) +
geom_col() +
labs(
title = "States with the Highest Bee Colony Losses",
x = "Average Percentage of Bee Colonies Lost",
y = "State"
)
## Interpret The graph shows the 10 states with the highest average
percentage of bee colony losses in 2021. The state with the highest
percentage experienced the greatest bee colony losses. This suggests
that bee colonies are more endangered in states with higher colony loss
percentages. These results help identify which states may need more
attention and protection for their bee populations. ## R Markdown