Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esoltys/weather_visualizer
FastAPI-based web application that visualizes historical weather patterns using data from the NOAA Climate Data Online (CDO) API. It allows users to select weather stations on a map, choose a date range, and view temperature trends over time.
https://github.com/esoltys/weather_visualizer
arcgis-js-api chartjs fastapi noaa-historical-data
Last synced: about 12 hours ago
JSON representation
FastAPI-based web application that visualizes historical weather patterns using data from the NOAA Climate Data Online (CDO) API. It allows users to select weather stations on a map, choose a date range, and view temperature trends over time.
- Host: GitHub
- URL: https://github.com/esoltys/weather_visualizer
- Owner: esoltys
- License: mit
- Created: 2024-07-31T18:27:55.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-30T16:43:18.000Z (4 months ago)
- Last Synced: 2024-11-09T02:44:43.441Z (about 2 months ago)
- Topics: arcgis-js-api, chartjs, fastapi, noaa-historical-data
- Language: JavaScript
- Homepage:
- Size: 2.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Historical Weather Patterns Visualizer
This project is a web application that visualizes historical weather patterns using data from the NOAA Climate Data Online (CDO) API. It allows users to select weather stations on a map, choose a date range, and view temperature trends over time.
![Screenshot](screenshot.png)
## Features
- Interactive map interface for selecting weather stations
- Detailed station information display with available date ranges
- Custom date range selection for data retrieval
- Temperature trend visualization using line charts
- Zoom functionality for detailed data exploration
- Automatic date range adjustment based on data availability
- Clear error messaging and data availability alerts
- Backend API for efficient data retrieval from NOAA Climate Data Online (CDO)
- Responsive design for various device sizes## Prerequisites
Before you begin, ensure you have met the following requirements:
- Python 3.7+
- pip (Python package manager)
- A NOAA Climate Data Online (CDO) API key## Installation
1. Clone the repository:
```
git clone https://github.com/esoltys/weather-patterns-visualizer.git
cd weather-patterns-visualizer
```2. Create a virtual environment and activate it:
```
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```3. Install the required packages:
```
pip install -r requirements.txt
```4. Set up your NOAA API key:
- Request a key from https://www.ncdc.noaa.gov/cdo-web/token
- Add your NOAA CDO API key to the `.env` file:
```
NOAA_API_TOKEN=your_actual_api_token_here
```## Usage
1. Start the FastAPI server:
```
cd backend
uvicorn main:app --reload
```2. Open a web browser and navigate to `http://localhost:8000`
3. Use the application:
- Select a weather station on the map
- Choose a start and end date
- Click "Fetch Weather Data" to view the temperature trend## Architecture
```mermaid
graph TB
User((User))subgraph "Weather Visualizer Application"
FrontendApp["Frontend Application
(JavaScript)"]
BackendServer["Backend Server
(FastAPI)"]
StaticFileServer["Static File Server
(FastAPI StaticFiles)"]
endsubgraph "External Services"
NOAAAPI["NOAA Climate Data Online API
(External)"]
endUser --> FrontendApp
FrontendApp --> BackendServer
FrontendApp --> StaticFileServer
BackendServer --> NOAAAPIclassDef frontend fill:#1168bd,stroke:#0b4884,color:#ffffff
classDef backend fill:#2694ab,stroke:#1a6d7d,color:#ffffff
classDef external fill:#999999,stroke:#666666,color:#ffffffclass FrontendApp frontend
class BackendServer,StaticFileServer backend
class NOAAAPI external```
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments
- NOAA for providing the Climate Data Online API
- ArcGIS for their JavaScript API
- Chart.js for data visualization