Skip to content

Instantly share code, notes, and snippets.

@pachevalier
Created July 8, 2020 09:24
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 pachevalier/035d29a1c27c9168b05a77f85ac0d032 to your computer and use it in GitHub Desktop.
Save pachevalier/035d29a1c27c9168b05a77f85ac0d032 to your computer and use it in GitHub Desktop.
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