# rkomtchuente/eonet architecture

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

- Interactive diagram: https://gitdiagram.com/rkomtchuente/eonet
- Repository: https://github.com/rkomtchuente/eonet

## Overview

EONET tracks natural events by fetching open-event data hourly, upserting the latest event geometry into PostgreSQL, and exposing event records through an HTTP API. The repository also contains a Tableau workbook, but its contents and connection to the data flow were not inspected, so no relationship is asserted. The graph reflects the sampled ETL, DAG, and API code; the README provides no further capability details.

Main entry points: [`dags/natural_events_ETL.py`](https://github.com/rkomtchuente/eonet/blob/main/dags/natural_events_ETL.py) (EONET ETL), [`dags/eonet_dag.py`](https://github.com/rkomtchuente/eonet/blob/main/dags/eonet_dag.py) (Hourly DAG), [`api/main.py`](https://github.com/rkomtchuente/eonet/blob/main/api/main.py) (Events API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Event ingestion"]
  node_dag["Hourly DAG<br/>[eonet_dag.py]"]
  node_etl["EONET ETL"]
end

subgraph group_storage["Event storage"]
  node_database[("PostgreSQL Events")]
  node_schema["Table schema SQL<br/>[tablecreation.sql]"]
end

subgraph group_access["Data access"]
  node_api["Events API<br/>[main.py]"]
  node_tableau["Tableau workbook<br/>[eonet events.twb]"]
end

node_scheduler(("Airflow scheduler"))
node_eonet{{"NASA EONET API"}}
node_client(("API client"))

node_scheduler -->|"runs"| node_dag
node_dag -->|"calls"| node_etl
node_etl -->|"fetches events"| node_eonet
node_etl -->|"upserts events"| node_database
node_client -->|"requests events"| node_api
node_api -->|"queries events"| node_database

click node_dag "https://github.com/rkomtchuente/eonet/blob/main/dags/eonet_dag.py"
click node_etl "https://github.com/rkomtchuente/eonet/blob/main/dags/natural_events_ETL.py"
click node_schema "https://github.com/rkomtchuente/eonet/blob/main/tablecreation.sql"
click node_api "https://github.com/rkomtchuente/eonet/blob/main/api/main.py"
click node_tableau "https://github.com/rkomtchuente/eonet/blob/main/eonet%20events.twb"

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_dag,node_etl,node_client toneBlue
class node_database,node_schema toneAmber
class node_api,node_tableau,node_eonet toneMint
class node_scheduler toneRose
```

## Components

### Event ingestion

- [Hourly DAG](https://github.com/rkomtchuente/eonet/blob/main/dags/eonet_dag.py): `dags/eonet_dag.py`
- [EONET ETL](https://github.com/rkomtchuente/eonet/blob/main/dags/natural_events_ETL.py): `dags/natural_events_ETL.py`

### Event storage

- **PostgreSQL Events**
- [Table schema SQL](https://github.com/rkomtchuente/eonet/blob/main/tablecreation.sql): `tablecreation.sql`

### Data access

- [Events API](https://github.com/rkomtchuente/eonet/blob/main/api/main.py): `api/main.py`
- [Tableau workbook](https://github.com/rkomtchuente/eonet/blob/main/eonet%20events.twb): `eonet events.twb`

### Other components

- **Airflow scheduler**
- **NASA EONET API**
- **API client**

## Connections

- Airflow scheduler → Hourly DAG: runs (evidence: `dags/eonet_dag.py`)
- Hourly DAG → EONET ETL: calls (evidence: `dags/eonet_dag.py`)
- EONET ETL → NASA EONET API: fetches events (evidence: `dags/natural_events_ETL.py`)
- EONET ETL → PostgreSQL Events: upserts events (evidence: `dags/natural_events_ETL.py`)
- API client → Events API: requests events (evidence: `api/main.py`)
- Events API → PostgreSQL Events: queries events (evidence: `api/main.py`)
