Code
library(dplyr)
library(tidyr)
library(purrr)
library(ggplot2)
library(myPackage)
data("unemp")
%>%
unemp ::clean_names() %>%
janitorfilter(level == "Commune",
%in% c("Luxembourg", "Esch-sur-Alzette", "Wiltz")) %>%
place_name group_by(place_name) %>%
nest() %>%
mutate(plots = map2(.x = data, .y = place_name, ~ggplot(data = .x) +
theme_minimal() +
geom_line(aes(year, unemployment_rate_in_percent, group = 1)) +
labs(title = paste("Unemployment in", .y)))) %>%
pull(plots)
[[1]]
[[2]]
[[3]]