Installation#

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"

Dependencies#

The dependencies are managed automatically by the installation. For interest, below are the dependencies for huracanpy as listed in the pyproject.toml and descriptions of what they are used for in HuracanPy.

dependencies = [
    "numpy",
    "xarray",
    "cftime",
    "parse",
    "shapely",
    "pandas",
    # Issue with newer versions of fiona when using old versions of geopandas
    # see https://stackoverflow.com/a/78949565/8270394
    "geopandas>=0.14.4",
    "matplotlib",
    "seaborn",
    "netcdf4",
    "haversine",
    "cartopy",
    "matplotlib-venn<1",
    "metpy",
    "tqdm",
    "pyarrow",
    "pyproj",
    "scikit-learn",
    "nvector",
]

Loading data#

  • xarray (with netcdf4) is used for loading netCDF files as well as providing the Dataset object that all file types are loaded into

  • pandas (with pyarrow) loads CSV files (and text files that can be reformatted as CSV). pyarrow adds support for .parquet files with pandas

  • numpy is used for loading other text files

  • parse is used to extract data from specifically formatted lines in text files

  • cftime adds support for non-standard calendars (including with xarray)

Analysis#

  • xarray provides the Dataset object that HuracanPy is largely built around

  • pandas is used where it can do the equivalent of xarray but much faster

  • numpy is underpinning xarray and many functions in HuracanPy can be used with pure numpy arrays

  • metpy gives us support for unit-aware calculations in a number of functions

Geospatial#

  • geopandas (with shapely and cartopy) is used to match track points with Earth features (land, sea, country, etc.), with shapely used to interface with geopandas and cartopy providing a useful method for downloading and caching feature files

  • pyproj and haversine provide the distance and angle calculations

  • scikit-learn performs the density calculation when using a Gaussian kernel and accounting for the spherical Earth

  • nvector is used huracanpy.calc.corral_radius to find the centre of a group of points while accounting for a sperical Earth

Plotting#

  • matplotlib is the basis for any plotting functions

  • seaborn is used for huracanpy.plot.tracks

  • cartopy adds support for projections and transforms on plots

  • matplotlib-venn is used for huracanpy.plot.venn

Other#

  • tqdm adds an optional progress bar to huracanpy.interp_time