feat : Add TARDIS weather model training notebook with data loading, …#10
Closed
ErwanTheKing wants to merge 3 commits into
Closed
feat : Add TARDIS weather model training notebook with data loading, …#10ErwanTheKing wants to merge 3 commits into
ErwanTheKing wants to merge 3 commits into
Conversation
…preprocessing, model training, and evaluation
Contributor
There was a problem hiding this comment.
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 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 |
| 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 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", |
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



…preprocessing, model training, and evaluation