Descritiva - Censo Escolar + IDEB

1. Base de dados integrada

dados <- read.csv("../3. Integracao/dados.csv") #carregando a base
paged_table(dados) #mostrando a base no relatório

2. Análise Gráfica

2.1 Análise por Regiões do País

IDEB

dados %>% drop_na(ideb) %>% ggplot(aes(NO_REGIAO, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Saeb.Matemática

dados %>% drop_na(nota_saeb_matematica) %>% ggplot(aes(NO_REGIAO, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Saeb.Português

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% ggplot(aes(NO_REGIAO, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Taxa.Aprovação

dados %>% drop_na(taxa_aprovacao) %>% ggplot(aes(NO_REGIAO, taxa_aprovacao, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

2.2 Análise por Estados IDEB

Nordeste

dados %>% drop_na(ideb) %>% filter(NO_REGIAO == "Nordeste") %>% ggplot(aes(sigla_uf, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Norte

dados %>% drop_na(ideb) %>% filter(NO_REGIAO == "Norte") %>% ggplot(aes(sigla_uf, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Centro-Oeste

dados %>% drop_na(ideb) %>% filter(NO_REGIAO == "Centro-Oeste") %>% ggplot(aes(sigla_uf, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sul

dados %>% drop_na(ideb) %>% filter(NO_REGIAO == "Sul") %>% ggplot(aes(sigla_uf, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sudeste

dados %>% drop_na(ideb) %>% filter(NO_REGIAO == "Sudeste") %>% ggplot(aes(sigla_uf, ideb, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

2.3 Análise por Estados SAEB Mat.

Nordeste

dados %>% drop_na(nota_saeb_matematica) %>% filter(NO_REGIAO == "Nordeste") %>% ggplot(aes(sigla_uf, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Norte

dados %>% drop_na(nota_saeb_matematica) %>% filter(NO_REGIAO == "Norte") %>% ggplot(aes(sigla_uf, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Centro-Oeste

dados %>% drop_na(nota_saeb_matematica) %>% filter(NO_REGIAO == "Centro-Oeste") %>% ggplot(aes(sigla_uf, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sul

dados %>% drop_na(nota_saeb_matematica) %>% filter(NO_REGIAO == "Sul") %>% ggplot(aes(sigla_uf, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sudeste

dados %>% drop_na(nota_saeb_matematica) %>% filter(NO_REGIAO == "Sudeste") %>% ggplot(aes(sigla_uf, nota_saeb_matematica, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

2.4 Análise por Estados SAEB Português

Nordeste

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% filter(NO_REGIAO == "Nordeste") %>% ggplot(aes(sigla_uf, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Norte

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% filter(NO_REGIAO == "Norte") %>% ggplot(aes(sigla_uf, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Centro-Oeste

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% filter(NO_REGIAO == "Centro-Oeste") %>% ggplot(aes(sigla_uf, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sul

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% filter(NO_REGIAO == "Sul") %>% ggplot(aes(sigla_uf, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

Sudeste

dados %>% drop_na(nota_saeb_lingua_portuguesa) %>% filter(NO_REGIAO == "Sudeste") %>% ggplot(aes(sigla_uf, nota_saeb_lingua_portuguesa, fill = factor(ano))) + geom_boxplot(alpha = 0.6) + facet_wrap(~Esc_Integral) + theme(legend.position = "bottom") + labs(x = "")

2. Análise Tabular

2.1 Tabelas de Contingência

Geral

dados %>% 
  select( #selecionando as variáveis na tabela
    NO_REGIAO,
    taxa_aprovacao,
    indicador_rendimento,
    nota_saeb_matematica,
    nota_saeb_lingua_portuguesa,
    ideb,
    projecao,
    NO_REGIAO,
    QT_TUR_MED,
    TP_LOCALIZACAO,
    QT_MAT_MED_INT,
    QT_DOC_MED,
    Esc_Integral
    ) %>% 
  tbl_summary(by = Esc_Integral, type = all_categorical() ~ "categorical") %>% 
      modify_header(label = "**Variáveis**") %>% # update the column header
      bold_labels() 
Variáveis Integral, N = 13,2471 Regular, N = 43,3071
NO_REGIAO
    Centro-Oeste 932 (7.0%) 3,368 (7.8%)
    Nordeste 4,892 (37%) 9,597 (22%)
    Norte 635 (4.8%) 4,383 (10%)
    Sudeste 5,637 (43%) 17,240 (40%)
    Sul 1,151 (8.7%) 8,545 (20%)
    Unknown 0 174
taxa_aprovacao 94 (85, 98) 88 (78, 94)
    Unknown 431 2,824
indicador_rendimento 0.94 (0.85, 0.98) 0.88 (0.79, 0.95)
    Unknown 431 2,825
nota_saeb_matematica 276 (260, 294) 267 (252, 281)
    Unknown 6,192 22,877
nota_saeb_lingua_portuguesa 280 (264, 296) 269 (255, 282)
    Unknown 6,192 22,877
ideb 4.50 (3.90, 5.10) 4.00 (3.50, 4.50)
    Unknown 6,192 22,879
projecao 4.40 (3.90, 5.00) 4.00 (3.60, 4.50)
    Unknown 6,355 27,930
QT_TUR_MED 10 (7, 14) 9 (5, 14)
    Unknown 0 174
TP_LOCALIZACAO
    1 12,531 (95%) 37,601 (87%)
    2 716 (5.4%) 5,532 (13%)
    Unknown 0 174
QT_MAT_MED_INT 104 (19, 263) 0 (0, 0)
    Unknown 0 174
QT_DOC_MED 23 (17, 33) 21 (14, 30)
    Unknown 0 174
1 n (%); Median (IQR)

Estados

dados %>% 
  filter(Esc_Integral == "Integral") %>% 
  select( #selecionando as variáveis na tabela
    NO_REGIAO,
    sigla_uf,
    ano
    ) %>% 
  tbl_summary(by = ano, type = all_categorical() ~ "categorical") %>% 
      modify_header(label = "**Variáveis**") %>% # update the column header
      bold_labels() 
Variáveis 2017, N = 3,1451 2019, N = 3,8571 2021, N = 6,2451
NO_REGIAO
    Centro-Oeste 241 (7.7%) 365 (9.5%) 326 (5.2%)
    Nordeste 1,490 (47%) 1,717 (45%) 1,685 (27%)
    Norte 184 (5.9%) 207 (5.4%) 244 (3.9%)
    Sudeste 867 (28%) 1,180 (31%) 3,590 (57%)
    Sul 363 (12%) 388 (10%) 400 (6.4%)
sigla_uf
    AC 11 (0.3%) 15 (0.4%) 18 (0.3%)
    AL 49 (1.6%) 50 (1.3%) 69 (1.1%)
    AM 61 (1.9%) 61 (1.6%) 63 (1.0%)
    AP 18 (0.6%) 18 (0.5%) 34 (0.5%)
    BA 289 (9.2%) 185 (4.8%) 231 (3.7%)
    CE 215 (6.8%) 282 (7.3%) 298 (4.8%)
    DF 29 (0.9%) 38 (1.0%) 58 (0.9%)
    ES 22 (0.7%) 36 (0.9%) 92 (1.5%)
    GO 59 (1.9%) 143 (3.7%) 114 (1.8%)
    MA 61 (1.9%) 105 (2.7%) 92 (1.5%)
    MG 60 (1.9%) 42 (1.1%) 628 (10%)
    MS 55 (1.7%) 75 (1.9%) 118 (1.9%)
    MT 98 (3.1%) 109 (2.8%) 36 (0.6%)
    PA 30 (1.0%) 37 (1.0%) 54 (0.9%)
    PB 99 (3.1%) 172 (4.5%) 298 (4.8%)
    PE 405 (13%) 418 (11%) 455 (7.3%)
    PI 291 (9.3%) 355 (9.2%) 111 (1.8%)
    PR 102 (3.2%) 117 (3.0%) 141 (2.3%)
    RJ 194 (6.2%) 285 (7.4%) 497 (8.0%)
    RN 57 (1.8%) 104 (2.7%) 71 (1.1%)
    RO 25 (0.8%) 22 (0.6%) 23 (0.4%)
    RR 7 (0.2%) 8 (0.2%) 6 (<0.1%)
    RS 78 (2.5%) 82 (2.1%) 64 (1.0%)
    SC 183 (5.8%) 189 (4.9%) 195 (3.1%)
    SE 24 (0.8%) 46 (1.2%) 60 (1.0%)
    SP 591 (19%) 817 (21%) 2,373 (38%)
    TO 32 (1.0%) 46 (1.2%) 46 (0.7%)
1 n (%)