# enochemerald/nigerian_aircraft_accident architecture

> Architecture diagram of the GitHub repository enochemerald/nigerian_aircraft_accident, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enochemerald/nigerian_aircraft_accident
- Repository: https://github.com/enochemerald/nigerian_aircraft_accident

## Overview

##### Project type and purpose
- This is a data‐analysis and reporting project (not a typical full‐stack app). Its purpose is to ingest historical aircraft accident data for Nigeria, compute trends and summary statistics, then produce deliverables in Excel, PowerPoint and PDF form for stakeholders.

##### File structure
- Top-level files:
- Nigerian_air_accidents.xlsx – the primary data table
- Nigerian_air_accidents.pptx – the slide deck of findings
- Nigerian_air_accidents.pdf – a printable report
- README.md – explanation of scope, source, insights
- There are no code or service directories; the “runtime” is an ad-hoc data pipeline likely implemented offline (e.g., Python/R scripts or manual steps).

##### README for additional insights
- Data source: Aviation Safety Network
- Key outputs: Trends by year, operator, severity, fatalities

a. Main components
1. External Data Source (ASN online database)
2. Data Ingestion Layer (download / API client / scraper)
3. Raw Data Storage (Excel file, CSV intermediate)
4. Processing & Analysis Engine (e.g., Python scripts, R scripts, Jupyter notebooks)
5. Visualization & Reporting Module (charting libraries, PPTX generator, PDF exporter)
6. Final Deliverables (Nigerian_air_accidents.xlsx/.pptx/.pdf)
b. Relationships & interactions
- Ingestion → Raw Storage
- Raw Storage → Analysis Engine
- Analysis Engine → Visualization Module
- Visualization Module → Final Deliverables
c. Architectural patterns / design principles
- ETL (Extract → Transform → Load) pipeline
- Separation of concerns: ingestion, storage, analysis, reporting
- Modularity: each step can be automated or run manually
d. Key technologies / libraries (hypothetical based on deliverables)
- Data Ingestion: requests / BeautifulSoup (Python) or API client
- Storage: pandas (read/write Excel/CSV)
- Processing: pandas, numpy, scipy
- Visualization: matplotlib / seaborn, python-pptx
- Reporting: ReportLab or LaTeX → PDF, python-pptx

##### Be comprehensive but focused
- Discrete step in the pipeline as a separate component
- Don’t over-fragment—show logical groupings (e.g., “Processing & Analysis Engine” can contain multiple scripts)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Source
    ASN["ASN Online Database"]:::external

    %% Ingestion Layer
    Ingest["Data Ingestion Layer\n(requests/API client)"]:::ingestion

    %% Storage
    Storage["Raw Data Storage\n(Excel/CSV)"]:::storage

    %% Processing & Analysis
    Analysis["Processing & Analysis Engine\n(pandas, numpy)"]:::compute

    %% Visualization & Reporting
    Viz["Visualization & Reporting Module\n(matplotlib, python-pptx)"]:::reporting

    %% Final Deliverables
    subgraph "Final Deliverables"
        XLSX["Excel Report\nNigerian_air_accidents.xlsx"]:::reporting
        PPTX["Slide Deck\nNigerian_air_accidents.pptx"]:::reporting
        PDF["Printable Report\nNigerian_air_accidents.pdf"]:::reporting
    end

    %% Documentation
    Doc["Project Documentation\nREADME.md"]:::doc

    %% Data Flow
    ASN -->|"Data pull (HTTP)"| Ingest
    Ingest -->|"Excel/CSV"| Storage
    Storage -->|"DataFrame"| Analysis
    Analysis -->|"Charts & Tables"| Viz
    Viz -->|"Excel file"| XLSX
    Viz -->|"PPTX file"| PPTX
    Viz -->|"PDF file"| PDF

    %% Feedback Loop
    Analysis -->|"Refine & Rerun"| Ingest

    %% Click Events
    click XLSX "https://github.com/enochemerald/nigerian_aircraft_accident/blob/main/Nigerian_air_accidents.xlsx"
    click PPTX "https://github.com/enochemerald/nigerian_aircraft_accident/blob/main/Nigerian_air_accidents.pptx"
    click PDF "https://github.com/enochemerald/nigerian_aircraft_accident/blob/main/Nigerian_air_accidents.pdf"
    click Doc "https://github.com/enochemerald/nigerian_aircraft_accident/blob/main/README.md"

    %% Styles
    classDef external fill:#D0E6FF,stroke:#007BFF,color:#003D99;
    classDef ingestion fill:#FFE4C4,stroke:#E67E22,color:#A04000;
    classDef storage fill:#FDEBD0,stroke:#D35400,color:#873600;
    classDef compute fill:#E8F8F5,stroke:#1ABC9C,color:#0E6251;
    classDef reporting fill:#FCF3CF,stroke:#F1C40F,color:#B7950B;
    classDef doc fill:#F2F4F4,stroke:#BDC3C7,color:#566573;
```
