A Python-based application that fetches and visualizes real-time space weather data using NASA and NOAA APIs. Tracks solar activity including solar flares, geomagnetic storms, coronal mass ejections (CMEs), and more — making space weather accessible and visually interpretable.
Space weather events can disrupt GPS systems, power grids, satellite communications, and aviation. This tool makes it easy to monitor and understand solar activity that could have real-world impacts on technology and infrastructure.
- Real-time data ingestion from NASA's DONKI (Space Weather Database Of Notifications, Knowledge, Information) API
- Tracks and displays key space weather events:
- Solar Flares (class, intensity, duration)
- Coronal Mass Ejections (CMEs) and their Earth-impact probability
- Geomagnetic Storms (Kp index, severity)
- Solar Energetic Particles (SEP) events
- Clean data parsing and human-readable event summaries
- Lightweight Python backend with minimal dependencies
| Layer | Technology |
|---|---|
| Language | Python 3.x |
| Primary API | NASA DONKI API |
| Visualization | matplotlib / streamlit |
- Python 3.8 or above
- A free NASA API key — get one at https://api.nasa.gov
# 1. Clone the repository
git clone https://github.com/Himan1807/space-weather-visualizer.git
cd space-weather-visualizer
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set your NASA API key
export NASA_API_KEY=your_api_key_here
# 4. Run the app
python app.pyThis project uses NASA's DONKI API.
- Visit https://api.nasa.gov and register for a free API key.
- Replace the placeholder in
app.py:Or set it as an environment variableAPI_KEY = "your_nasa_api_key_here"
NASA_API_KEY.
Note: The demo key (
DEMO_KEY) works for basic testing but has strict rate limits.
- Event time, peak time, class (A/B/C/M/X), and active region number
- Ejection time, estimated speed (km/s), half-angle, and Earth-impact analysis
- Start and end times, Kp index (0–9 scale), storm category (minor → extreme)
- Solar wind stream details and energetic particle data
| API | Endpoint | Description |
|---|---|---|
| DONKI FLR | /DONKI/FLR |
Solar flare events |
| DONKI CME | /DONKI/CME |
Coronal mass ejection data |
| DONKI GST | /DONKI/GST |
Geomagnetic storm events |
| DONKI SEP | /DONKI/SEP |
Solar energetic particle events |
Full API docs: https://ccmc.gsfc.nasa.gov/tools/DONKI/
Himanshu B.Tech CSE, Shiv Nadar University (2027) GitHub