# heitorxr/bicos-de-pinguins-animacao architecture

> Architecture diagram of the GitHub repository heitorxr/bicos-de-pinguins-animacao, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/heitorxr/bicos-de-pinguins-animacao
- Repository: https://github.com/heitorxr/bicos-de-pinguins-animacao

## Overview

“Bicos de pinguins” is an R project about Simpson’s paradox: it compares bill-length and bill-depth correlations across all penguins and within known species, and presents the comparison as an animation. The documented generation path is data preparation and correlations, graph/frame creation, then animation export. The repository also contains an app and a separate workflow for illustrated PDF support pages. The README identifies the main R responsibilities; the sampled source shows the PDF-page builder calling the image-color and measurement-translation helpers. Other runtime connections are not asserted where source was not sampled.

Main entry points: [`roteiro/diagramar_paginas.py`](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/diagramar_paginas.py) (Page composition), [`R/modelo.R`](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/modelo.R) (Data and correlations), [`R/graficos.R`](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/graficos.R) (Graphs and frames), [`gerar_animacao.R`](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/gerar_animacao.R) (Animation export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Analysis"]
  node_penguin_data[("Penguin data<br/>[pinguins.csv]")]
  node_model["Data and correlations<br/>[modelo.R]"]
  node_prep["Project preparation<br/>[preparar.R]"]
end

subgraph group_animation["Animation"]
  node_graphics["Graphs and frames<br/>[graficos.R]"]
  node_animation_export["Animation export<br/>[gerar_animacao.R]"]
  node_animation_output["Animation videos"]
end

subgraph group_app["Application"]
  node_app_entry["App entry<br/>[app.R]"]
  node_app_start["App launcher<br/>[iniciar.R]"]
end

subgraph group_support["Presentation pages"]
  node_page_builder["Page composition"]
  node_color_helper["Palette backgrounds"]
  node_translation_helper["Measure translation"]
  node_species_summary[("Species summaries")]
  node_overall_summary[("Overall summary<br/>[resumo_geral.csv]")]
  node_palette[("Graph palette")]
  node_support_pdf["Support-page PDF"]
end

node_user(("User"))

node_penguin_data -->|"prepares and correlates"| node_model
node_model -->|"supplies analysis"| node_graphics
node_graphics -->|"provides frames"| node_animation_export
node_animation_export -->|"exports animation"| node_animation_output
node_page_builder -->|"calls"| node_color_helper
node_page_builder -->|"calls"| node_translation_helper
node_page_builder -->|"reads"| node_species_summary
node_page_builder -->|"reads"| node_overall_summary
node_page_builder -->|"reads"| node_palette
node_page_builder -->|"writes"| node_support_pdf

click node_penguin_data "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/dados/pinguins.csv"
click node_model "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/modelo.R"
click node_graphics "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/graficos.R"
click node_animation_export "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/gerar_animacao.R"
click node_animation_output "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/pinguins_movimento_continuo.mp4"
click node_app_entry "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/app.R"
click node_app_start "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/iniciar.R"
click node_prep "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/preparar.R"
click node_page_builder "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/diagramar_paginas.py"
click node_color_helper "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/padronizar_cores.py"
click node_translation_helper "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/traduzir_medidas.py"
click node_species_summary "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/resumo_especies.csv"
click node_overall_summary "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/resumo_geral.csv"
click node_palette "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/paleta_graficos.csv"
click node_support_pdf "https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/paginas_de_apoio_cores_conferidas.pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_penguin_data,node_model,node_prep,node_user toneBlue
class node_graphics,node_animation_export,node_animation_output toneAmber
class node_app_entry,node_app_start toneMint
class node_page_builder,node_color_helper,node_translation_helper,node_species_summary,node_overall_summary,node_palette,node_support_pdf toneRose
```

## Components

### Analysis

- [Penguin data](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/dados/pinguins.csv): `dados/pinguins.csv`
- [Data and correlations](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/modelo.R): `R/modelo.R`
- [Project preparation](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/preparar.R): `preparar.R`

### Animation

- [Graphs and frames](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/R/graficos.R): `R/graficos.R`
- [Animation export](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/gerar_animacao.R): `gerar_animacao.R`
- [Animation videos](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/pinguins_movimento_continuo.mp4): `pinguins_movimento_continuo.mp4`

### Application

- [App entry](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/app.R): `app.R`
- [App launcher](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/iniciar.R): `iniciar.R`

### Presentation pages

- [Page composition](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/diagramar_paginas.py): `roteiro/diagramar_paginas.py`
- [Palette backgrounds](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/padronizar_cores.py): `roteiro/padronizar_cores.py`
- [Measure translation](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/traduzir_medidas.py): `roteiro/traduzir_medidas.py`
- [Species summaries](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/resumo_especies.csv): `roteiro/resumo_especies.csv`
- [Overall summary](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/resumo_geral.csv): `roteiro/resumo_geral.csv`
- [Graph palette](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/paleta_graficos.csv): `roteiro/paleta_graficos.csv`
- [Support-page PDF](https://github.com/heitorxr/bicos-de-pinguins-animacao/blob/main/roteiro/paginas_de_apoio_cores_conferidas.pdf): `roteiro/paginas_de_apoio_cores_conferidas.pdf`

### Other components

- **User**

## Connections

- Penguin data → Data and correlations: prepares and correlates (evidence: `README.md`)
- Data and correlations → Graphs and frames: supplies analysis (evidence: `README.md`)
- Graphs and frames → Animation export: provides frames (evidence: `README.md`)
- Animation export → Animation videos: exports animation (evidence: `README.md`)
- Page composition → Palette backgrounds: calls (evidence: `roteiro/diagramar_paginas.py`)
- Page composition → Measure translation: calls (evidence: `roteiro/diagramar_paginas.py`)
- Page composition → Species summaries: reads (evidence: `roteiro/diagramar_paginas.py`)
- Page composition → Overall summary: reads (evidence: `roteiro/diagramar_paginas.py`)
- Page composition → Graph palette: reads (evidence: `roteiro/diagramar_paginas.py`)
- Page composition → Support-page PDF: writes (evidence: `roteiro/diagramar_paginas.py`)
