R Code to make Figs 4, S2 and S3 in the paper: Langhammer et al. "The Positive Impact of Conservation Action". Science. __________________ library(ggplot2) ### Make Fig. 4 ### Fig_4_data<- read.csv("[directory]", header=TRUE, na="", stringsAsFactors=TRUE) Fig_4<-ggplot(Fig_4_data) + geom_point(aes(x=Year, y=Hedges_g, colour=Intervention, size=Variance, alpha=0.5), shape=21, fill="White", stroke=2) + geom_smooth(method='lm',(aes(x=Year, y=Hedges_g))) + ylab ("Standardised Effect Size (Hedges' g)") + xlab ("Publication year") + theme(axis.title.y = element_text(size=12)) + theme(axis.title.x = element_text(size=12)) plot (Fig_4) ### Regression for Fig. 4 ### lm = lm(Year~Hedges_g, data = Fig_4_data) summary(lm) ### Make Fig. S2 ### Fig_S2_data<- read.csv("[directory]", header=TRUE, na="", stringsAsFactors=TRUE) ggplot(Fig_S2_data, aes(x = reorder(Row, Hedges_g), y=Hedges_g)) + geom_col(aes(fill = Intervention)) + theme (panel.grid.major.x = element_blank()) + ylab ("Standardised effect size (Hedges' g)") ### Make Fig. S3 ### Fig_S3_data <- read.csv("[directory]", header=TRUE, na="", stringsAsFactors=TRUE) Fig_S3<-ggplot(Fig_S3_data) + geom_point(aes(x=Study_duration, y=Hedges_g, colour=Intervention, size=Variance, alpha=0.5), shape=21, fill="White", stroke=2) + geom_smooth((aes(x=Study_duration, y=Hedges_g, colour=Intervention))) + ylab ("Standardised Effect Size (Hedges' g)") + xlab ("Study duration (months)") + theme(axis.title.y = element_text(size=12)) + theme(axis.title.x = element_text(size=12)) plot (Fig_S3) Fig_S3+facet_wrap(~Intervention, ncol=2, scales="free")