Skip to content

Feat/plot educacao - #63

Open
rainasouza wants to merge 11 commits into
mainfrom
feat/plot-educacao
Open

Feat/plot educacao#63
rainasouza wants to merge 11 commits into
mainfrom
feat/plot-educacao

Conversation

@rainasouza

@rainasouza rainasouza commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

This PR implements the education chart for the automatic reporting system.
image

What was done

  • New education plot module (plotting/educacao.py): generates grafico_cor_faixa_etaria_*.png — grouped bars comparing illiteracy rates by color/race (Amarela, Branca, Indígena, Parda, Preta) across six age brackets (15–19, 20–29, 30–39, 40–49, 50–59, 60+).
  • Report integration (reports.py): hooks the chart into graficos_por_placeholder["grafico_cor_faixa_etaria"] for the educacao macrotema.
  • Dynamic y-axis: the previous hardcoded limit (0–35%) truncated bars above 35%. The axis is now computed from the data (rounded up to the nearest ten), so charts always fit their data.
  • Larger font: tick labels and legend bumped from 8 to 9 for better readability.
    - Docs-driven captions (utils/renderer.py): Removed the auto-generated duplicate caption (Figura N - Cor e faixa etária).
  • The figure caption now comes straight from the docs text (e.g., Figura X – Taxa de analfabetismo por cor ou raça ...).
  • The X placeholder in the docs is replaced by an automatic sequential counter (Figura 1, Figura 2, ...), reset per report; any letter (or &) is now accepted as the placeholder.
  • Cleanup: removed dead code (plotting.py, generate_report.py, stale CSVs).
    Files changed
  • plotting/educacao.py (new)
  • reports.py
  • utils/renderer.py
  • removed: plotting.py, generate_report.py, demografia.csv, educacao.csv

@rainasouza rainasouza self-assigned this Aug 17, 2026
@rainasouza rainasouza added the enhancement New feature or request label Aug 17, 2026
Comment thread plotting/educacao.py
Comment thread plotting/educacao.py Outdated
Comment thread plotting/educacao.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants