Show code
source(here::here("code", "00_setup.R"))
library(DT)
df <- readRDS(paths$analysis_full_rds)
lgbtq <- df %>% filter(lgbtq_candidate)Browse Individual LGBTQ+ Candidates
This page provides an interactive, searchable table of all LGBTQ+ candidates identified in Brazil’s 2024 municipal elections. Rather than viewing aggregated statistics, you can browse individual records — searching by name, state, party, identity category, or any combination of attributes.
The table below is searchable (use the global search box or per-column filters), sortable (click any column header), filterable (use the dropdown/text filters at the top of each column), and supports CSV and Excel export of the filtered results.
3,134
26
227
1,429
| Identity | N | % |
|---|---|---|
| Non-LGBTQ+ | 0 | 0.0% |
| Gay | 1077 | 34.4% |
| Lesbian | 681 | 21.7% |
| Bisexual+ | 564 | 18.0% |
| Trans | 614 | 19.6% |
| Asexual | 195 | 6.2% |
| Other LGBTQ+ | 3 | 0.1% |
lgbtq_display <- lgbtq %>%
transmute(
Name = ballot_name,
State = state_abbrev,
Municipality = municipality_name,
`Muni Pop.` = populacao_2022,
Capital = if_else(capital_uf == 1, "Yes", "No", missing = "---"),
Party = party_abbrev,
Position = position_simple,
Identity = as.character(lgbt_category),
Source = disclosure_source,
Age = age,
Gender = translate_gender(gender),
Race = as.character(race_simple),
Education = as.character(education_simple),
Ideology = ideology_category,
Elected = case_when(
elected ~ "Yes",
!elected ~ "No",
TRUE ~ "---"
),
`Revenue (R$)` = round(total_revenue, 0),
Donors = n_unique_donors,
Manifesto = if_else(has_manifesto, "Yes", "No", missing = "No"),
`Manifesto Words` = if_else(has_manifesto,
as.integer(manifesto_n_words), NA_integer_)
) %>%
arrange(State, Municipality, Name)
DT::datatable(
lgbtq_display,
filter = "top",
rownames = FALSE,
extensions = c("Buttons", "Scroller"),
options = list(
pageLength = 25,
scrollX = TRUE,
scrollY = "600px",
scroller = TRUE,
dom = "Bfrtip",
buttons = c("csv", "excel"),
language = list(
search = "Search candidates:",
info = "Showing _START_ to _END_ of _TOTAL_ candidates"
)
)
) %>%
DT::formatCurrency("Revenue (R$)", currency = "R$", digits = 0, mark = ",") %>%
DT::formatRound("Muni Pop.", digits = 0, mark = ",")---
title: "8. Candidate Explorer"
subtitle: "Browse Individual LGBTQ+ Candidates"
---
```{r setup}
source(here::here("code", "00_setup.R"))
library(DT)
df <- readRDS(paths$analysis_full_rds)
lgbtq <- df %>% filter(lgbtq_candidate)
```
# Overview
This page provides an interactive, searchable table of all LGBTQ+ candidates identified in Brazil's 2024 municipal elections. Rather than viewing aggregated statistics, you can browse individual records --- searching by name, state, party, identity category, or any combination of attributes.
The table below is **searchable** (use the global search box or per-column filters), **sortable** (click any column header), **filterable** (use the dropdown/text filters at the top of each column), and supports **CSV and Excel export** of the filtered results.
# Summary
::: {layout-ncol=4}
::: {.callout-tip appearance="simple"}
## Total Candidates
`r format_n(nrow(lgbtq))`
:::
::: {.callout-tip appearance="simple"}
## States Represented
`r n_distinct(lgbtq$state_abbrev)`
:::
::: {.callout-tip appearance="simple"}
## Elected
`r format_n(sum(lgbtq$elected, na.rm = TRUE))`
:::
::: {.callout-tip appearance="simple"}
## Municipalities
`r format_n(n_distinct(lgbtq$municipality_name))`
:::
:::
# Identity Breakdown
```{r}
#| label: tbl-explorer-identity
#| tbl-cap: "LGBTQ+ Candidates by Identity Category"
lgbtq %>%
filter(lgbt_category != "Non-LGBTQ+") %>%
count(lgbt_category, .drop = FALSE) %>%
mutate(pct = format_pct(n / sum(n))) %>%
rename(Identity = lgbt_category, N = n, `%` = pct) %>%
kable(align = c("l", "r", "r"))
```
# Candidate Table
```{r}
#| label: candidate-table
#| tbl-cap: "All Identified LGBTQ+ Candidates — Searchable and Filterable"
lgbtq_display <- lgbtq %>%
transmute(
Name = ballot_name,
State = state_abbrev,
Municipality = municipality_name,
`Muni Pop.` = populacao_2022,
Capital = if_else(capital_uf == 1, "Yes", "No", missing = "---"),
Party = party_abbrev,
Position = position_simple,
Identity = as.character(lgbt_category),
Source = disclosure_source,
Age = age,
Gender = translate_gender(gender),
Race = as.character(race_simple),
Education = as.character(education_simple),
Ideology = ideology_category,
Elected = case_when(
elected ~ "Yes",
!elected ~ "No",
TRUE ~ "---"
),
`Revenue (R$)` = round(total_revenue, 0),
Donors = n_unique_donors,
Manifesto = if_else(has_manifesto, "Yes", "No", missing = "No"),
`Manifesto Words` = if_else(has_manifesto,
as.integer(manifesto_n_words), NA_integer_)
) %>%
arrange(State, Municipality, Name)
DT::datatable(
lgbtq_display,
filter = "top",
rownames = FALSE,
extensions = c("Buttons", "Scroller"),
options = list(
pageLength = 25,
scrollX = TRUE,
scrollY = "600px",
scroller = TRUE,
dom = "Bfrtip",
buttons = c("csv", "excel"),
language = list(
search = "Search candidates:",
info = "Showing _START_ to _END_ of _TOTAL_ candidates"
)
)
) %>%
DT::formatCurrency("Revenue (R$)", currency = "R$", digits = 0, mark = ",") %>%
DT::formatRound("Muni Pop.", digits = 0, mark = ",")
```
# Notes
- The table includes all candidates identified as LGBTQ+ through either TSE self-disclosure or the VOTE LGBT project.
- The **Source** column indicates how each candidate was identified: **TSE** (official self-declaration on the electoral registration form), **VOTE** (identified by the VOTE LGBT civil society project), or **Both** (confirmed by both sources).
- Use the **column filters** (top row of the table) to narrow results by state, identity category, party, election outcome, or any other attribute.
- Click **csv** or **excel** to download the currently filtered results.
- For methodology on how candidates were identified, see [Chapter 7](07_methodology.qmd).