# deepali-ds/impactscholars architecture

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

- Interactive diagram: https://gitdiagram.com/deepali-ds/impactscholars
- Repository: https://github.com/deepali-ds/impactscholars

## Overview

##### Main Components
- Data Sources & Data Files: The Data folder holds multiple CSV files (e.g., heatwave summaries, heat-stroke-deaths, population density data) that have been pre-collected for analysis.
- Data Processing / Extraction: The two notebooks (Data_extraction.ipynb and ImpactScholar_notebook.ipynb) serve as the processing layers. One likely handles data cleaning/extraction and the other performs the core analysis, including heatwave identification, time-series analysis, and correlation studies.
- Visualization & Publication: The generated charts, interactive visualizations, and the PDF (ImpactScholarPublicationSleepyTulipa.pdf) illustrate the presentation layer where analysis results are turned into insights and policy implications.
- Dependencies & Environment: The requirements.txt file indicates which packages or libraries are essential (for numerical, statistical, and visualization tasks in Python).

##### Relationships and Interactions
- The CSV data files (data sources) feed into the Data Extraction notebook.
- The extraction process cleans and integrates the CSV files and then passes the processed datasets to the main analysis notebook.
- The analysis notebook performs various computations (heatwave detection, statistical correlations, trend analysis) and generates visualizations.
- The output from the analysis (charts, plots, reports) is used to produce the final publication PDF.
- The README serves as a guide tying all these parts together, indicating the use of ERA5 reanalysis data and additional open-source datasets.

##### Architectural Patterns & Design Principles
- Layered Design: Segregate Data Acquisition, Data Processing/Analysis, and Visualization/Reporting.
- Modularity: The use of separate notebooks indicates a modular approach where each notebook handles a distinct task.
- Reproducibility: The requirements file and README ensure that the environment and processing pipelines are reproducible.
- Data-Driven Analysis: Emphasis on transforming raw data into insights, backboned by solid statistical and visualization practices.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Data Sources
    ExtDS["External Data Sources (ERA5 reanalysis & Govt datasets)"]:::external

    %% Data Layer
    RawData["Raw Data Files (CSV)"]:::data

    %% Processing Layer
    Extraction["Data Extraction & Preprocessing (Data_extraction.ipynb)"]:::processing
    Analysis["Analysis & Visualization (ImpactScholar_notebook.ipynb)"]:::processing

    %% Output Layer
    Publication["Publication & Visual Outputs (ImpactScholarPublicationSleepyTulipa.pdf)"]:::output

    %% Environment Setup Subgraph
    subgraph "Environment Setup"
        Req["requirements.txt"]:::dependencies
        Guide["README.md"]:::dependencies
    end

    %% Connections - Vertical Layout
    ExtDS -->|"feeds"| RawData
    RawData -->|"ingests"| Extraction
    Extraction -->|"processes"| Analysis
    Analysis -->|"generates"| Publication

    %% Environment influences extraction
    Req -->|"sets up"| Extraction
    Guide -->|"guides"| Extraction

    %% Click Events (paths are for click events only)
    click RawData "https://github.com/deepali-ds/impactscholars/tree/main/Data/"
    click Extraction "https://github.com/deepali-ds/impactscholars/blob/main/Data_extraction.ipynb"
    click Analysis "https://github.com/deepali-ds/impactscholars/blob/main/ImpactScholar_notebook.ipynb"
    click Publication "https://github.com/deepali-ds/impactscholars/blob/main/ImpactScholarPublicationSleepyTulipa.pdf"
    click Req "https://github.com/deepali-ds/impactscholars/blob/main/requirements.txt"
    click Guide "https://github.com/deepali-ds/impactscholars/blob/main/README.md"

    %% Styles
    classDef external fill:#D8BFD8,stroke:#000,stroke-width:1px;
    classDef data fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef processing fill:#90EE90,stroke:#000,stroke-width:1px;
    classDef output fill:#FFCC99,stroke:#000,stroke-width:1px;
    classDef dependencies fill:#D3D3D3,stroke:#000,stroke-width:1px;
```
