Skip to content

feat : Add TARDIS weather model training notebook with data loading, …#10

Closed
ErwanTheKing wants to merge 3 commits into
mainfrom
feature/model_meteo
Closed

feat : Add TARDIS weather model training notebook with data loading, …#10
ErwanTheKing wants to merge 3 commits into
mainfrom
feature/model_meteo

Conversation

@ErwanTheKing

Copy link
Copy Markdown
Collaborator

…preprocessing, model training, and evaluation

…preprocessing, model training, and evaluation
Copilot AI review requested due to automatic review settings May 26, 2026 13:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Meteo-France weather modeling workflow to TARDIS: a training notebook to build weather regression pipelines, auxiliary model training for rain/wind estimation, and a new “Meteo/Weather” section in the Streamlit dashboard to explore and predict weather metrics.

Changes:

  • Added a Jupyter notebook to load the cleaned Meteo dataset, train/compare multiple regressors, and export joblib artifacts + metadata.
  • Extended the Streamlit dashboard with a Meteo page (filters, exploration charts, audit display, and temperature prediction using saved weather models).
  • Added a script to train auxiliary “RR” (rain) and “FFM” (wind) models used to enrich the dashboard’s weather context.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 5 comments.

File Description
tardis_meteo_model.ipynb New notebook to train/evaluate/export weather prediction pipelines from the cleaned Meteo-France dataset.
tardis_dashboard.py Adds Meteo navigation + UI, loads Meteo dataset/audit, discovers weather models, and performs weather predictions in-app.
scripts/model/train_meteo_aux.py New CLI-style training script for auxiliary rain/wind models used by the dashboard.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tardis_dashboard.py
Comment on lines +498 to +507
@st.cache_data
def load_meteo_data() -> pd.DataFrame:
path = "data/processed/meteo/cleaned_meteo_dataset.csv"
available = pd.read_csv(path, nrows=0).columns.tolist()
usecols = [col for col in METEO_FEATURES if col in available]
df = pd.read_csv(path, usecols=usecols, parse_dates=["date"], low_memory=False)
if "date" in df.columns:
df["day_of_week"] = df["date"].dt.dayofweek
df["day_of_year"] = df["date"].dt.dayofyear
return df
Comment thread tardis_dashboard.py Outdated
Comment thread tardis_dashboard.py Outdated
Comment thread tardis_dashboard.py
if col in station_month.columns
]
vals = station_month[numeric_cols].median(numeric_only=True)
vals["NUM_POSTE"] = station_month["NUM_POSTE"].mode().iloc[0]
Comment thread tardis_dashboard.py
Comment on lines 21 to +33
TARGET = "Average delay of all trains at arrival"
METEO_TARGET = "TM"
METEO_FEATURES = [
"NUM_POSTE",
"NOM_USUEL",
"LAT",
"LON",
"ALTI",
"RR",
"TN",
"TX",
"TM",
"FFM",
sacha-lma and others added 2 commits May 27, 2026 11:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sacha-lma sacha-lma closed this May 27, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants