A clean, beautiful Streamlit app that shows real-time weather for Nigerian cities and gives practical daily recommendations; clothing, hydration, rain, sun protection, wind, and activity tips.
# 🌤️ Nigeria Weather Advisor
A clean, beautiful Streamlit app that shows real-time weather for Nigerian cities and gives practical daily recommendations — clothing, hydration, rain, sun protection, wind, and activity tips.
---
## Project Structure
```
nigeria-weather-advisor/
├── app.py # Main Streamlit app
├── nigeria_cities_by_state.json # City data (38 states, 480 cities)
├── requirements.txt
├── .env # Your API key (local — do NOT commit)
├── .env.example # Template for .env
└── .streamlit/
└── secrets.toml # For Streamlit Cloud deployment
```
---
## ⚙️ Local Setup
### 1. Clone / copy project files
Make sure these files are all in the same folder:
- `app.py`
- `nigeria_cities_by_state.json`
- `requirements.txt`
- `.env`
### 2. Create a virtual environment (recommended)
```bash
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Set your OpenWeather API key
Get a free API key at
openweathermap.org
Copy `.env.example` to `.env` and fill in your key:
```bash
cp .env.example .env
```
Edit `.env`:
```
OPENWEATHER_API_KEY=your_actual_key_here
```
### 5. Run the app
```bash
streamlit run app.py
```
The app opens at `
localhost`
---
## 💡 Recommendations Explained
| Category | What it checks |
|----------------|--------------------------------------------|
| 👕 Clothing | Feels-like temperature |
| 💧 Hydration | Temperature + humidity |
| ☂️ Rain | Weather condition + humidity |
| 🕶️ Sun | Clear sky + temperature |
| 💨 Wind | Wind speed in km/h |
| 🏃 Activity | Overall conditions for going outside |
---
## Notes
- Uses the **OpenWeat …