lizzieinvancouver / grephon

0 stars 1 forks source link

Look at species #9

Closed lizzieinvancouver closed 1 week ago

lizzieinvancouver commented 1 year ago

Make a script to pull out all the species from the species columns and check for any trends in any/all of the following:

i) How diverse or not the species studied to date are.

ii) Which species are studied more than others?

iii) Which species show trends versus which do not?

iv) Any useful ways to categorize species (Grime CSR, functional type, freeze tolerance, shade tolerance) etc..

AileneKane commented 11 months ago

I started looking at this and put some plots here https://github.com/lizzieinvancouver/grephon/tree/main/figures via this commit. I didn't spot any clear patterns across species but let me know if you have ideas for other plots to make!

AileneKane commented 11 months ago

@AileneKane will add plots that 1) break up the species by continent; 2) add a plot that shows results within paper (not studies); and 3) ask Freddie about indeterminate vs determinate growth for each species.

FrederikBaumgarten commented 11 months ago

@AileneKane will add plots that 1) break up the species by continent; 2) add a plot that shows results within paper (not studies); and 3) ask Freddie about indeterminate vs determinate growth for each species.

I am still waiting for some library loans from some old literature that might be helpful for that...just so you know...

lizzieinvancouver commented 10 months ago

@AileneKane I am working on integrating your species cleaning code and getting these warnings:

> #Pull out the species and genera to do answer the questions
> spd2<-spd %>%
+   separate(species_list,c("sp1","sp2","sp3","sp4","sp5","sp6","sp7","sp8","sp9","sp10"),", ")
Warning message:
Expected 10 pieces. Missing pieces filled with `NA` in 47 rows [3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 28, ...]. 
> gen1<-spd2 %>%
+   separate(sp1,c("gen1","spe1")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen2<-gen1 %>%
+   separate(sp2,c("gen2","spe2")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen3<-gen2 %>%
+   separate(sp3,c("gen3","spe3")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen4<-gen3 %>%
+   separate(sp4,c("gen4","spe4")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen5<-gen4 %>%
+   separate(sp5,c("gen5","spe5")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen6<-gen5 %>%
+   separate(sp6,c("gen6","spe6")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen7<-gen6 %>%
+   separate(sp7,c("gen7","spe7")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 2 rows [46, 47]. 
> gen8<-gen7 %>%
+   separate(sp8,c("gen8","spe8")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 1 rows [47]. 
> gen9<-gen8 %>%
+   separate(sp9,c("gen9","spe9")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 1 rows [47]. 
> gen10<-gen9 %>%
+   separate(sp10,c("gen10","spe10")," ")
Warning message:
Expected 2 pieces. Missing pieces filled with `NA` in 1 rows [47]. 

Were you getting these?

Also, you don't need:

library(dplyr)
library(tidyr)

When you have already loaded tidyverse, as tidyverse loads all those packages and more.

AileneKane commented 10 months ago

@lizzieinvancouver yes, I got those warnings- they can be ignored. Feel free top modify the code as you like!

lizzieinvancouver commented 10 months ago

@AileneKane Great! Your plotting code is now analyses/plotspecies.R

lizzieinvancouver commented 1 month ago

@AileneKane Could you work on finalizing this figure for submission? It's currently figure 2 in the supp.

lizzieinvancouver commented 1 month ago

@AileneKane I am planning to use your species figure in the supp. Can you check it is updated and add italics to species names? Thank you!

AileneKane commented 1 month ago

@lizzieinvancouver Apologies for my delay! I have updated and italicized the names! Please let me know if there are other tweaks I should make.

lizzieinvancouver commented 3 weeks ago

@AileneKane Thank you! As I working on the caption, I realized that I do not understand why there is both not tested and not mentioned as it looks like not mentioned is what we entered. I think it must relate to this line:

spd1_long$authorsthink_evidence_gsxgrowth[is.na(spd1_long$authorsthink_evidence_gsxgrowth)]<-"not tested"
#what does NA mean? that either GSL or growth were not tested, i think

So I think if we overwrite the not mentioned as not tested (as not tested is what we use in the heatmaps), but I wanted to check with you. Also @cchambe12 can you confirm how you got not tested to make sure our code is consistent!

cchambe12 commented 2 weeks ago

@lizzieinvancouver @AileneKane Hi both! For the Figure 3 heatmap, we used "Not measured" for any studies that only measured a growth metric or a phenology metric but did not measure both. It essentially replaces any NAs. I can easily change the language to be consistent with this species figure though!

AileneKane commented 2 weeks ago

@lizzieinvancouver and @cchambe12 I can overwrite "not tested" with "not mentioned" as I think the difference between the two is subtle and not really important for the figure. My understanding is that "not mentioned" was listed in our table when the authors could have tested for the relationships but did not (i.e., when they had growing season start ad end or GSL). "NA" (which I replaced with "not tested") appears when there was one or more of the growing season start/end/length metrics missing. I will remove "not tested" and replace with "not mentioned" to be consistent

lizzieinvancouver commented 2 weeks ago

@lizzieinvancouver and @cchambe12 I can overwrite "not tested" with "not mentioned" as I think the difference between the two is subtle and not really important for the figure. My understanding is that "not mentioned" was listed in our table when the authors could have tested for the relationships but did not (i.e., when they had growing season start ad end or GSL). "NA" (which I replaced with "not tested") appears when there was one or more of the growing season start/end/length metrics missing. I will remove "not tested" and replace with "not mentioned" to be consistent

@AileneKane Many thanks! I think not tested might be best as we have not tested and not measured so far in the manuscript figures and I would be happy to not add another term.

lizzieinvancouver commented 2 weeks ago

@AileneKane Could you update the code and figure?

AileneKane commented 1 week ago

@lizzieinvancouver i believe this is now done! Please let me know if any additional changes should be made!

lizzieinvancouver commented 1 week ago

@AileneKane Looks good to me, thank you!