ausdex

ausdex: A Python package for adjusting Australian dollars for inflation - Published in JOSS (2022)

https://github.com/rbturnbull/ausdex

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    3 of 4 committers (75.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

australia inflation

Scientific Fields

Artificial Intelligence and Machine Learning Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

A Python package for adjusting Australian dollars for inflation

Basic Info
  • Host: GitHub
  • Owner: rbturnbull
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 21.1 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • Open Issues: 1
  • Releases: 7
Topics
australia inflation
Created over 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License Citation

README.md

ausdex

pipline Contributor Covenant status

A Python package for adjusting Australian dollars for inflation.

The Australian Bureau of Statistics (ABS) publishes the Consumer Price Index (CPI) for Australia and its capital cities which allows for adjustment of the value of Australian dollars for inflation. ausdex makes these data available with an inflation calculator in a convenient Python package with simple programmatic and command-line interfaces.

ABS datasets are generally housed in Microsoft Excel spreadsheets linked from the data catalogue. Working with these spreadsheets directly is cumbersome. The ausdex package provides an Application Programming Interface (API) for Australian CPI data that seemlessly interoperates with NumPy and pandas. It makes working with Australian dollars in Python convenient in a similar manner to the cpi Python package which adjusts US dollars for inflation.

The package is documented here: https://rbturnbull.github.io/ausdex

Installation

You can install ausdex from the Python Package Index (PyPI):

pip install ausdex

ausdex requires Python 3.8 or higher.

To install ausdex for development, see the documentation for contributing.

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 for the most recent quarter.

For example, to adjust $26 from July 21, 1991 to the latest quarter run: $ ausdex inflation 26 "July 21 1991" $ 52.35

To choose a different date for evaluation use the --evaluation-date option. This adjusts the value to dollars in the quarter corresponding to that date. For example, this command adjusts $26 from July 1991 to dollars in September 1999: $ 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.calcinflation(26, "July 21 1991") 52.35254237288135 ausdex.calcinflation(26, "July 21 1991", evaluationdate="Sep 1999") 30.27457627118644 ausdex.calcinflation(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.

To access the raw CPI data as a pandas DataFrame, use this function: df = ausdex.latest_cpi_df()

The Excel spreadsheet for this is stored in the user's cache directory. If you wish to download this Excel file to a specific location, use this function: ausdex.files.cached_download_cpi(local_path="cpi-data.xlsx")

For more infomation about the methods to download data from the ABS, see the API specification.

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.

Owner

  • Name: Robert Turnbull
  • Login: rbturnbull
  • Kind: user
  • Company: University of Melbourne

JOSS Publication

ausdex: A Python package for adjusting Australian dollars for inflation
Published
July 06, 2022
Volume 7, Issue 75, Page 4212
Authors
Robert Turnbull ORCID
Melbourne Data Analytics Platform, University of Melbourne
Jonathan Garber ORCID
Melbourne Data Analytics Platform, University of Melbourne
Editor
Andrew Stewart ORCID
Tags
economics inflation

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Turnbull
    given-names: Robert
    orcid: "https://orcid.org/0000-0003-1274-6750"
  -
    family-names: Garber
    given-names: Jonathan
    orcid: "https://orcid.org/0000-0001-6754-4748"
cff-version: "1.1.0"
date-released: 2021-08-26
license: "Apache-2.0"
message: "If you use this software, please cite it as below."
repository-code: "https://github.com/rbturnbull/ausdex.git"
title: ausdex
...

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 197
  • Total Committers: 4
  • Avg Commits per committer: 49.25
  • Development Distribution Score (DDS): 0.371
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Robert Turnbull r****l@u****u 124
Jonathan Garber j****r@s****u 70
Andrew Stewart d****t@g****m 2
Daniel S. Katz d****z@i****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 10
  • Total pull requests: 5
  • Average time to close issues: 5 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.2
  • Average comments per pull request: 1.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • konstantinstadler (5)
  • potterzot (4)
  • alexa-malexa (1)
Pull Request Authors
  • ajstewartlang (2)
  • sailngarbwm (2)
  • rbturnbull (1)
  • danielskatz (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 137 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 8
  • Total maintainers: 1
pypi.org: ausdex

A Python package for adjusting Australian dollars for inflation

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 137 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 19.1%
Average: 20.8%
Downloads: 21.4%
Dependent repos count: 21.6%
Stargazers count: 31.9%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/docs.yml actions
  • JamesIves/github-pages-deploy-action 4.1.5 composite
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • schneegans/dynamic-badges-action v1.1.0 composite
.github/workflows/joss-draft-pdf.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v1 composite
  • openjournals/openjournals-draft-action master composite
.github/workflows/pipeline.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/publish.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • snok/install-poetry v1 composite
poetry.lock pypi
  • 119 dependencies
pyproject.toml pypi
setup.py pypi