Threatened Plants #TidyTuesday
It’s Tidy Tuesday!! This week the focus is threatened and extinct plants. Certainly an issue worth thinking about. I’m a bit of a plant person, but really who isn’t? Let’s dive in!
#libraries
library(tidyverse)
library(tidytuesdayR)
library(skimr)
library(tidytext)
#load data
tuesdata <- tidytuesdayR::tt_load(2020, week = 34)
##
## Downloading file 1 of 3: `plants.csv`
## Downloading file 2 of 3: `threats.csv`
## Downloading file 3 of 3: `actions.csv`
plants <- tuesdata$plants
threats <- tuesdata$threats
actions <- tuesdata$actions
threat_filtered <- threats %>%
filter(threatened == 1)
action_filtered <- actions %>%
filter(action_taken == 1)
threat_filtered %>%
count(continent, group, threat_type) %>%
ggplot(aes(y = tidytext::reorder_within(threat_type, n, continent), x = n, fill = group)) +
geom_col() +
tidytext::scale_y_reordered() +
facet_wrap(~continent, scales = "free", ncol = 2)
action_filtered %>%
count(continent, group, action_type) %>%
ggplot(aes(y = tidytext::reorder_within(action_type, n, continent), x = n, fill = group)) +
geom_col() +
tidytext::scale_y_reordered() +
facet_wrap(~continent, scales = "free", ncol = 2)
Some interesting data. I wonder, could see improvement in the status of the plant after an intervention, and are some threats are easy to mitigate while others can’t be stopped?
The year_last_seen
column is seperated into 20-year chunks and the red_list_caregory
has two options, “Extinct”, or “Extinct in the Wild”. I guess a successful re-introduction would be represented by a change from “Extinct in the Wild” to off of the list…but let’s see if that’s actually what’s in the data.
actions_change <- action_filtered %>%
select(c(binomial_name, year_last_seen, red_list_category, action_type)) %>%
mutate(date = case_when(year_last_seen == "2000-2020" ~ "2020", year_last_seen == "1980-1999" ~ "1999", year_last_seen == "1960-1979" ~ "1979", year_last_seen == "1940-1959" ~ "1959", year_last_seen == "1920-1939" ~ "1939", year_last_seen == "1900-1919" ~ "1919", year_last_seen == "Before 1900" ~ "1900", T ~ "NA"))
most_listed <- actions_change %>%
count(binomial_name) %>%
filter(n >= 2)
most_changes <- actions_change %>%
filter(binomial_name %in% most_listed$binomial_name)