# damoko2004/statafrikr architecture

> Architecture diagram of the GitHub repository damoko2004/statafrikr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/damoko2004/statafrikr
- Repository: https://github.com/damoko2004/statafrikr

## Overview

statAfrikR is an offline R package for African national statistical institutes, covering survey-data collection, processing, analysis, visualization, and dissemination. Its documented example checks data quality, builds a weighted survey design, then produces a cross-tabulation. The README names broader domain capabilities, but no source excerpts were provided, so internal links beyond that example are not inferred.

Main entry points: [`R/sondage.R`](https://github.com/damoko2004/statafrikr/blob/main/R/sondage.R) (Survey design), [`R/tableaux.R`](https://github.com/damoko2004/statafrikr/blob/main/R/tableaux.R) (Statistical tables), [`R/validation_ins.R`](https://github.com/damoko2004/statafrikr/blob/main/R/validation_ins.R) (Quality checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collect["Data collection"]
  node_collect["Import and validation<br/>[collecte.R]"]
  node_validation["Quality checks<br/>[validation_ins.R]"]
end

subgraph group_process["Data preparation"]
  node_treatment["Data treatment<br/>[traitement.R]"]
  node_geo["Geographic harmonization"]
  node_data[("Reference datasets<br/>[data.R]")]
end

subgraph group_analysis["Analysis"]
  node_survey["Survey design<br/>[sondage.R]"]
  node_tables["Statistical tables<br/>[tableaux.R]"]
  node_analysis["Statistical analysis<br/>[analyse.R]"]
  node_inequality["Inequality measures<br/>[inegalites.R]"]
  node_poverty["Poverty measures<br/>[pauvrete.R]"]
  node_ipm["Multidimensional poverty<br/>[ipm.R]"]
  node_odd["SDG indicators<br/>[odd.R]"]
  node_catalogue["Indicator catalogue"]
end

subgraph group_outputs["Visualization and reporting"]
  node_mapping["Thematic mapping<br/>[cartographie.R]"]
  node_visualization["Data visualization<br/>[visualisation.R]"]
  node_dashboard["Dashboards<br/>[dashboard.R]"]
  node_reports["Reports<br/>[rapports.R]"]
  node_dissemination["Statistical dissemination<br/>[diffusion.R]"]
end

subgraph group_domain["Statistical domains"]
  node_demography["Demography<br/>[demographie.R]"]
  node_employment["Employment<br/>[emploi.R]"]
  node_gender["Gender statistics<br/>[genre.R]"]
  node_health["Health statistics<br/>[sante.R]"]
  node_wellbeing["Subjective wellbeing<br/>[bien_etre.R]"]
  node_gdp["GDP statistics<br/>[pib.R]"]
end

node_user(("INS analyst"))

node_user -->|"checks data"| node_validation
node_user -->|"builds design"| node_survey
node_user -->|"requests table"| node_tables
node_survey -->|"provides plan"| node_tables

click node_collect "https://github.com/damoko2004/statafrikr/blob/main/R/collecte.R"
click node_validation "https://github.com/damoko2004/statafrikr/blob/main/R/validation_ins.R"
click node_treatment "https://github.com/damoko2004/statafrikr/blob/main/R/traitement.R"
click node_geo "https://github.com/damoko2004/statafrikr/blob/main/R/harmonisation_geo.R"
click node_survey "https://github.com/damoko2004/statafrikr/blob/main/R/sondage.R"
click node_tables "https://github.com/damoko2004/statafrikr/blob/main/R/tableaux.R"
click node_analysis "https://github.com/damoko2004/statafrikr/blob/main/R/analyse.R"
click node_inequality "https://github.com/damoko2004/statafrikr/blob/main/R/inegalites.R"
click node_poverty "https://github.com/damoko2004/statafrikr/blob/main/R/pauvrete.R"
click node_ipm "https://github.com/damoko2004/statafrikr/blob/main/R/ipm.R"
click node_odd "https://github.com/damoko2004/statafrikr/blob/main/R/odd.R"
click node_demography "https://github.com/damoko2004/statafrikr/blob/main/R/demographie.R"
click node_employment "https://github.com/damoko2004/statafrikr/blob/main/R/emploi.R"
click node_gender "https://github.com/damoko2004/statafrikr/blob/main/R/genre.R"
click node_health "https://github.com/damoko2004/statafrikr/blob/main/R/sante.R"
click node_wellbeing "https://github.com/damoko2004/statafrikr/blob/main/R/bien_etre.R"
click node_gdp "https://github.com/damoko2004/statafrikr/blob/main/R/pib.R"
click node_mapping "https://github.com/damoko2004/statafrikr/blob/main/R/cartographie.R"
click node_visualization "https://github.com/damoko2004/statafrikr/blob/main/R/visualisation.R"
click node_dashboard "https://github.com/damoko2004/statafrikr/blob/main/R/dashboard.R"
click node_reports "https://github.com/damoko2004/statafrikr/blob/main/R/rapports.R"
click node_dissemination "https://github.com/damoko2004/statafrikr/blob/main/R/diffusion.R"
click node_catalogue "https://github.com/damoko2004/statafrikr/blob/main/R/catalogue_indicateurs.R"
click node_data "https://github.com/damoko2004/statafrikr/blob/main/R/data.R"

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_collect,node_validation toneBlue
class node_treatment,node_geo,node_data toneAmber
class node_survey,node_tables,node_analysis,node_inequality,node_poverty,node_ipm,node_odd,node_catalogue toneMint
class node_mapping,node_visualization,node_dashboard,node_reports,node_dissemination toneRose
class node_demography,node_employment,node_gender,node_health,node_wellbeing,node_gdp,node_user toneIndigo
```

## Components

### Data collection

- [Import and validation](https://github.com/damoko2004/statafrikr/blob/main/R/collecte.R): `R/collecte.R`
- [Quality checks](https://github.com/damoko2004/statafrikr/blob/main/R/validation_ins.R): `R/validation_ins.R`

### Data preparation

- [Data treatment](https://github.com/damoko2004/statafrikr/blob/main/R/traitement.R): `R/traitement.R`
- [Geographic harmonization](https://github.com/damoko2004/statafrikr/blob/main/R/harmonisation_geo.R): `R/harmonisation_geo.R`
- [Reference datasets](https://github.com/damoko2004/statafrikr/blob/main/R/data.R): `R/data.R`

### Analysis

- [Survey design](https://github.com/damoko2004/statafrikr/blob/main/R/sondage.R): `R/sondage.R`
- [Statistical tables](https://github.com/damoko2004/statafrikr/blob/main/R/tableaux.R): `R/tableaux.R`
- [Statistical analysis](https://github.com/damoko2004/statafrikr/blob/main/R/analyse.R): `R/analyse.R`
- [Inequality measures](https://github.com/damoko2004/statafrikr/blob/main/R/inegalites.R): `R/inegalites.R`
- [Poverty measures](https://github.com/damoko2004/statafrikr/blob/main/R/pauvrete.R): `R/pauvrete.R`
- [Multidimensional poverty](https://github.com/damoko2004/statafrikr/blob/main/R/ipm.R): `R/ipm.R`
- [SDG indicators](https://github.com/damoko2004/statafrikr/blob/main/R/odd.R): `R/odd.R`
- [Indicator catalogue](https://github.com/damoko2004/statafrikr/blob/main/R/catalogue_indicateurs.R): `R/catalogue_indicateurs.R`

### Visualization and reporting

- [Thematic mapping](https://github.com/damoko2004/statafrikr/blob/main/R/cartographie.R): `R/cartographie.R`
- [Data visualization](https://github.com/damoko2004/statafrikr/blob/main/R/visualisation.R): `R/visualisation.R`
- [Dashboards](https://github.com/damoko2004/statafrikr/blob/main/R/dashboard.R): `R/dashboard.R`
- [Reports](https://github.com/damoko2004/statafrikr/blob/main/R/rapports.R): `R/rapports.R`
- [Statistical dissemination](https://github.com/damoko2004/statafrikr/blob/main/R/diffusion.R): `R/diffusion.R`

### Statistical domains

- [Demography](https://github.com/damoko2004/statafrikr/blob/main/R/demographie.R): `R/demographie.R`
- [Employment](https://github.com/damoko2004/statafrikr/blob/main/R/emploi.R): `R/emploi.R`
- [Gender statistics](https://github.com/damoko2004/statafrikr/blob/main/R/genre.R): `R/genre.R`
- [Health statistics](https://github.com/damoko2004/statafrikr/blob/main/R/sante.R): `R/sante.R`
- [Subjective wellbeing](https://github.com/damoko2004/statafrikr/blob/main/R/bien_etre.R): `R/bien_etre.R`
- [GDP statistics](https://github.com/damoko2004/statafrikr/blob/main/R/pib.R): `R/pib.R`

### Other components

- **INS analyst**

## Connections

- INS analyst → Quality checks: checks data (evidence: `README.md`)
- INS analyst → Survey design: builds design (evidence: `README.md`)
- INS analyst → Statistical tables: requests table (evidence: `README.md`)
- Survey design → Statistical tables: provides plan (evidence: `README.md`)
