# Percentuais Populacionais com DCNT ----
pop_DCNT_Brasil <-
p13 |>
group_by(J007) |>
summarise(n_raw = unweighted(n()),
n = survey_total()) |>
mutate(prop_raw = n_raw / sum(n_raw),
prop = n / sum(n))Warning in `[.survey.design2`(out, ind, ): 14 strata have only one PSU in this
subset.
# tibble com o percentual Brasil:
DCNT_Brasil <-
tibble(
V0001 = c("Brasil"),
prop = c(pop_DCNT_Brasil$prop[pop_DCNT_Brasil$J007 == "Sim"])
)
# por UF
pop_DCNT_por_uf <-
p13 |>
group_by(J007, V0001) |>
summarise(n = survey_total()) |>
mutate(prop = n / sum(n))Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 3 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 3 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
Warning in `[.survey.design2`(out, ind, ): 1 strata have only one PSU in this
subset.
DCNT_por_uf <-
pop_DCNT_por_uf |>
select(J007, V0001, n) |>
pivot_wider(names_from = J007,
values_from = n) |>
mutate(prop = Sim/(Sim + `Não`)) |>
select(V0001, prop)
# Fazer loliplot 13-19 ao invés da tabela abaixo! ----
# Tabela com os resultados 2013
rbind(DCNT_Brasil, DCNT_por_uf) |>
arrange(prop) |>
gt() |>
tab_header(title = "Percentual por região da população portadora de DCNT.",
subtitle = "Pesquisa Nacional de Saúde, 2013.") |>
opt_align_table_header(align = "left") |>
fmt_percent(
columns = c(prop),
decimals = 2
) |>
cols_label(
V0001 = md("**UF**"),
prop = md("**População com DCNT**")
) |>
gt_highlight_rows(
rows = V0001 == "Brasil",
fill = "lightgrey"
)| Percentual por região da população portadora de DCNT. | |
|---|---|
| Pesquisa Nacional de Saúde, 2013. | |
| UF | População com DCNT |
| Roraima | 6.85% |
| Amapá | 7.15% |
| Amazonas | 7.15% |
| Pará | 7.40% |
| Acre | 8.61% |
| Rondônia | 8.84% |
| Mato Grosso | 9.12% |
| Tocantins | 10.12% |
| Maranhão | 11.45% |
| Espírito Santo | 12.29% |
| Paraíba | 12.47% |
| Alagoas | 12.71% |
| Rio de Janeiro | 13.20% |
| Piauí | 13.47% |
| Bahia | 13.60% |
| Goiás | 13.87% |
| Rio Grande do Norte | 13.96% |
| Mato Grosso do Sul | 14.06% |
| Sergipe | 14.17% |
| Ceará | 14.27% |
| Brasil | 15.04% |
| Pernambuco | 15.06% |
| Distrito Federal | 15.50% |
| Santa Catarina | 16.14% |
| Paraná | 16.96% |
| São Paulo | 17.21% |
| Rio Grande do Sul | 18.17% |
| Minas Gerais | 20.54% |