Last active
May 21, 2019 18:59
-
-
Save ajstewartlang/c957bf9cc051d05393ab452511c14556 to your computer and use it in GitHub Desktop.
TidyTuesday_May21_2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(janitor) | |
library(countrycode) | |
library(ggthemes) | |
coast_vs_waste <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-21/coastal-population-vs-mismanaged-plastic.csv") | |
coast_vs_waste <- clean_names(coast_vs_waste) | |
coast_vs_waste$continent <- countrycode(sourcevar = coast_vs_waste$entity, | |
origin = "country.name", | |
destination = "continent") | |
options(scipen = 999) | |
coast_vs_waste %>% | |
group_by(continent) %>% | |
filter(continent == "Europe" & !is.na(mismanaged_plastic_waste_tonnes)) %>% | |
ggplot(aes(x = mismanaged_plastic_waste_tonnes, | |
y = reorder(entity, mismanaged_plastic_waste_tonnes))) + | |
geom_point(size = 4) + | |
labs(x = "Mismanaged Plastic Waste (tonnes)", | |
y = "European Country", | |
title = "Mismanaged Plastic Waste", | |
subtitle = "Europe 2010") + | |
theme_economist() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment