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
Import the hotspell package
import hotspell
Choose the heat wave index CTX90PCT
index_name = "ctx90pct"
hw_index = hotspell.index(name=index_name)
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 |
… |
… |
… |
… |
… |
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hotspell-0.1.5.8.tar.gz
.
File metadata
- Download URL: hotspell-0.1.5.8.tar.gz
- Upload date:
- Size: 17.9 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b326d1c9a3f679c420448a88ec791bfdd908be3967cb9e7b0bff440fbfbc8a |
|
MD5 | 6fd8a1aada5eed3637496446e8c031d3 |
|
BLAKE2b-256 | ca63cae617fe6cd4f66ef058309aeab3b7b577a2d4adeed2b552368b20fa3861 |
File details
Details for the file hotspell-0.1.5.8-py3-none-any.whl
.
File metadata
- Download URL: hotspell-0.1.5.8-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7b1c7ce139f44295bf9010591872e3ebfc64d29a95719e2d35b9a7f81609111 |
|
MD5 | 0eaa47afae79659609835413ebb61eec |
|
BLAKE2b-256 | a2b14d71f92d4effa7ca2eab156bff9e492091b065b5abdeac5fdf5f4088d1b0 |