How dhecaptain/uasingishu-cropstudy works
This is an applied-statistics project studying climate variability and maize yield in Uasin Gishu, Kenya. Its workflow cleans station and yield data, engineers climate features and an annual panel, evaluates yield models, then presents the study through an interactive Streamlit dashboard. The README also documents descriptive, trend, correlation, group-comparison, and hypothesis-testing analyses. The cleaning, training, and dashboard excerpts support the principal data and model flows; dashboard page wiring beyond the sampled code is represented conservatively.
Main entry points: app.py Streamlit dashboard · 01_data_cleaning.py Clean and engineer · 02_model_training.py Model training · panel_annual_clean.csv Annual analysis panel
Components 16
Data preparation
- Raw climate data
data - Raw yield data
data/maize_yield.csv - Clean and engineer
01_data_cleaning.py - Clean climate data
data/cleaned - Clean yield data
data/cleaned/maize_yield_clean.csv - Annual analysis panel
data/cleaned/panel_annual_clean.csv
Statistical analysis
- Descriptive analysis
app.py - Climate trends
app.py - Yield and correlations
app.py - Hypothesis tests
app.py
Yield modeling
- Yield prediction
app.py - Model training
02_model_training.py - Saved models
models - Model metrics
models/metrics
Interactive dashboard
- Streamlit dashboard
app.py
Other components
- Dashboard user
Connections 19
- Raw climate data → Clean and engineer: loads
- Raw yield data → Clean and engineer: loads
- Clean and engineer → Clean climate data: writes
- Clean and engineer → Clean yield data: writes
- Clean and engineer → Annual analysis panel: rebuilds
- Dashboard user → Streamlit dashboard: uses
- Streamlit dashboard → Clean climate data: reads
- Streamlit dashboard → Clean yield data: reads
- Streamlit dashboard → Annual analysis panel: reads
- Streamlit dashboard → Descriptive analysis: renders
- Streamlit dashboard → Climate trends: renders
- Streamlit dashboard → Yield and correlations: renders
- Streamlit dashboard → Hypothesis tests: renders
- Streamlit dashboard → Yield prediction: renders
- Annual analysis panel → Model training: provides data
- Model training → Saved models: saves models
- Model training → Model metrics: writes metrics
- Streamlit dashboard → Saved models: loads model
- Streamlit dashboard → Model metrics: reads metrics