TreacherousDev / Stormchaser

A real-time typhoon visualization system that scrapes and animates Western Pacific typhoon data.
MIT License
5 stars 2 forks source link

Project Stormchaser πŸŒ€

A simulated real-time typhoon visualization system that scrapes and animates tropical storms worldwide.
See releases for app installation

11261-ezgif com-video-to-gif-converter

🌟 Features

πŸ›  Technical Components

Map Generation (map_maker.py)

Typhoon Data Scraper (typhoon_scraper.py)

Visualization Engine (stormchaser.py)

🎨 Visualization Features

Typhoon Representation

Animation Effects

πŸš€ Getting Started

Prerequisites

pip install -r requirements.txt

Required packages:

Running the Application

  1. Generate the map (first run only):

    python scripts/map_maker.py
  2. Start the visualization:

    python scripts/stormchaser.py

Controls

πŸ“Š Data Structure

Typhoon Object Format

{
    "name": str,            # Typhoon name
    "path": [{
        "time": str,        # Format: "YYYY-MM-DD HH:MM"
        "lat": float,       # Latitude
        "long": float,      # Longitude
        "class": int,       # Intensity category (0-5)
        "speed": str,       # Wind speed in km/h
        "pressure": int     # Pressure in hPa
    }],
    "start_time": int       # Animation start time offset
}

βš™οΈ Configuration

Key parameters that can be adjusted:

# Time scaling
TIME_SCALE_FACTOR = 1 / (12 * 60 * 60)  # 1 second = 12 hours

# Screen dimensions
SCREEN_WIDTH, SCREEN_HEIGHT = 1200, 900

# Animation parameters
fade_in_duration = 1
fade_out_duration = 0.5
fps_target = 120

πŸ› οΈ Building from Source

  1. Install pyinstaller

    pip install pyinstaller
  2. Navigate to the root folder (example):

    cd C:\Users\User\Documents\GitHub\Project Stormchaser
  3. Run the following command:

    pyinstaller --add-data "resources/*;resources" --add-data "data/*;data" --noconsole --icon=resources\_stormchaser.ico scripts/stormchaser.py
  4. View the output dist folder in file explorer and go inside _internals

  5. Move both the data and resources folder outside, so the structure will look like this:

    ─dist
    β”‚   └───stormchaser
    β”‚       β”œβ”€β”€β”€data
    β”‚       β”œβ”€β”€β”€resources
    β”‚       └───_internal
    β”‚           β”œβ”€β”€β”€cartopy
    β”‚           β”œβ”€β”€β”€certifi
    β”‚           β”œβ”€β”€β”€...other
  6. Launch the executable located inside stormchaser, and ensure it is working correctly.

  7. You can now package stormchaser as a ZIP, or use software installer setups like Inno Setup Compiler

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ™ Acknowledgments