This package provides a way to calculate Actuaries Climate Index based on meteorological data.
Project description
Actuaries Climate Index Package
Currently, the package is organized into different classes, with each class dedicated to a specific component required for the index calculation. Further optimization will be done later. The source files implementing these classes are located in the aci/ directory. The aci.py file is used to calculate the Actuarial Climate Index. Refer to the notebooks for detailed usage instructions.
Installation
pip install x_aci
Usage
Downloading the data
To download the data we used the Climate Data Store from Copernicus. To download data, you can create an account and create request manually to extract the data, or you can follow the documentation they provide to create an API key and use it to extract automatically data. Note that it could take several days to complete the data download depending on the traffic on their platform and the amount of data asked.
Calculate the index for a country
When you finished to download the data, you can start the calculous of the Actuaries Climated Index for your geographical zone specifying the paths to your datasets. You also need to provide the 3 letters code of your country in order to extract the tide gauge data for the sea component.
from aci.aci import ActuariesClimateIndex
aci = ActuariesClimateIndex(
temperature_data_path='data/required_data/temperature_1960-1970.nc',
precipitation_data_path='data/required_data/precipitation_1960-1970.nc',
wind_u10_data_path='data/required_data/wind_u10_1960-1970.nc',
wind_v10_data_path='data/required_data/wind_v10_1960-1970.nc',
country_abbrev='FRA',
study_period=('1980-01-01', '2020-12-31'),
reference_period=('1961-01-01', '1990-12-31')
)
aci_index = aci.calculate_aci()
print(f"Actuaries Climate Index: {aci_index}")
You can also calculate specific component of the ACI by following the documentation pdf inside the docs folder of the repository.
Development
Since the project requires certain dependencies to exectue correctly, it is recommended to create a virtual environment using poetry for testing purpose
poetry install
Once the environment is created and activated, you can open the notebook files to test the code if you have data required to calculate an index.
We have also included a Makefile that allows you to remove files generated by the code by running
poetry run make clean
It is possible to run the current tests implemented by processing :
poetry run make test
References
[1] ACI: Actuaries Climate Index Development and Design. American Academy of Actuaries, Canadian Institute of Actuaries, Casualty Actuarial Society, Society of Actuaries. (for Version 1.1, April 2019 see https://actuariesclimateindex.org/wp-content/uploads/2019/05/ACI.DevDes.2.20.pdf)
[2] Hersbach, H., Bell, B., Berrisford, P., Biavati, G., Horányi, A., Muñoz Sabater, J., Nicolas, J., Peubey, C., Radu, R., Rozum, I., Schepers, D., Simmons, A., Soci, C., Dee, D., Thépaut, J-N. (2023): ERA5 hourly data on single levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS), DOI: 10.24381/cds.adbb2d47
[3] Permanent Service for Mean Sea Level (PSMSL): Tide Gauge Data (2023). http://www.psmsl.org/data/obtaining/
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file x_aci-0.0.1a3.tar.gz.
File metadata
- Download URL: x_aci-0.0.1a3.tar.gz
- Upload date:
- Size: 54.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54afb45cc80e43e17fabf0fa3655f3e4ff4a91b4285821dbdfcf2b3a8b545148
|
|
| MD5 |
1ffe207624096955fba1de189c90ae73
|
|
| BLAKE2b-256 |
e88941458b52eef1293c83c91d1fb11904f3d52299c6557841267f0d539bce5d
|
File details
Details for the file x_aci-0.0.1a3-py3-none-any.whl.
File metadata
- Download URL: x_aci-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 55.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da2f195a11a08b885f686d73bb2ca509d8fa6fce1aac842e0b1ce266cb46b378
|
|
| MD5 |
0cd7f52928d568f5b8d229baa5c7f160
|
|
| BLAKE2b-256 |
43ad346211cd8f074a8f2f3e76e2de5ed263937b523b173953233e92a375402c
|