Closed ldecicco-USGS closed 8 years ago
Data for the top part of the graph is there. I'll work on getting the rest of the land use for the bottom part.
@lindsaycarr will start working to make this work in gsplot:
fname <- c("cache/All_data_for_data_release.csv",
"cache/SI_Table 1_site_characteristics_for_PUB_2.xlsx")
mungeLandUse(fname)
library(ggplot2)
conc.summary <- read.table("cache/mungeLandUse.tsv", sep = "\t")
# urban order:
ggplot(conc.summary, aes(x=reorder(shortName, UrbanPct), y=conc_per_m3, fill=type))+
geom_bar(stat="identity", colour="black") +
ylab("Average concentration, in particles/cubic meter") +
xlab("Sampling locations in increasing urban order, left to right") +
scale_fill_brewer(palette="Accent", labels=c("Fragment","Pellet/Bead","Fiber/Line","Film","Foam","Other"))+
labs(fill="Plastic type")+
guides(fill=guide_legend(reverse=TRUE))+
theme(axis.text.x = element_text(angle=90, hjust=1, vjust=0.5))+
theme(legend.position=c(0,1), legend.justification=c(0,1),
legend.title=element_text(size=rel(1.3)),
legend.text=element_text(size=rel(1.3)),
axis.text.x = element_text(size=rel(1.5)),
axis.text.y = element_text(size=rel(1.5)),
axis.title.y = element_text(size=rel(1.3)),
axis.title.x = element_text(size=rel(1.3)))
gsplot/munge @lindsaycarr
dinosvg @jread-usgs