Created
July 8, 2020 09:24
-
-
Save pachevalier/035d29a1c27c9168b05a77f85ac0d032 to your computer and use it in GitHub Desktop.
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("tricky") | |
library("hrbrthemes") | |
url <- "https://static.data.gouv.fr/resources/budget-de-la-cnil-1/20200706-112019/opencnil-budget-depuis-2000.csv" | |
read_csv2(file = url) %>% | |
filter(is.na(Année) == FALSE) %>% | |
pivot_longer(-Année, names_to = "year") %>% | |
rename(budget = Année) %>% | |
mutate( | |
value = unfrench_formatting(value), | |
year = as.numeric(year) | |
) %>% | |
ggplot() + | |
geom_col( | |
mapping = aes(x = year, y = value) | |
) + | |
facet_wrap(facets = ~ budget, ncol = 1) + | |
theme_ipsum() + | |
scale_y_continuous(name = "Budget en euros", labels = function(x) {format(x, scientific = FALSE, big.mark = " ")}) | |
ggsave(filename = "budget_cnil.png", height=1100/120, width=700/120, dpi=120) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment