Skip to content

Instantly share code, notes, and snippets.

@dholstius
Last active November 10, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dholstius/9f7dcea447b969d794eed4809f4f0557 to your computer and use it in GitHub Desktop.
Save dholstius/9f7dcea447b969d794eed4809f4f0557 to your computer and use it in GitHub Desktop.
Carbon Tetrachloride (CCl4) Emissions, 1997-2016
PY_CCl4_emission_data <-
PY(1997:2016) %>%
point_source_abated_emissions() %>%
filter_pollutants(list(CCl4 = 60))
chart_data <-
PY_CCl4_emission_data %>%
mutate(fac_h1 = if_else(fac_id == 31, "Dow Chemical", "All Others")) %>%
annual_emissions_by(fac_h1) %>%
group_by(fac_h1)
chart_description <-
labs(title = "Carbon Tetrachloride (CCl4) Emissions",
subtitle = "Inventoried Emissions from Bay Area Facilities",
caption = "Basis: DataBank (PY1997-2016)\n[https://gist.github.com/holstius/9f7dcea447b969d794eed4809f4f0557]")
chart_obj <-
chart_data %>%
gg_emission_chart() %>%
add(geom_col(), aes(fill = fac_h1)) %>%
add(chart_description)
show(chart_obj)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment