Last active
May 21, 2019 19:22
-
-
Save ajstewartlang/acfd58c26f87b02a94938b1445b372ee to your computer and use it in GitHub Desktop.
Tidy_Tuesday_May_21_2019_v3
This file contains hidden or 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) | |
mismanaged_vs_gdp <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-21/per-capita-mismanaged-plastic-waste-vs-gdp-per-capita.csv") | |
mismanaged_vs_gdp <- clean_names(mismanaged_vs_gdp) | |
mismanaged_vs_gdp$continent <- countrycode(sourcevar = mismanaged_vs_gdp$entity, | |
origin = "country.name", | |
destination = "continent") | |
options(scipen = 999) | |
mismanaged_vs_gdp %>% | |
group_by(continent) %>% | |
filter(continent == "Europe" & !is.na(per_capita_mismanaged_plastic_waste_kilograms_per_person_per_day)) %>% | |
ggplot(aes(x = per_capita_mismanaged_plastic_waste_kilograms_per_person_per_day, | |
y = reorder(entity, per_capita_mismanaged_plastic_waste_kilograms_per_person_per_day))) + | |
geom_point(size = 4) + | |
labs(x = "Per Capita Mismanaged Plastic Waste, Kilos per Day", | |
y = "European Country", | |
title = "Per Capita Mismanaged Plastic Waste in\nEurope in 2010", | |
subtitle = "Mismanaged Plastic Waste Kilograms per Day") + | |
theme_economist() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment