EcoClimLab / ForestGEO-tree-rings

Repository for analysis of tree-ring data from 10 globally distributed forests (Anderson-Teixeira et al., in press, Global Change Biology)
2 stars 2 forks source link

update decadal plots #104

Closed teixeirak closed 3 years ago

teixeirak commented 3 years ago

I'm splitting this off from issue #85, which is otherwise done. The goal is for @camerondow35 to make an updated version of the analysis of growth-DBH relationships by decade.

@camerondow35 this file tells you what years were kept for each species within each site and this file tells you what species were completely dropped from the Year (or dbh x clim interaction, or CO2) analysis at any site.

Originally posted by @ValentineHerr in https://github.com/EcoClimLab/ForestGEO-climate-sensitivity/issues/85#issuecomment-738306368

camerondow35 commented 3 years ago

Working on this now - is there meant to be a second link here?

and this file tells you what species were completely dropped from the Year

teixeirak commented 3 years ago

I'm confused. What are you. expecting? Here's some more info from @ValentineHerr, originally posted in #85:

@camerondow35,

camerondow35 commented 3 years ago

Ok I see. There are two files, one with the dropped species and one with species year kept.

camerondow35 commented 3 years ago

Slow progress here, sorry! I finally got the script working enough to produce sample plots. Were you thinking something like this? Plots for SCBI: image

teixeirak commented 3 years ago

Yes; this is looking great! From a quick review:

(1) please adjust the colors for the decades to a continuous gradient so that it’s intuitive to pick out trends, and

(2) This uses Valentine’s parsed data set, right? I’m surprised that FRNI seems to have such an unstable pattern.

camerondow35 commented 3 years ago

image

Are the colors here too similar, meaning are 1990 & 2000 too hard to tell apart?

This uses Valentine’s parsed data set, right? I’m surprised that FRNI seems to have such an unstable pattern.

Yes, I have subset the data to only include the species x year combos found in the two csv's Valentine made.

teixeirak commented 3 years ago

Looking great! But yeah, the colors are hard to tell apart-- especially in the red zone. The original color scheme worked well.

teixeirak commented 3 years ago

Regarding FRNI, let's see what the rest of the sites look like, and deal with that if it seems to be a systematic problem.

camerondow35 commented 3 years ago

So the point of these plots is to show that some sites have lower BAI in recent decades, right? Would using a linear model work as well as the loess/gam? image

camerondow35 commented 3 years ago

I'm having an issue with running the same method for each site so instead of mixing methods I could just run them like this to keep it consistent. However, if you think mixing methods is fine I can go ahead and do that (some GAM some loess, maybe one linear - BCI is giving me trouble)

teixeirak commented 3 years ago

Hmmm... the linear fit seems to be okay based on SCBI, but it's inconsistent with what we're showing elsewhere in the manuscript. Would it work to use a polynomial fit, as Valentine did in the DBH responses figure (below)?

image

camerondow35 commented 3 years ago

They all plotted at least! Here's the link so you can check them out: https://github.com/EcoClimLab/tree-rings_global-change/tree/master/decadal_plots

teixeirak commented 3 years ago

Thanks! I will review these carefully as soon as I get a chance.

teixeirak commented 3 years ago

Thanks, @camerondow35 . I have knit these into the SI file. I'll continue looking at these, but one first issue is that we're missing the plot for Niobrara, perhaps because it was added after Bianca wrote that code.

teixeirak commented 3 years ago

It would help to make the color palette more intuitive. Copying a suggestion from Ian McGregor on another project:

Can I suggest instead of rainbow to use something like one of the viridis palettes? In my opinion it makes it more intuitive plus those palettes are color-blind friendly. Your code would be something like

library(viridis)
colors <- magma(7) # or viridis, plasma, inferno
teixeirak commented 3 years ago

As far as the actual content of the plots, I'm going to be reviewing these more carefully in the context of the other results and will provide more feedback later.

teixeirak commented 3 years ago

@camerondow35 , I think overall these plots look fine.

The data are a bit out of date, as @ValentineHerr recently restored 2 decades of data that had been mistakenly removed from CB. So we'll need to re-run at some point with those data.

Plus, a few other formatting things:

image

teixeirak commented 3 years ago

@camerondow35 , is the following an accurate caption for these figures? "Plot visualizes the data included in the GLS model, separated by decade, using a probability density function. Transparent ribbons indicate 95% confidence intervals."

Also note that I'll be sending this around to coauthors later today and presenting in a virtual ForestGEO seminar on Wed. Then aiming to submit in a few weeks. (These plots don't need to be fixed up until submission, although I probably will show one in the presentation.)

camerondow35 commented 3 years ago

That seems like an acceptable description but i'm not familiar enough with the term "probability density function" to make a 100% judgement call. I used the code geom_smooth(method = "lm", sd = TRUE, formula = y ~ poly(x,2,raw =TRUE)) for these plots.

camerondow35 commented 3 years ago

Pushed updated plots