An interface for Australian inflation indexes.
Project description
ausdex
An interface for several Australian socio-economic indexes.
The Australian Bureau of Statistics (ABS) publishes a variety of indexes for the Australian
economic environment. These include the Consumer Price Index (CPI) used for calculating inflation
and a variety of indexes designed to measure socio-economic advantage. ausdex
makes these data
available in a convenient Python package with a simple programatic and command line interfaces.
Installation
You can install ausdex
from the Python Package Index (PyPI):
pip install ausdex
Command Line Usage
Adjust single values using the command line interface:
ausdex inflation VALUE ORIGINAL_DATE
This adjust the value from the original date to the equivalent in today's dollars.
For example, to adjust $26 from July 21, 1991 to today run:
$ ausdex inflation 26 "July 21 1991"
$ 52.35
To choose a different date for evaluation use the --evaluation-date
option. e.g.
$ ausdex inflation 26 "July 21 1991" --evaluation-date "Sep 1999"
$ 30.27
By default, ausdex
uses the CPI for Australia in general but you can calculate the inflation for specific capital cities with the --location
argument:
$ ausdex inflation 26 "July 21 1991" --evaluation-date "Sep 1999" --location sydney
$ 30.59
Location options are: 'Australia', 'Sydney', 'Melbourne', 'Brisbane', 'Adelaide', 'Perth', 'Hobart', 'Darwin', and 'Canberra'.
Module Usage
>>> import ausdex
>>> ausdex.calc_inflation(26, "July 21 1991")
52.35254237288135
>>> ausdex.calc_inflation(26, "July 21 1991", evaluation_date="Sep 1999")
30.27457627118644
>>> ausdex.calc_inflation(26, "July 21 1991", evaluation_date="Sep 1999", location="sydney")
30.59083191850594
The dates can be as strings or Python datetime objects.
The values, the dates and the evaluation dates can be vectors by using NumPy arrays or Pandas Series. e.g.
>>> df = pd.DataFrame(data=[ [26, "July 21 1991"],[25,"Oct 1989"]], columns=["value","date"] )
>>> df['adjusted'] = ausdex.calc_inflation(df.value, df.date)
>>> df
value date adjusted
0 26 July 21 1991 52.352542
1 25 Oct 1989 54.797048
Dataset and Validation
The Consumer Price Index dataset is taken from the Australian Bureau of Statistics. It uses the nation-wide CPI value. The validation examples in the tests are taken from the Australian Reserve Bank's inflation calculator. This will automatically update each quarter as the new datasets are released.
The CPI data goes back to 1948. Using dates before this will result in a NaN.
Contributing
See the guidelines for contributing and our code of conduct in the documentation.
License and Disclaimer
ausdex is released under the Apache 2.0 license.
While every effort has been made by the authors of this package to ensure that the data and calculations used to produce the results are accurate, as is stated in the license, we accept no liability or responsibility for the accuracy or completeness of the calculations. We recommend that users exercise their own care and judgment with respect to the use of this package.
Credits
ausdex was written by Dr Robert Turnbull and Dr Jonathan Garber from the Melbourne Data Analytics Platform.
Please cite from the article when it is released. Details to come soon.
Acknowledgements
This project came about through a research collaboration with Dr Vidal Paton-Cole and Prof Robert Crawford. We acknowledge the support of our colleagues at the Melbourne Data Analytics Platform: Dr Aleksandra Michalewicz and Dr Emily Fitzgerald.
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
Built Distribution
File details
Details for the file ausdex-1.0.0.tar.gz
.
File metadata
- Download URL: ausdex-1.0.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.10 Darwin/21.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44b9d5aa88826c30b1fb6b9445b784c379a90af13daa660ce47a5117bfcadbff |
|
MD5 | 508a5f04ac69a039b56081b5a063728a |
|
BLAKE2b-256 | 7a4646f97d341efaf6b2fb33d7f52bea499d9a5c482b31abae43693b28157493 |
File details
Details for the file ausdex-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ausdex-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.10 Darwin/21.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5204baee52736091d217782229956b9671a79a9266eebad895bb34109705efb |
|
MD5 | 546e0dd0d0ea04b8481fa63b7b03fa7e |
|
BLAKE2b-256 | 8af77efef4f104c93f30034c9d8aef28ad06651f5f0b38d149104ab9d4279c4a |