DOI-USGS / great-lakes-microplastics

Microplastics in the Great Lakes
Creative Commons Zero v1.0 Universal
1 stars 9 forks source link

Chapter 3: Land use figure #9

Closed ldecicco-USGS closed 8 years ago

ldecicco-USGS commented 8 years ago
• Fibers were present in watersheds with all types of land use
and varying wastewater effluent contributions
• Fragments, films, and foams were more frequent in samples
from more urban basins (fig. 2)

gsplot/munge @lindsaycarr

dinosvg @jread-usgs

ldecicco-USGS commented 8 years ago
  1. Create gsplot
  2. In gsplot object, annotate each site key
  3. Render with dinoSVG as structured SVG
  4. Define quick sort (pretty sort)
  5. Write javascript to make it flip states
ldecicco-USGS commented 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)))
lindsayplatt commented 8 years ago