Weather Data Explorer is an interactive Streamlit-based web application designed to fetch historical climate data from the Open-Meteo API and convert it into DSSAT-compliant (.WTH) weather files. It also provides a comprehensive analytics dashboard for climate trend visualization and quality assurance.
-
Interactive Map Selection: Select any global location using an integrated Folium map to fetch precise coordinates.
-
Automated .WTH Generation: Converts API data into the specialized DSSAT file format with accurate headers and
YYYYDDDdate formatting. -
Geopy Integration: Automatically performs reverse geocoding to retrieve city, state, and country names for professional file headers.
-
Dynamic Analytics Dashboard:
-
Temperature Analysis: Monthly boxplots and daily line charts for and .
-
Rainfall Analysis: Bar charts for daily and monthly precipitation totals.
-
Outlier Detection: Visual identification of temperature anomalies using the Interquartile Range (IQR) method.
-
Smart Scaling: Graphs automatically scale their Y-axis based on data peaks plus 10 units for optimal visibility.
-
Quality Assurance: Automated checks for missing values (-99.0) and logical consistency (e.g., ).
- Clone the repository:
git clone https://github.com/yourusername/weather_dashboard.git
cd weather_dashboard
- Create a virtual environment (Recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install streamlit pandas numpy matplotlib seaborn requests folium streamlit-folium plotly geopy
Run the application locally using the following command:
streamlit run weather_dashboard.py
- Generate: Click on the map to select a location, choose your start and end dates, and click Generate Weather Data.
- Download: Once generated, click the Download .WTH File button to save the DSSAT-compliant file.
- Analyze: Use the dashboard filters to explore climate patterns, view summary statistics, and check for outliers.
- Upload: Have an existing file? Use the Upload tab to visualize any standard DSSAT
.WTHfile.
The best way to share this app is through Streamlit Community Cloud:
- Push your code to a public GitHub repository.
- Include a
requirements.txtfile in the root directory. - Connect your GitHub to share.streamlit.io and deploy.
- Python 3.9 - 3.13
- Internet connection (to access Open-Meteo and Open-Elevation APIs)
Created for agricultural researchers and climate analysts. This application was developed as part of the Generative AI for Agriculture (GAIA) project, funded by the Gates Foundation and the UK International Development from the UK government, in collaboration with CGIAR and the University of Florida.