An interactive dashboard for analyzing climate data and solar energy potential across West African countries
Features β’ Demo β’ Installation β’ Usage β’ Deployment β’ Documentation
The Solar Challenge Dashboard is a professional, data-driven web application built with Streamlit for exploring climate patterns in Benin, Sierra Leone, and Togo. It provides comprehensive analysis of temperature and wind speed data to support renewable energy planning decisions.
- Multi-Country Comparison - Analyze climate data across three West African nations
- Interactive Visualizations - Dynamic time series, box plots, and statistical charts
- Flexible Filtering - Filter by country, date range, and metric
- Statistical Analysis - Summary statistics, top records, and distribution analysis
- Data Export - Download filtered datasets in CSV format
- Smart Data Loading - Automatic fallback to Google Drive if local files are missing
- Line charts showing temperature and wind speed trends over time
- Interactive hover details and zoom capabilities
- Country-wise color coding for easy comparison
- Key metrics dashboard (average, max, min values)
- Box plots for distribution analysis
- Summary statistics by country (mean, median, std dev, min/max)
- Color-coded tables with gradient highlighting
- Outlier detection and visualization
- Configurable top-N records display (5-50 records)
- Highest and lowest value comparisons
- Visual bar charts for extreme values
- Date and country attribution
- Complete dataset preview
- Data completeness metrics
- One-click CSV export functionality
- Real-time record counts
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βοΈ Solar Challenge Dashboard β
β Interactive Analysis of Climate Data β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β π Time Series β π Statistics β π Top Records β
β β
β [Interactive Plotly Charts] β
β [Real-time Filtering] β
β [Export Options] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- π Country Selection - Multi-select dropdown
- π Metric Selection - Temperature or Wind Speed
- π Date Range Picker - Custom date filtering
- π’ Top-N Slider - Adjustable record display
- Python 3.8 or higher
- pip package manager
- Git (for cloning)
-
Clone the Repository
git clone https://github.com/Miftah-Ebrahim/solar-challenge-week1/ cd SOLAR-CHALLENGE-WEEK1 -
Create Virtual Environment
# Windows python -m venv venv venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Run the Dashboard
cd notebooks/app streamlit run main.py
The dashboard will automatically open in your browser at http://localhost:8501
SOLAR-CHALLENGE-WEEK1/
βββ data/ # CSV data files (auto-downloaded if missing)
β βββ benin_clean.csv
β βββ sierra_leone_clean.csv
β βββ togo_clean.csv
βββ notebooks/
β βββ app/
β βββ main.py # Main Streamlit application
β βββ utils.py # Data loading and preprocessing utilities
βββ src/ # Additional Python modules (optional)
βββ .gitignore # Git ignore rules
βββ requirements.txt # Python dependencies
βββ README.md # This file
# Navigate to app directory
cd notebooks/app
# Launch dashboard
streamlit run main.py- Select Countries: Choose one or more countries from the sidebar
- Pick a Metric: Select Temperature (T2M) or Wind Speed (WS10M_MIN)
- Set Date Range: Filter data by specific time period
- Explore Tabs:
- π View time series trends
- π Compare statistical distributions
- π Analyze extreme values
- π Export filtered data
Each CSV file must contain the following columns:
YEAR- Year (integer)MO- Month (1-12)DY- Day (1-31)T2M- Temperature at 2 meters (Β°C)WS10M_MIN- Minimum wind speed at 10 meters (m/s)
-
Push to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Deploy on Streamlit
- Visit share.streamlit.io
- Click "New app"
- Select your repository
- Set main file path:
notebooks/app/main.py - Click "Deploy"
-
Automatic Data Loading
- If CSV files are not in the repository, the app automatically downloads them from Google Drive
- First load may take 10-15 seconds for downloads
- Subsequent loads use cached data
For production deployments, you can set custom configurations in Streamlit Cloud:
[server]
maxUploadSize = 200
[theme]
primaryColor = "#FF6B35"
backgroundColor = "#FFFFFF"
secondaryBackgroundColor = "#F0F2F6"To use different data sources, update GDRIVE_URLS in utils.py:
GDRIVE_URLS = {
'benin': 'YOUR_GOOGLE_DRIVE_LINK',
'sierra_leone': 'YOUR_GOOGLE_DRIVE_LINK',
'togo': 'YOUR_GOOGLE_DRIVE_LINK'
}- Add CSV file to
data/folder with naming convention:{country_name}_clean.csv - Update
GDRIVE_URLSdictionary inutils.py - CSV will automatically appear in country selection dropdown
Adjust cache time-to-live in utils.py:
@st.cache_data(ttl=7200) # Cache for 2 hours instead of 1| Technology | Purpose | Version |
|---|---|---|
| Streamlit | Web framework | 1.29.0 |
| Pandas | Data manipulation | 2.1.4 |
| Plotly | Interactive visualizations | 5.18.0 |
| Requests | HTTP downloads | 2.31.0 |
| NumPy | Numerical computing | 1.26.2 |
Loads CSV data for a specific country, with automatic Google Drive fallback.
Creates datetime index, handles missing values, and prepares data for analysis.
Filters dataset by selected countries and date range.
Computes statistical summaries grouped by country.
Issue: FileNotFoundError: Data file not found
- Solution: Ensure CSV files are in
data/folder or check internet connection for Google Drive downloads
Issue: ModuleNotFoundError: No module named 'streamlit'
- Solution: Activate virtual environment and run
pip install -r requirements.txt
Issue: Port already in use
- Solution: Run
streamlit run main.py --server.port 8502
Issue: Deprecated fillna warning
- Solution: Already fixed in latest version using
.ffill()and.bfill()
- π§ Open an issue on GitHub
- π¬ Check Streamlit Community Forum
- π Review Streamlit Documentation
- Follow PEP 8 style guidelines
- Add docstrings to all functions
- Include type hints where applicable
- Update README for new features
- Test locally before pushing
This project is licensed under the MIT License - see the LICENSE file for details.
- Data Source: Solar Challenge Project - Week 1
- Framework: Built with Streamlit
- Visualizations: Powered by Plotly
- Region: West Africa Climate Data (Benin, Sierra Leone, Togo)
Project Maintainer: [Mifta Yibrahim]
- GitHub: [(https://github.com/Miftah-Ebrahim/)]
- Email: miftah6972@gmail.com
- LinkedIn: https://www.linkedin.com/in/miftah-ebrahim
Built with β€οΈ for renewable energy research in West Africa