# shravya-nanagiri-dev/health-happiness-analytics architecture

> Architecture diagram of the GitHub repository shravya-nanagiri-dev/health-happiness-analytics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shravya-nanagiri-dev/health-happiness-analytics
- Repository: https://github.com/shravya-nanagiri-dev/health-happiness-analytics

## Overview

Health & Happiness Analytics is a Streamlit dashboard for exploring country-year well-being data and running predictive analyses. Users load the bundled CSV or upload their own, then view prepared data and choose EDA, regression, classification, clustering, or forecasting. Results are presented in the dashboard, including visualizations and downloadable regression predictions. The main implementation is concentrated in app.py; the README documents the broader capabilities, while the excerpts show only selected implementation details.

Main entry points: [`app.py`](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py) (Streamlit dashboard), [`world_happiness_data.csv`](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/world_happiness_data.csv) (Well-being data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data workflow"]
  node_dataset[("Well-being data")]
  node_preprocessing["Data preparation<br/>[app.py]"]
end

subgraph group_analysis["Analytics"]
  node_eda["Exploratory analysis<br/>[app.py]"]
  node_regression["Happiness regression<br/>[app.py]"]
  node_classification["Tier classification<br/>[app.py]"]
  node_clustering["Country clustering<br/>[app.py]"]
  node_forecasting["Time-series forecasting<br/>[app.py]"]
  node_lstm["Optional LSTM<br/>[app.py]"]
end

subgraph group_presentation["Dashboard"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
  node_results["Charts and metrics<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"opens"| node_dashboard
node_dashboard -->|"loads"| node_dataset
node_dashboard -->|"prepares"| node_preprocessing
node_dashboard -->|"offers"| node_eda
node_dashboard -->|"runs"| node_regression
node_dashboard -->|"runs"| node_classification
node_dashboard -->|"runs"| node_clustering
node_dashboard -->|"runs"| node_forecasting
node_dashboard -->|"renders"| node_results
node_forecasting -.->|"optionally runs"| node_lstm

click node_dashboard "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_dataset "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/world_happiness_data.csv"
click node_preprocessing "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_eda "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_regression "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_classification "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_clustering "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_forecasting "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_lstm "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"
click node_results "https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py"

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_dataset,node_preprocessing,node_user toneBlue
class node_eda,node_regression,node_classification,node_clustering,node_forecasting,node_lstm toneAmber
class node_dashboard,node_results toneMint
```

## Components

### Data workflow

- [Well-being data](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/world_happiness_data.csv): `world_happiness_data.csv`
- [Data preparation](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`

### Analytics

- [Exploratory analysis](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Happiness regression](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Tier classification](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Country clustering](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Time-series forecasting](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Optional LSTM](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`

### Dashboard

- [Streamlit dashboard](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`
- [Charts and metrics](https://github.com/shravya-nanagiri-dev/health-happiness-analytics/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Streamlit dashboard: opens (evidence: `README.md`)
- Streamlit dashboard → Well-being data: loads (evidence: `app.py`)
- Streamlit dashboard → Data preparation: prepares (evidence: `app.py`)
- Streamlit dashboard → Exploratory analysis: offers (evidence: `README.md`)
- Streamlit dashboard → Happiness regression: runs (evidence: `app.py`)
- Streamlit dashboard → Tier classification: runs (evidence: `README.md`)
- Streamlit dashboard → Country clustering: runs (evidence: `app.py`)
- Streamlit dashboard → Time-series forecasting: runs (evidence: `app.py`)
- Streamlit dashboard → Charts and metrics: renders (evidence: `app.py`)
- Time-series forecasting → Optional LSTM: optionally runs (evidence: `README.md`)
