Skip to main content

Detect heat waves from weather station data

Project description

About

Hotspell is a Python package that detects past heat wave events using daily weather station data of minimum and maximum air temperature. The user can choose between a range of predefined threshold-based and percentile-based heat wave indices or alternatively can define a full customizable index.

The main output of hotspell are the dates and characteristics of heat waves found within the study period, stored in a pandas DataFrame. If selected by the user, summary statistics (i.e. annual metrics) of the heat wave events are also computed.

Documentation is available at Read the Docs.

Installation

Required dependencies are:

These packages should be installed beforehand, using the conda environment management system that comes with the Anaconda/Miniconda Python distribution.

Then, hotspell can be installed from PyPI using pip:

pip install hotspell

Quick Start

  1. Import the hotspell package

import hotspell
  1. Choose the heat wave index CTX90PCT

index_name = "ctx90pct"
hw_index = hotspell.index(name=index_name)
  1. Set your data path of your CSV file

mydata = "my_data/my_file.csv"

The CSV file should include the following columns

  • Year

  • Month

  • Day

  • Tmin

  • Tmax

in the above order, without a header line. Each day should be in a seperate line; missing days/lines are allowed.

For example:

1999

8

29

23.2

37.1

1999

8

31

24.1

37.7

  1. Find the heat wave events

hw = hotspell.get_heatwaves(filename=mydata, hw_index=hw_index)
heatwaves_events = hw.events
heatwaves_metrics = hw.metrics

Acknowledgements

Hotspell is developed during research under the Greek project National Network for Climate Change and its Impact, CLIMPACT.

License

Hotspell is licensed under the BSD 3-clause license.

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

hotspell-0.1.5.3.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

hotspell-0.1.5.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file hotspell-0.1.5.3.tar.gz.

File metadata

  • Download URL: hotspell-0.1.5.3.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.18

File hashes

Hashes for hotspell-0.1.5.3.tar.gz
Algorithm Hash digest
SHA256 440755716afa30d37e3578f62ae090c7fbbfe25a25dcc14662a382d0997644ae
MD5 61f916281eb110e35c93d889e1089d63
BLAKE2b-256 5a12b62b90eba31760d3d4e36bd327cff85b222e4a4953726e83cd98686fd1d2

See more details on using hashes here.

File details

Details for the file hotspell-0.1.5.3-py3-none-any.whl.

File metadata

  • Download URL: hotspell-0.1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.18

File hashes

Hashes for hotspell-0.1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b52f5551bc0f9e24a2e09a41e32612d8a61d9476670d5e56c7af43e099b6e531
MD5 73cb245e7d594b8de185e2c07006df20
BLAKE2b-256 6ee074bd389c9818ce86c787e491682defbde1dfe48519a8de798fd005ef6b5a

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