Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…holds into main
  • Loading branch information
gambler1650 committed Aug 15, 2024
2 parents 98f0d53 + 45bc61f commit e66b717
Show file tree
Hide file tree
Showing 3 changed files with 600 additions and 0 deletions.
40 changes: 40 additions & 0 deletions R/second_screening_request.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
library(dplyr)
results = read.csv(here::here('data','second_screening_complete.csv'))%>%
mutate(Common.Name = tolower(Common.Name),
Priority = tolower(Priority))

results %>%
group_by(Common.Name)%>%
summarise(Count = n())

#This one w/o Salmon
spp.effect.NE = results %>%
filter(Effect.Type %in% c('Survival','Habitat','Stress') &
Priority != 'low' &
Location %in% c("Northeast US","Canada","Other") &
Common.Name != 'atlantic salmon')%>%
group_by(Common.Name, Effect.Type)%>%
summarise(Count = n())%>%
tidyr::spread('Effect.Type','Count')

# Manually remove European ones under Location = 'Other'
salmon = results %>%
filter(Effect.Type %in% c('Survival','Habitat','Stress')
& Priority == 'high'
& Location %in% c("Northeast US","Canada","Other")
& Common.Name == 'atlantic salmon')%>%
group_by(Common.Name, Effect.Type)%>%
summarise(Count = n())%>%
tidyr::spread('Effect.Type','Count')


# spp.effect.noaqua = results %>%
# filter(Effect.Type %in% c('Survival','Growth','Habitat','Reproduction','Stress') & Priority != 'low' & Application != "Aquaculture")%>%
# group_by(Common.Name, Effect.Type)%>%
# summarise(Count = n())%>%
# tidyr::spread('Effect.Type','Count')
#
# spp.priority = results %>%
# group_by(Common.Name,Priority)%>%
# summarise(Count = n())%>%
# tidyr::spread('Priority','Count')
Loading

0 comments on commit e66b717

Please sign in to comment.