{"part":"task","text":"# Datasets\nPass a dataset's id as the `dataset` argument.\n{\n \"id\": \"ds_0078\",\n \"rows\": 4276,\n \"description\": \"| Variable Name     | Description                                                                                     |\\n|-------------------|-------------------------------------------------------------------------------------------------|\\n| Unnamed: 0        | Row index carried over from the original export.                                                |\\n| muni_code         | Municipality identifier assigned by Brazil's electoral authority (TSE).                        |\\n| year              | Baseline mayoral election year; 2008 for every row in this extract.                             |\\n| party             | Party abbreviation of the focal mayoral candidate in the 2008 election.                        |\\n| mun_place         | Candidate's finishing position in the 2008 mayoral election: 1=winner, 2=runner-up.              |\\n| gov_party         | Party abbreviation of the state governor for the municipality\u2019s state in that cycle.            |\\n| gov_pct           | Party\u2019s vote share in the gubernatorial election within the municipality (proportion).          |\\n| de_pct            | Party\u2019s vote share for state deputy (deputado estadual) within the municipality (proportion).   |\\n| change            | Candidate ran under a different party in 2012 than in 2008: 1=different party, 0=same party. The exact date of a party change is not recorded. |\\n| attrition         | Candidate did not appear in the 2012 mayoral election (1/0); always 0 in this repeat-candidate extract. |\\n| margin            | Candidate's 2008 mayoral vote margin relative to the win-loss threshold, in proportions; positive for winners and negative for runners-up. |\\n| p_df_pct          | Party\u2019s vote share for federal deputy (deputado federal) in the previous cycle, municipality-level (proportion). |\\n| df_pct            | Party\u2019s vote share for federal deputy (deputado federal) in the current cycle, municipality-level (proportion). |\\n| treat             | Candidate won the 2008 mayoral election: 1=winner, 0=runner-up.                                  |\\n| ineligible        | Candidate was term-limited/ineligible to run in the next mayoral election (1/0); always 0 in this extract. |\\n| p_de_pct          | Party\u2019s vote share for state deputy in the previous cycle, municipality-level (proportion).      |\\n| p_gov_pct         | Party\u2019s vote share for governor in the previous cycle, municipality-level (proportion).          |\\n| p_mun_pct         | Party\u2019s vote share for mayor in the previous municipal election (proportion).                    |\\n| partyIncumbent    | Indicator that the party held the mayor\u2019s office prior to the municipal election (1/0).          |\\n| age               | Age of the focal mayoral candidate (years).                                                     |\\n| max_expenditure   | Reported maximum campaign expenditure for the mayoral candidate (local currency; -1 indicates missing). |\\n| married           | Candidate reported marital status: married (1/0).                                               |\\n| unschooled        | Candidate reported no formal schooling (1/0).                                                   |\\n| tertiary          | Candidate reported tertiary (college/university) education completed (1/0).                     |\\n| female            | Candidate sex: female (1/0).                                                                    |\\n| pt                | Indicator that the candidate\u2019s party is PT (1/0).                                               |\\n| pmdb              | Indicator that the candidate\u2019s party is PMDB (1/0).                                             |\\n| psdb              | Indicator that the candidate\u2019s party is PSDB (1/0).                                             |\\n| pr                | Indicator that the candidate\u2019s party is PR (1/0).                                               |\\n| pfl               | Indicator that the candidate\u2019s party is PFL/DEM (legacy label) (1/0).                           |\\n| ptb               | Indicator that the candidate\u2019s party is PTB (1/0).                                              |\\n| pps               | Indicator that the candidate\u2019s party is PPS (1/0).                                              |\\n| pp                | Indicator that the candidate\u2019s party is PP (1/0).                                               |\\n| pdt               | Indicator that the candidate\u2019s party is PDT (1/0).                                              |\\n| psb               | Indicator that the candidate\u2019s party is PSB (1/0).                                              |\\n| bizz              | Candidate occupation: businessperson/entrepreneur (1/0).                                        |\\n| rural_worker      | Candidate occupation: rural worker (1/0).                                                       |\\n| retiree           | Candidate occupation: retiree/pensioner (1/0).                                                  |\\n| trader            | Candidate occupation: trader/merchant (1/0).                                                    |\\n| public_employee   | Candidate occupation: public employee/civil servant (1/0).                                      |\\n| teacher           | Candidate occupation: teacher (1/0).                                                            |\\n\\nData Description: \\nEach row represents a first- or second-place candidate in Brazil's 2008 municipal mayoral elections. This extract contains 4,276 candidates who were not term-limited and who also appeared as mayoral candidates in 2012; year=2008, ineligible=0, and attrition=0 throughout. Comparing the candidate's party labels in the 2008 and 2012 elections establishes whether they ran under a different party in 2012. The outcome change is a binary party-switching indicator; its mean is a probability on a 0-1 scale. Candidates absent from the 2012 election are excluded, so the question concerns the observed repeat-candidate sample. This selection must be considered when interpreting a causal effect or generalizing beyond that sample.\\n\\nThe data were compiled from election results and candidate-registration records maintained by Brazil's Tribunal Superior Eleitoral (TSE). Municipality identifiers are TSE codes. The file links candidate party affiliations across the two mayoral elections and includes 2008 election placement, vote margins, win indicators, demographics, and occupations. Municipality-level party vote shares for governor, federal deputy (deputado federal), and state deputy (deputado estadual), together with their lagged values, provide additional electoral context; they are separate from the party-switching outcome change. Party labels follow official abbreviations in use during the period, including legacy acronyms.\\n\",\n \"columns\": {\n  \"Unnamed: 0\": \"int64\",\n  \"muni_code\": \"int64\",\n  \"year\": \"int64\",\n  \"party\": \"str\",\n  \"mun_place\": \"int64\",\n  \"gov_party\": \"str\",\n  \"gov_pct\": \"float64\",\n  \"de_pct\": \"float64\",\n  \"change\": \"int64\",\n  \"attrition\": \"int64\",\n  \"margin\": \"float64\",\n  \"p_df_pct\": \"float64\",\n  \"df_pct\": \"float64\",\n  \"treat\": \"int64\",\n  \"ineligible\": \"int64\",\n  \"p_de_pct\": \"float64\",\n  \"p_gov_pct\": \"float64\",\n  \"p_mun_pct\": \"float64\",\n  \"partyIncumbent\": \"float64\",\n  \"age\": \"int64\",\n  \"max_expenditure\": \"int64\",\n  \"married\": \"int64\",\n  \"unschooled\": \"int64\",\n  \"tertiary\": \"int64\",\n  \"female\": \"int64\",\n  \"pt\": \"int64\",\n  \"pmdb\": \"int64\",\n  \"psdb\": \"int64\",\n  \"pr\": \"int64\",\n  \"pfl\": \"int64\",\n  \"ptb\": \"int64\",\n  \"pps\": \"int64\",\n  \"pp\": \"int64\",\n  \"pdt\": \"int64\",\n  \"psb\": \"int64\",\n  \"bizz\": \"int64\",\n  \"rural_worker\": \"int64\",\n  \"retiree\": \"int64\",\n  \"trader\": \"int64\",\n  \"public_employee\": \"int64\",\n  \"teacher\": \"int64\"\n }\n}"}