La base de datos
# You need the following package(s):
#head(dfmater)
La base de datos para los años 2020 y 2021
# You need the following package(s):
dfmater2019y2020 <- subset(dfmater,year==2020 | year==2019)
# You need the following package(s):
dfmater2020 <- subset(dfmater,year==2020)
Edades

Situación del empleo
tab2=spread(tab1, key = Actividad, value = Cantidad)
kable(tab2)
Años
|
Desocupados
|
Inactivos
|
Ocupados
|
2013
|
72507
|
679451
|
1025617
|
2014
|
97238
|
753651
|
952983
|
2015
|
77380
|
781566
|
998215
|
2016
|
97605
|
753812
|
999196
|
2017
|
78830
|
757025
|
1025640
|
2018
|
95708
|
742432
|
1068555
|
2019
|
111100
|
738027
|
1113824
|
2020
|
148335
|
725192
|
1119362
|
Salarios
## Warning: Ignoring unknown parameters: xlim
## Warning: Removed 2444 rows containing non-finite values (stat_density).

graph <- ggplot(dfmater2019y2020, aes(x = cate_pea, y = ingtotal, colour = peaa)) +
geom_boxplot(notch = FALSE) +
theme_light() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1)
)
ggplotly(graph)
## Warning: Removed 4835 rows containing non-finite values (stat_boxplot).