Skip to main content

A tool to generate typhoon season animation videos.

Project description

Hanuman

Hanuman is a Python tool designed to generate animated videos of typhoon seasons. It processes typhoon data from a CSV file and overlays the trajectories on a world map, creating visually engaging animations that depict the paths and intensities of typhoons over time.

Features

  • Visualize Typhoon Trajectories: Overlay typhoon paths on an equirectangular world map.
  • Dynamic Animation: Generate smooth animations showing the progression of typhoons.
  • Categorization: Categorize typhoons based on wind speeds, with distinct visual markers.
  • Customizable Parameters: Adjust map cropping, frame rates, icon sizes, and more.
  • Command-Line Interface: Easy-to-use CLI for generating animations with custom configurations.

Installation

Ensure you have Python 3.6 or higher installed. You can install Hanuman directly from PyPI using pip:

pip install hanuman

Alternatively, if you prefer to install from source, clone the repository and install the package:

git clone https://github.com/yourusername/Hanuman.git
cd Hanuman
pip install .

Usage

Hanuman provides a command-line interface to generate typhoon animation videos. Below is a basic example of how to use the tool.

Basic Command

hanuman --csv typhoon202411.csv --map world_map.png --output typhoon_season_a13.mp4

And the detailed command-line arguments is below:

hanuman \
    --csv typhoon202411.csv \
    --map world_map.png \
    --output typhoon_season_a13.mp4 \
    --nw_min_lat 0.0 \
    --nw_max_lat 45.0 \
    --nw_min_lon 100.0 \
    --nw_max_lon 180.0 \
    --crop_width 1280 \
    --crop_height 720 \
    --frames_per_3h 15 \
    --fps 30 \
    --ty_icon_radius 24 \
    --ex_threshold_lat 22.0 \
    --empty_speedup_factor 25 \
    --static_frames_after_end 300

Arguments Description

  • --csv: (Required) Path to the typhoon data CSV file.
  • --map: (Required) Path to the world map image file (e.g., PNG).
  • --output: (Optional) Name of the output video file. Default is typhoon_season_a13.mp4.
  • --nw_min_lat: (Optional) NW Pacific minimum latitude. Default is 0.0.
  • --nw_max_lat: (Optional) NW Pacific maximum latitude. Default is 45.0.
  • --nw_min_lon: (Optional) NW Pacific minimum longitude. Default is 100.0.
  • --nw_max_lon: (Optional) NW Pacific maximum longitude. Default is 180.0.
  • --crop_width: (Optional) Output canvas width in pixels. Default is 1280.
  • --crop_height: (Optional) Output canvas height in pixels. Default is 720.
  • --frames_per_3h: (Optional) Frames per 3-hour interpolation interval. Default is 15.
  • --fps: (Optional) Video frame rate. Default is 30.
  • --ty_icon_radius: (Optional) Radius of the typhoon icon in pixels. Default is 24.
  • --ex_threshold_lat: (Optional) Latitude threshold to change category to EX. Default is 22.0.
  • --empty_speedup_factor: (Optional) Speedup factor when no typhoon is present. Default is 25.
  • --static_frames_after_end: (Optional) Number of static frames after the video ends. Default is 300.

Example

Assuming you have a CSV file named typhoon202411.csv and a world map image world_map.png, you can generate a video as follows:

bash


复制代码
hanuman --csv typhoon202411.csv --map world_map.png --output typhoon_season_a13.mp4

Dependencies

Hanuman relies on the following Python packages:

  • OpenCV (opencv-python)
  • NumPy
  • tqdm

These dependencies are automatically installed when you install Hanuman via pip.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

Acknowledgements

Hanuman was created by CZHanoi in memory of a friend of Hinnamnor. Special thanks to the contributors and the open-source community for their invaluable tools and libraries.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanuman-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Hanuman-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file hanuman-0.1.1.tar.gz.

File metadata

  • Download URL: hanuman-0.1.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for hanuman-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5f1ba2b0d2d3b594991f6dc403600d06c54fb52929af99c9b1518e305bdcfa33
MD5 de95c039a41edea3c68d87d184c07bd5
BLAKE2b-256 905af1bd1dd2cab1b4e71edbf801058986c917ebcb9e180458617e1facab0907

See more details on using hashes here.

File details

Details for the file Hanuman-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: Hanuman-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for Hanuman-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37f11ba5d882c1ea989050245f351dc8441fb29b1c4f7b0264059cccfa8c00ed
MD5 0524b2029cff0bf0c1e733e0f6636a53
BLAKE2b-256 ec30a99f42f693e79d218ed39485f1a0c585134431eb020884627b4c3f71c3be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page