Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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