RadarRedo / README.md
nakas's picture
Fix Hugging Face configuration in README.md
7bcb429
|
Raw
History Blame Contribute Delete
5.48 kB
---
title: RadarRedo
emoji: ๐ŸŒฆ๏ธ
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: "4.44.0"
app_file: app.py
pinned: false
license: gpl-3.0
short_description: Transform Canadian radar data to American color standards
---
# ๐ŸŒฆ๏ธ RadarRedo: Radar Reclassification System
A powerful system that transforms Canadian weather radar data to American color standards while preserving meteorological accuracy.
## ๐Ÿ”ฅ Key Features
- **Real-time Radar Processing**: Fetches live Canadian radar data from Environment Canada
- **Intelligent Color Detection**: Uses K-means clustering to identify unique radar colors
- **DBZ Mapping**: Maps colors to accurate reflectivity values (dBZ)
- **Color Reclassification**: Converts Canadian color scheme to American NWS standards
- **Interactive Interface**: Three-tab Gradio interface for exploration and analysis
- **Color Analysis**: Detailed analysis of radar color distributions
## ๐Ÿ› ๏ธ Installation
1. **Clone the repository**:
```bash
git clone <repository-url>
cd RadarRedo
```
2. **Install dependencies**:
```bash
pip install -r requirements.txt
```
3. **Run the application**:
```bash
python app.py
```
4. **Open your browser** to `http://localhost:7860`
## ๐ŸŽฏ How It Works
### 1. Data Acquisition
- Fetches radar tiles from Environment Canada's MSC GeoMet WMS service
- Supports multiple radar types: Rain, Snow, Composite, 24h/6h precipitation
### 2. Color Detection & Analysis
- Uses K-means clustering to identify dominant colors in radar images
- Handles transparency and anti-aliasing artifacts
- Maps detected colors to corresponding DBZ (reflectivity) values
### 3. Color Reclassification
- Converts Canadian color scheme to American NWS standards
- Preserves meteorological data integrity during transformation
- Maintains accurate DBZ-to-color relationships
### 4. Visualization
- Interactive maps with original and reclassified radar overlays
- Color scale comparisons between Canadian and American standards
- Detailed color analysis and distribution reports
## ๐Ÿ“Š Color Standards
### Canadian (ECCC) Scale
- Environment and Climate Change Canada color scheme
- Optimized for Canadian meteorological standards
- Range: -30 to +70 dBZ
### American (NWS) Scale
- National Weather Service color scheme
- Standard for US meteorological applications
- Range: -30 to +70 dBZ with different color mappings
## ๐ŸŽฎ Usage
### Tab 1: Original Canadian Radar
- View real-time Canadian radar data
- Select different radar layers (Rain, Snow, Composite)
- Adjust opacity and update frequency
### Tab 2: Reclassified Radar (American Colors)
- Generate reclassified radar with American color scheme
- Customize bounding box for specific geographic areas
- Compare side-by-side with original data
### Tab 3: Color Analysis
- Analyze color distributions in radar images
- View detailed DBZ mappings
- Generate color scale comparison charts
## ๐Ÿงช Testing
Run the test suite to verify functionality:
```bash
python test_reclassification.py
```
This will test:
- Color detection accuracy
- DBZ mapping precision
- Color scale consistency
- Legend generation
## ๐Ÿ—๏ธ Architecture
```
RadarRedo/
โ”œโ”€โ”€ app.py # Main Gradio application
โ”œโ”€โ”€ radar_processor.py # Core image processing logic
โ”œโ”€โ”€ test_reclassification.py # Test suite
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ CLAUDE.md # Development guidance
โ””โ”€โ”€ README.md # This file
```
### Core Components
- **CanadianRadarApp**: Main application class with Folium integration
- **RadarImageProcessor**: Image processing and color reclassification engine
- **RadarColorScale**: Predefined color standards for Canadian and American systems
- **ColorDBZMapping**: Data structure for color-to-reflectivity mappings
## ๐ŸŒ Geographic Coverage
- **Primary Coverage**: Canada and northern United States
- **Data Source**: Environment and Climate Change Canada (ECCC)
- **Update Frequency**: Every 10 minutes
- **Resolution**: 1km for radar data
## ๐Ÿ”ง Configuration
### Bounding Box Format
Specify geographic bounds as: `West, South, East, North`
Example (Toronto area): `-80.0, 43.0, -78.0, 45.0`
### Available Radar Layers
- **RADAR_1KM_RRAI**: Rain radar (1km resolution)
- **RADAR_1KM_RSNO**: Snow radar (1km resolution)
- **RADAR_1KM_RDBR**: Composite radar
- **RDPA.24F_PR**: 24-hour precipitation accumulation
- **RDPA.6F_PR**: 6-hour precipitation accumulation
## ๐Ÿ“ˆ Performance
- **Color Detection**: ~1-2 seconds for 512x512 images
- **Reclassification**: ~2-3 seconds per image
- **Memory Usage**: ~50-100MB during processing
- **Network**: Dependent on WMS response times
## ๐Ÿš€ Future Enhancements
- Support for additional radar color standards (European, Australian)
- Batch processing for multiple radar regions
- Historical radar data analysis
- Machine learning-based color prediction
- Real-time streaming updates
## ๐Ÿค Contributing
1. Fork the repository
2. Create a feature branch
3. Run tests: `python test_reclassification.py`
4. Submit a pull request
## ๐Ÿ“„ License
GPL-3.0 License - see LICENSE file for details
## ๐Ÿ™ Acknowledgments
- Environment and Climate Change Canada for radar data
- National Weather Service for color standard references
- Gradio team for the excellent interface framework
---
**Built with โค๏ธ for the meteorological community**