This vignette explores the composition of the Assembly’s workforce
with three endpoints: alepe_staff(),
alepe_positions(), and
alepe_departments().
Admission dates are parsed to Date, so the hiring
history of the current roster is easy to chart:
staff |>
mutate(ano_admissao = as.integer(format(data_admissao, "%Y"))) |>
count(ano_admissao, vinculo) |>
ggplot(aes(x = ano_admissao, y = n, fill = vinculo)) +
geom_col() +
labs(
x = "Year of admission", y = "Staff members",
fill = NULL,
title = "Current ALEPE staff by year of admission"
) +
theme_minimal()The ALEPE API did not return the staff roster while this page was being built, so the chart is omitted. Run the code above yourself for current data.
departments |>
summarise(total = sum(total), .by = nome_lotacao) |>
slice_max(total, n = 15) |>
ggplot(aes(x = reorder(nome_lotacao, total), y = total)) +
geom_col(fill = "#41ab5d") +
coord_flip() +
labs(
x = NULL, y = "Staff members",
title = "Fifteen largest ALEPE departments"
) +
theme_minimal()The ALEPE API did not return departments while this page was being built, so the chart is omitted. Run the code above yourself for current data.
Career positions in the roster encode class and level in a single
string
("ANALISTA LEGISLATIVO > CLASSE 1 > NÍVEL 10"); a
quick split reveals the career ladder: