# himanshu232/economics-app architecture

> Architecture diagram of the GitHub repository himanshu232/economics-app, 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/himanshu232/economics-app
- Repository: https://github.com/himanshu232/economics-app

## Overview

Economics Explorer is a Streamlit app for comparing GDP per person across countries and years. The app fetches and validates Our World in Data CSV data, lets users choose countries and a year range, then presents a trend chart, an end-year ranking, underlying rows, and a CSV download. The graph separates acquisition, exploration, and presentation responsibilities, although they are all implemented in app.py. The relationships shown are supported by that excerpt; the repository has no README or other source files.

Main entry points: [`app.py`](https://github.com/himanshu232/economics-app/blob/main/app.py) (Country and year filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Data acquisition"]
  node_owid["OWID CSV"]
  node_dataset["Validated dataset<br/>[app.py]"]
end

subgraph group_exploration["Data exploration"]
  node_app["Streamlit app<br/>[app.py]"]
  node_selection["Country and year filters<br/>[app.py]"]
end

subgraph group_presentation["Results"]
  node_trend["Trend chart<br/>[app.py]"]
  node_ranking["End-year comparison<br/>[app.py]"]
  node_rows["Selected data table<br/>[app.py]"]
  node_download["CSV download<br/>[app.py]"]
end

node_visitor(("User"))

node_visitor -->|"opens and interacts"| node_app
node_app -->|"fetches CSV"| node_owid
node_app -->|"parses and validates"| node_dataset
node_visitor -->|"chooses filters"| node_selection
node_app -->|"applies filters"| node_selection
node_dataset -->|"supplies data"| node_app
node_selection -->|"provides chart data"| node_trend
node_selection -->|"provides comparison rows"| node_ranking
node_selection -->|"provides filtered rows"| node_rows
node_selection -->|"provides CSV rows"| node_download

click node_app "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_dataset "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_selection "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_trend "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_ranking "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_rows "https://github.com/himanshu232/economics-app/blob/main/app.py"
click node_download "https://github.com/himanshu232/economics-app/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_owid,node_dataset,node_visitor toneBlue
class node_app,node_selection toneAmber
class node_trend,node_ranking,node_rows,node_download toneMint
```

## Components

### Data acquisition

- **OWID CSV**
- [Validated dataset](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`

### Data exploration

- [Streamlit app](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`
- [Country and year filters](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`

### Results

- [Trend chart](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`
- [End-year comparison](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`
- [Selected data table](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`
- [CSV download](https://github.com/himanshu232/economics-app/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Streamlit app: opens and interacts (evidence: `app.py`)
- Streamlit app → OWID CSV: fetches CSV (evidence: `app.py`)
- Streamlit app → Validated dataset: parses and validates (evidence: `app.py`)
- User → Country and year filters: chooses filters (evidence: `app.py`)
- Streamlit app → Country and year filters: applies filters (evidence: `app.py`)
- Validated dataset → Streamlit app: supplies data (evidence: `app.py`)
- Country and year filters → Trend chart: provides chart data (evidence: `app.py`)
- Country and year filters → End-year comparison: provides comparison rows (evidence: `app.py`)
- Country and year filters → Selected data table: provides filtered rows (evidence: `app.py`)
- Country and year filters → CSV download: provides CSV rows (evidence: `app.py`)
