# abdeladimyacine-create/goutte_eau_mvp architecture

> Architecture diagram of the GitHub repository abdeladimyacine-create/goutte_eau_mvp, 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/abdeladimyacine-create/goutte_eau_mvp
- Repository: https://github.com/abdeladimyacine-create/goutte_eau_mvp

## Overview

Goutte d’Eau is a Paris rainfall-risk forecasting MVP. Its main workflow collects Infoclimat observations, cleans and aggregates them into daily records, trains a next-day model, then serves predictions through a REST API that the Streamlit interface calls for an end user. The graph also includes station selection and the separate raw and daily database stages. The README documents this full chain; the sampled source confirms the collection, transformation, training, API, and interface calls. Other unsampled details are represented only where documented.

Main entry points: [`api.py`](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/api.py) (Forecast API), [`entrainement.py`](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/entrainement.py) (Model training), [`data/meteo.db`](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/data/meteo.db) (Daily observations), [`collecte.py`](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/collecte.py) (Observation collection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Data acquisition"]
  node_station_selection["Station selection<br/>[choisir_station.py]"]
  node_collection["Observation collection<br/>[collecte.py]"]
end

subgraph group_preparation["Data and modeling"]
  node_cleaning["Daily aggregation<br/>[nettoyage.py]"]
  node_features["Feature engineering<br/>[features.py]"]
  node_training["Model training<br/>[entrainement.py]"]
end

subgraph group_serving["Forecast delivery"]
  node_api["Forecast API<br/>[api.py]"]
  node_interface["Demo interface<br/>[app.py]"]
end

subgraph group_state["Persistent state"]
  node_raw_data[("Raw observations<br/>[meteo.db]")]
  node_daily_data[("Daily observations<br/>[meteo.db]")]
  node_model_artifacts["Model and metrics<br/>[modele.joblib]"]
end

node_user(("End user"))
node_infoclimat["Infoclimat API"]

node_station_selection -->|"compares stations"| node_infoclimat
node_collection -->|"fetches observations"| node_infoclimat
node_collection -->|"writes raw data"| node_raw_data
node_cleaning -->|"reads raw data"| node_raw_data
node_cleaning -->|"writes daily data"| node_daily_data
node_training -->|"reads daily data"| node_daily_data
node_training -->|"prepares features"| node_features
node_training -->|"saves model and metrics"| node_model_artifacts
node_api -->|"reads daily data"| node_daily_data
node_api -->|"prepares prediction features"| node_features
node_api -->|"loads model and metrics"| node_model_artifacts
node_interface -->|"requests forecasts"| node_api
node_user -->|"chooses forecast date"| node_interface

click node_station_selection "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/choisir_station.py"
click node_collection "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/collecte.py"
click node_raw_data "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/data/meteo.db"
click node_cleaning "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/nettoyage.py"
click node_daily_data "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/data/meteo.db"
click node_features "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/features.py"
click node_training "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/entrainement.py"
click node_model_artifacts "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/model/modele.joblib"
click node_api "https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/api.py"
click node_interface "https://github.com/abdeladimyacine-create/goutte_eau_mvp/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_station_selection,node_collection,node_user toneBlue
class node_cleaning,node_features,node_training toneAmber
class node_api,node_interface,node_infoclimat toneMint
class node_raw_data,node_daily_data,node_model_artifacts toneRose
```

## Components

### Data acquisition

- [Station selection](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/choisir_station.py): `choisir_station.py`
- [Observation collection](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/collecte.py): `collecte.py`

### Data and modeling

- [Daily aggregation](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/nettoyage.py): `nettoyage.py`
- [Feature engineering](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/features.py): `features.py`
- [Model training](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/entrainement.py): `entrainement.py`

### Forecast delivery

- [Forecast API](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/api.py): `api.py`
- [Demo interface](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/app.py): `app.py`

### Persistent state

- [Raw observations](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/data/meteo.db): `data/meteo.db`
- [Daily observations](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/data/meteo.db): `data/meteo.db`
- [Model and metrics](https://github.com/abdeladimyacine-create/goutte_eau_mvp/blob/main/model/modele.joblib): `model/modele.joblib`

### Other components

- **End user**
- **Infoclimat API**

## Connections

- Station selection → Infoclimat API: compares stations (evidence: `choisir_station.py`)
- Observation collection → Infoclimat API: fetches observations (evidence: `collecte.py`)
- Observation collection → Raw observations: writes raw data (evidence: `collecte.py`)
- Daily aggregation → Raw observations: reads raw data (evidence: `nettoyage.py`)
- Daily aggregation → Daily observations: writes daily data (evidence: `nettoyage.py`)
- Model training → Daily observations: reads daily data (evidence: `entrainement.py`)
- Model training → Feature engineering: prepares features (evidence: `entrainement.py`)
- Model training → Model and metrics: saves model and metrics (evidence: `README.md`)
- Forecast API → Daily observations: reads daily data (evidence: `api.py`)
- Forecast API → Feature engineering: prepares prediction features (evidence: `api.py`)
- Forecast API → Model and metrics: loads model and metrics (evidence: `README.md`)
- Demo interface → Forecast API: requests forecasts (evidence: `app.py`)
- End user → Demo interface: chooses forecast date (evidence: `app.py`)
