How ponjour0602/tokyo-sakura-blossom-prediction works
Project type and purpose
• This is a data‐science/ML pipeline project for predicting Tokyo cherry‐blossom bloom dates.
• It ingests raw historical bloom‐date and weather data, preprocesses it, then runs three prediction methods: the 600-Degree Rule, a regression model, and an MLP (PyTorch) model.
File structure
• Top-level directories:
• Data Collection: Jupyter notebooks to crawl historical bloom dates and weather.
• Dataset: CSV files (raw and split into train/test).
• Prediction: Three sub-folders for each modeling approach (600 Degree Rule, Linear Regression, MLP with various feature sets).
• README.md describes overall flow, model details, data sources, and evaluation metrics (MSE, RMSE, R²).
Main components
a. External Data Sources
• Japan Meteorological Agency API / Website (weather, bloom dates)
b. Data‐Collection Module
• Notebook: “Data Crawler for Blossom Date.ipynb”
• Notebook: “Data Crawler for Tokyo Weather.ipynb”
c. Data Preprocessing Module
• Notebook: “Data Preprocessing.ipynb”
• Output: weather_dataset.csv
d. Dataset Storage
• Raw CSVs (weather_dataset.csv)
• Train/Test splits (train.csv, test.csv)
e. Prediction Modules
• 600-Degree Rule (notebook)
• Regression Model (Linear Regression using DTS formula)
• MLP Model (three notebooks for Feature=5,6,11)
f. Evaluation & Reporting
• Metrics computation: MSE, RMSE, R²
• Final comparisons
Relationships & data flow
• Data‐Collection Module → Data Preprocessing Module → Dataset Storage
• Dataset Storage → each Prediction Module
• Prediction Modules → Evaluation & Reporting component
• Optionally, loop from Evaluation back to Data Preprocessing for feature engineering
Architectural patterns & design principles
• A linear ETL (Extract-Transform-Load) pipeline followed by parallel model execution
• Separation of concerns: crawling, preprocessing, modeling, and evaluation are distinct
• Modularity: each model runs in its own notebook folder, making it simple to add/remove methods
Relevant technologies, frameworks & libraries
• Python + Jupyter notebooks (data exploration & orchestration)
• pandas, NumPy (data manipulation)
• scikit-learn (regression)
• PyTorch (MLP)
• CSV storage
• (Optional) cron or workflow manager (Airflow/Prefect) for scheduling