Spaces:
Sleeping
Sleeping
File size: 3,727 Bytes
9fc6b05 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# Weather Dashboard for BYU Locations
## Overview
This Streamlit application provides weather insights for various BYU locations. Users can explore weather metrics, compare locations, and visualize key performance indicators (KPIs) and other weather variables. The app integrates with the Open-Meteo Weather API to fetch real-time and historical weather data.
### Features
1. **Single Location Weather:** View temperature data for a selected BYU location.
2. **Compare Locations & KPIs:** Compare weather metrics like temperature across BYU Idaho, BYU Hawaii, and BYU Provo.
3. **Variable Selection & Timezone:** Analyze multiple weather variables (e.g., Temperature, Wind Speed, Relative Humidity) with timezone options.
4. **Summary Metrics Across Cities:** View combined metrics and boxplots for weather variables across cities.
---
## Technologies Used
- **Streamlit**: Frontend interface for interactivity.
- **Polars**: High-performance dataframe library for data manipulation.
- **Requests**: Fetches weather data from the Open-Meteo API.
- **Matplotlib**: Visualizes weather trends and comparisons.
---
## Setup and Installation
Follow the steps below to get the app running locally:
### 1. Prerequisites
Ensure the following are installed:
- Python 3.8 or higher
- pip (Python package manager)
### 2. Clone the Repository
```bash
git clone <repository-link>
cd <repository-folder>
```
### 3. Install Dependencies
Run the following command to install required Python packages:
```bash
pip install -r requirements.txt
```
**Note**: Ensure `streamlit`, `polars`, `matplotlib`, and `requests` are included in your `requirements.txt`.
### 4. Project Directory Structure
The app assumes the following directory structure:
```
project-folder/
|βββ APIs/
|βββ pages/
| |βββ single_location.py
| |βββ compare_locations.py
| |βββ variable_selection.py
| |βββ summary_metrics.py
|βββ screenshots/
|βββ utils/
| |βββ weather_api.py
|βββ streamlit_app.py
|βββ requirements.txt
|βββ README.md
|βββ docker-compose.yaml
|βββ Dockerfile
```
### 5. Run the Application
Launch the app using Streamlit:
```bash
streamlit run streamlit_app.py
```
The app will open in your browser at `http://localhost:8501`.
---
## Usage Instructions
### Sidebar Navigation
The sidebar allows you to navigate between different app sections:
- **Single Location Weather**: Select a BYU location and view temperature data.
- **Compare Locations & KPIs**: Compare weather metrics across multiple locations.
- **Variable Selection & Timezone**: Analyze weather variables like temperature, wind speed, and humidity.
- **Summary Metrics Across Cities**: View combined metrics and visualizations.
### Input Parameters
- **Date Range**: Select a start and end date for fetching weather data.
- **Locations**: Choose from predefined BYU locations (Provo, Hawaii, Idaho).
- **Timezone Selection**: For variable analysis, choose between `America/Denver` or `Pacific/Honolulu`.
---
## API Details
- **Source**: [Open-Meteo API](https://open-meteo.com/)
- **Endpoint**: `https://api.open-meteo.com/v1/forecast`
- **Variables Supported**: Temperature, Wind Speed, Relative Humidity
---
## Screenshots
### Single Location Weather

### Compare Locations

### Variable Selection

### Summary Metrics

---
## Author
Christian Landaverde
---
## Acknowledgements
- Open-Meteo API for weather data.
- Streamlit for the interactive dashboard.
|