A real-time Wet Bulb Globe Temperature (WBGT) monitoring app for Brazil, designed to assess heat stress risks using weather data from Visual Crossing API.
- Real-Time WBGT Calculation:
Uses temperature, humidity, wind speed, and solar radiation data. - Heat Stress Risk Levels:
Categorizes risk from Safe to Extreme Danger. - Interactive Visualization:
Displays WBGT risk zones with current conditions. - Data Transparency:
Shows the number of weather stations used for accuracy. - City Selection:
Supports multiple Brazilian cities with coordinates.
-
Clone the repository:
git clone https://github.com/aime-n/heat-stress.git cd wbgt-app -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up your
.envfile:VISUALCROSSING_API_KEY=your_api_key_here
-
Run the app:
streamlit run app.py
-
Select a Brazilian city from the dropdown.
-
View real-time:
- WBGT calculation
- Heat stress risk level
- Weather station data
- Interactive risk zone graph
wbgt-app/
├── .env # Environment variables
├── .gitignore # Git ignore rules
├── README.md # This file
├── requirements.txt # Python dependencies
├── cities.csv # Brazilian cities data
└── src/
└── wbgt_app/ # Main application package
├── __init__.py # Package initialization
├── app.py # Streamlit app entry point
├── api_client.py # Weather data fetching
├── calculations.py # WBGT formulas
├── data_loader.py # Cities data loading
├── visualizations.py # Plotly graphs
└── sidebar/ # Sidebar content
├── __init__.py
├── faq.py # FAQ content
├── accuracy_notes.py # Accuracy info
├── about.py # About the app
└── contact.py # Contact info
This app uses the Visual Crossing Weather API.
Get a free API key and add it to your .env file.
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License. See LICENSE for details.
For questions or feedback, contact:
📧 aime.nobrega@gmail.com