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 β¦