Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Space Weather Visualizer

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.

Why Space Weather Matters

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.

Features

  • 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

Tech Stack

Layer Technology
Language Python 3.x
Primary API NASA DONKI API
Visualization matplotlib / streamlit

Installation

Prerequisites

Steps

# 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.py

API Configuration

This project uses NASA's DONKI API.

  1. Visit https://api.nasa.gov and register for a free API key.
  2. Replace the placeholder in app.py:
    API_KEY = "your_nasa_api_key_here"
    Or set it as an environment variable NASA_API_KEY.

Note: The demo key (DEMO_KEY) works for basic testing but has strict rate limits.

What Gets Visualized

Solar Flares

  • Event time, peak time, class (A/B/C/M/X), and active region number

Coronal Mass Ejections (CMEs)

  • Ejection time, estimated speed (km/s), half-angle, and Earth-impact analysis

Geomagnetic Storms

  • Start and end times, Kp index (0–9 scale), storm category (minor → extreme)

High Speed Streams & SEP Events

  • Solar wind stream details and energetic particle data

NASA APIs Used

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/

Author

Himanshu B.Tech CSE, Shiv Nadar University (2027) GitHub

About

Real-time space weather visualization using NASA DONKI APIs — monitor solar flares, CMEs, geomagnetic storms, and solar energetic particle events with Python.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages