HuracanPy
Provide a unified tool for working with cyclone track data.
https://github.com/huracan-project/huracanpy
Category: Climate Change
Sub Category: Natural Hazard and Storm
Last synced: about 23 hours ago
JSON representation
Repository metadata
Package for working with various forms of feature tracking data
- Host: GitHub
- URL: https://github.com/huracan-project/huracanpy
- Owner: Huracan-project
- License: mit
- Created: 2024-04-24T09:56:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-16T14:42:37.000Z (about 2 months ago)
- Last Synced: 2025-08-29T01:40:49.904Z (11 days ago)
- Language: Python
- Homepage: https://huracanpy.readthedocs.io/
- Size: 24.7 MB
- Stars: 10
- Watchers: 1
- Forks: 6
- Open Issues: 5
- Releases: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
A python package for working with various forms of feature tracking data, including but not restricted to cyclone tracks.
Why HuracanPy?
The idea of this package is to provide a unified tool for working with cyclone track data.
In particular, HuracanPy can read tracks from many different sources/trackers.
It also provides useful functions to analyse these tracks, including many common diagnostics.
Our goal is to make track data analysis more accessible, and to promote good reproducibility practices.
Getting started
You can follow user guide, try out some of the examples, or follow the steps below (taken from the user guide).
Install
You can install huracanpy with conda
conda install -c conda-forge huracanpy
or pip
python -m pip install huracanpy
To install the most up-to-date version of huracanpy, you can install directly from the repository with
python -m pip install "huracanpy@git+https://github.com/Huracan-project/huracanpy"
Basic usage
The first step is to load in some tracks. HuracanPy can load track data from various sources as an xarray.Dataset with a minimal number of assumed variables (track_id, lon, lat, time) e.g.
import huracanpy
tracks = huracanpy.load(huracanpy.example_csv_file)
print(tracks)
<xarray.Dataset> Size: 7kB
Dimensions: (record: 99)
Dimensions without coordinates: record
Data variables:
track_id (record) int64 792B 0 0 0 0 0 0 0 0 0 0 0 ... 2 2 2 2 2 2 2 2 2 2
i (record) int64 792B 482 476 476 477 478 ... 229 230 234 241 249
j (record) int64 792B 417 419 420 420 422 ... 501 509 517 528 542
lon (record) float64 792B 120.5 119.0 119.0 119.2 ... 58.5 60.25 62.25
lat (record) float64 792B -14.25 -14.75 -15.0 ... -39.25 -42.0 -45.5
slp (record) float64 792B 9.988e+04 9.981e+04 ... 9.747e+04 9.754e+04
zs (record) float64 792B -10.71 -16.11 -40.21 ... -218.5 -211.5
wind10 (record) float64 792B 14.65 13.99 13.7 17.98 ... 23.69 23.96 23.4
time (record) datetime64[ns] 792B 1980-01-06T06:00:00 ... 1980-01-30...
Each "record" corresponds to a TC point (time, lon, lat).
Note that the data is one dimensional but represents multiple tracks.
This is done rather than having track_id as an additional dimension to avoid having to add blank data to each track when they are not the same length.
The groupby
function, built in to xarray, allows us to easily loop over tracks in this format.
# Iterating over all tracks
# Each track will be a subset of the xarray Dataset with a unique track_id
# The track_id is not necessarily an integer, it follows whatever you have loaded
# e.g. could be a string for IBTrACS
for track_id, track in tracks.groupby("track_id"):
# Do something with the track
print(track_id, len(track.time))
0 31
1 20
2 48
With the data loaded, we can apply the functions from HuracanPy. The example below is
using the hrcn
accessor from HuracanPy. See the accessor page for
more details.
# Quickly view the tracks
tracks.hrcn.plot_tracks(intensity_var_name="wind10")
# Add a new variable to the tracks and plot this instead
tracks = tracks.hrcn.add_is_land()
tracks.hrcn.plot_tracks(intensity_var_name="is_land")
Contact
Please use GitHub's functions to communicate with HuracanPy's developers.
- Use Issues for feature requests or bug reporting
- Use the Discussions for Q&A and general feedback
- Do not forget HuracanPy is an open-source project, and you can also contribute to it.
Subscribe for updates
- Most specific: Subscribe to this discussion for further updates.
- Less specific: "Watch" the repo by clicking the button on the top-right of this page. Select "custom" then tick "discussions". You can always go back if there turns out to be too much emails.
(We wish there was a better way for you to subscribe to announcements. If you agree with us, please up this issue.)
Owner metadata
- Name: Huracan-project
- Login: Huracan-project
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/167978010?v=4
- Repositories: 1
- Last ynced at: 2024-04-24T15:50:18.579Z
- Profile URL: https://github.com/Huracan-project
GitHub Events
Total
- Create event: 12
- Issues event: 23
- Release event: 6
- Watch event: 7
- Delete event: 5
- Issue comment event: 33
- Push event: 107
- Pull request review event: 1
- Pull request review comment event: 3
- Pull request event: 115
- Fork event: 1
Last Year
- Create event: 12
- Issues event: 23
- Release event: 6
- Watch event: 7
- Delete event: 5
- Issue comment event: 33
- Push event: 107
- Pull request review event: 1
- Pull request review comment event: 3
- Pull request event: 115
- Fork event: 1
Committers metadata
Last synced: about 1 month ago
Total Commits: 644
Total Committers: 2
Avg Commits per committer: 322.0
Development Distribution Score (DDS): 0.452
Commits in past year: 416
Committers in past year: 2
Avg Commits per committer in past year: 208.0
Development Distribution Score (DDS) in past year: 0.469
Name | Commits | |
---|---|---|
stella-bourdin | s****n@p****k | 353 |
Leo Saffin | s****r@h****m | 291 |
Committer domains:
Issue and Pull Request metadata
Last synced: 7 days ago
Total issues: 20
Total pull requests: 152
Average time to close issues: 5 days
Average time to close pull requests: about 6 hours
Total issue authors: 5
Total pull request authors: 3
Average comments per issue: 1.4
Average comments per pull request: 0.13
Merged pull request: 129
Bot issues: 0
Bot pull requests: 0
Past year issues: 19
Past year pull requests: 125
Past year average time to close issues: 5 days
Past year average time to close pull requests: about 5 hours
Past year issue authors: 5
Past year pull request authors: 3
Past year average comments per issue: 1.32
Past year average comments per pull request: 0.15
Past year merged pull request: 106
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- stella-bourdin (9)
- malmans2 (7)
- nmstreethran (3)
- leosaffin (2)
- burcuboza (1)
Top Pull Request Authors
- leosaffin (119)
- stella-bourdin (61)
- hugoledoux (6)
- pmansito (1)
Top Issue Labels
- enhancement (3)
- documentation (2)
- load (2)
- bug (1)
Top Pull Request Labels
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- cftime *
- numpy <2
- parse *
- xarray *
Score: 3.4011973816621555