rbadata


Namerbadata JSON
Version 0.1.5 PyPI version JSON
download
home_pageNone
SummaryDownload and tidy data from the Reserve Bank of Australia
upload_time2025-07-24 10:21:24
maintainercaymandev
docs_urlNone
authorcaymandev
requires_python>=3.9
licenseMIT
keywords rba economics finance australia data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # rbadata

A Python package to download and tidy data from the Reserve Bank of Australia (RBA).

This package is a Python implementation inspired by the R package `readrba`, providing similar functionality for accessing RBA statistical tables and economic forecasts.

[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Coverage](https://img.shields.io/badge/coverage-97%25-brightgreen)](https://github.com/caymandev/rbadata)
[![Tests](https://github.com/caymandev/rbadata/actions/workflows/tests.yml/badge.svg)](https://github.com/caymandev/rbadata/actions/workflows/tests.yml)

## Table of Contents

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Features](#features)
- [Examples](#examples)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [Contributing](#contributing)
- [License](#license)

## Installation

```bash
pip install rbadata
```

For development installation:

```bash
git clone https://github.com/caymandev/rbadata.git
cd rbadata
pip install -e ".[dev]"
```

## Quick Start

```python
import rbadata

# Read a single RBA table
cpi_table = rbadata.read_rba(table_no="g1")

# Read multiple tables
data = rbadata.read_rba(table_no=["a1", "g1"])

# Read by series ID
cpi_series = rbadata.read_rba(series_id="GCPIAG")

# Get RBA forecasts
forecasts = rbadata.rba_forecasts()

# Browse available tables and series
tables = rbadata.browse_rba_tables()
series = rbadata.browse_rba_series("inflation")
```

## Advanced Usage

### Inflation Calculator

```python
# Calculate inflation-adjusted values
calc = rbadata.InflationCalculator()

# How much was $100 in 2000 worth in 2023?
value_2023 = calc.calculate_value(100, "2000", "2023")

# Calculate inflation rate
inflation_rate = calc.calculate_inflation_rate("2020", "2023")

# Quick calculation
adjusted_value = rbadata.inflation_calculator(1000, "2010", "2023")
```

### Chart Pack

```python
# Access RBA Chart Pack
chart_pack = rbadata.get_chart_pack()

# Get available categories
categories = chart_pack.get_categories()

# Get charts by category
inflation_charts = chart_pack.get_charts_by_category("inflation")

# Download the full Chart Pack PDF
chart_pack.download_chart_pack()
```

### Economic Snapshots

```python
# Get economic indicators snapshot
indicators = rbadata.get_economic_indicators()

# Access snapshots
snapshots = rbadata.get_snapshots()
snapshots.download_snapshot("economic-indicators")
```

### Glossary

```python
# Look up term definitions
definition = rbadata.define("CPI")

# Search for terms
glossary = rbadata.get_glossary()
inflation_terms = glossary.search("inflation")
```

## Features

### Core Features
- Download current and historical RBA statistical tables
- Access RBA economic forecasts since 1990
- Search and browse available data series
- Automatic data tidying into pandas DataFrames
- Robust error handling and retry logic

### Additional Features
- **Inflation Calculator**: Calculate inflation-adjusted values and inflation rates
- **Chart Pack Access**: Download and explore RBA Chart Pack data
- **Economic Snapshots**: Access key economic indicators and visualizations
- **Statistical Alerts**: Set up notifications for new data releases
- **Glossary**: Look up definitions of economic and financial terms

## Examples

The package includes comprehensive examples demonstrating all features:

1. **Basic Usage** - Core functionality and data reading
2. **Data Browsing** - Searching and discovering available data
3. **Forecasts** - Working with RBA economic forecasts
4. **Inflation Calculator** - Real-world inflation calculations
5. **Chart Pack** - Accessing visual economic summaries
6. **Snapshots** - Quick economic indicators
7. **Alerts** - Setting up data release notifications
8. **Glossary** - Economic terminology reference
9. **Advanced Usage** - Performance optimization and bulk operations
10. **Data Analysis** - Real-world economic analysis examples

See the [examples directory](examples/) for detailed code examples with inline documentation.

## Documentation

### Data Sources

- **Statistical Tables**: Access to all RBA statistical tables (current and historical)
- **Forecasts**: Public RBA forecasts since 1990 from Statement on Monetary Policy
- **Chart Pack**: Visual summaries released 8 times per year
- **Snapshots**: Key economic indicators, economy composition, and payment methods

### Common Use Cases

```python
# Monitor inflation
inflation = rbadata.read_rba(series_id="GCPIAG")
current_cpi = inflation.iloc[-1]['value']

# Track interest rates
cash_rate = rbadata.read_cashrate()
current_rate = cash_rate.iloc[-1]['value']

# Analyze employment
unemployment = rbadata.read_rba(series_id="GLFSURSA")

# Get latest economic forecasts
latest_forecasts = rbadata.rba_forecasts(all_or_latest="latest")
```

## Requirements

- Python 3.9+
- pandas >= 1.3.0
- requests >= 2.25.0
- beautifulsoup4 >= 4.9.0
- openpyxl >= 3.0.0

## Testing

The package includes comprehensive tests with high coverage. To run tests locally:

```bash
# Run tests
pytest tests/

# Run tests with coverage report
pytest tests/ --cov=rbadata --cov-report=term-missing

# Generate coverage badge locally
python scripts/generate_coverage_badge.py --update-readme
```

### Coverage

The project maintains high test coverage (currently 97%). Coverage is automatically tracked via GitHub Actions and reported using Codecov.

To set up Codecov for your fork:
1. Sign up at [codecov.io](https://codecov.io)
2. Add your repository
3. Add the `CODECOV_TOKEN` to your GitHub repository secrets

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Before submitting:
1. Run the test suite and ensure all tests pass
2. Add tests for any new functionality
3. Ensure code coverage remains high
4. Run linting: `flake8 rbadata/`
5. Format code: `black rbadata/`

## License

MIT License

## Disclaimer

This package is not affiliated with or endorsed by the Reserve Bank of Australia. All data is provided subject to any conditions and restrictions set out on the RBA website.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rbadata",
    "maintainer": "caymandev",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "rba, economics, finance, australia, data",
    "author": "caymandev",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ae/4a/d22767a5b0a8e787156bd241ad4bdd9e9135d465719d3d8a0c09f081cceb/rbadata-0.1.5.tar.gz",
    "platform": null,
    "description": "# rbadata\n\nA Python package to download and tidy data from the Reserve Bank of Australia (RBA).\n\nThis package is a Python implementation inspired by the R package `readrba`, providing similar functionality for accessing RBA statistical tables and economic forecasts.\n\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Coverage](https://img.shields.io/badge/coverage-97%25-brightgreen)](https://github.com/caymandev/rbadata)\n[![Tests](https://github.com/caymandev/rbadata/actions/workflows/tests.yml/badge.svg)](https://github.com/caymandev/rbadata/actions/workflows/tests.yml)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Features](#features)\n- [Examples](#examples)\n- [Documentation](#documentation)\n- [Requirements](#requirements)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n```bash\npip install rbadata\n```\n\nFor development installation:\n\n```bash\ngit clone https://github.com/caymandev/rbadata.git\ncd rbadata\npip install -e \".[dev]\"\n```\n\n## Quick Start\n\n```python\nimport rbadata\n\n# Read a single RBA table\ncpi_table = rbadata.read_rba(table_no=\"g1\")\n\n# Read multiple tables\ndata = rbadata.read_rba(table_no=[\"a1\", \"g1\"])\n\n# Read by series ID\ncpi_series = rbadata.read_rba(series_id=\"GCPIAG\")\n\n# Get RBA forecasts\nforecasts = rbadata.rba_forecasts()\n\n# Browse available tables and series\ntables = rbadata.browse_rba_tables()\nseries = rbadata.browse_rba_series(\"inflation\")\n```\n\n## Advanced Usage\n\n### Inflation Calculator\n\n```python\n# Calculate inflation-adjusted values\ncalc = rbadata.InflationCalculator()\n\n# How much was $100 in 2000 worth in 2023?\nvalue_2023 = calc.calculate_value(100, \"2000\", \"2023\")\n\n# Calculate inflation rate\ninflation_rate = calc.calculate_inflation_rate(\"2020\", \"2023\")\n\n# Quick calculation\nadjusted_value = rbadata.inflation_calculator(1000, \"2010\", \"2023\")\n```\n\n### Chart Pack\n\n```python\n# Access RBA Chart Pack\nchart_pack = rbadata.get_chart_pack()\n\n# Get available categories\ncategories = chart_pack.get_categories()\n\n# Get charts by category\ninflation_charts = chart_pack.get_charts_by_category(\"inflation\")\n\n# Download the full Chart Pack PDF\nchart_pack.download_chart_pack()\n```\n\n### Economic Snapshots\n\n```python\n# Get economic indicators snapshot\nindicators = rbadata.get_economic_indicators()\n\n# Access snapshots\nsnapshots = rbadata.get_snapshots()\nsnapshots.download_snapshot(\"economic-indicators\")\n```\n\n### Glossary\n\n```python\n# Look up term definitions\ndefinition = rbadata.define(\"CPI\")\n\n# Search for terms\nglossary = rbadata.get_glossary()\ninflation_terms = glossary.search(\"inflation\")\n```\n\n## Features\n\n### Core Features\n- Download current and historical RBA statistical tables\n- Access RBA economic forecasts since 1990\n- Search and browse available data series\n- Automatic data tidying into pandas DataFrames\n- Robust error handling and retry logic\n\n### Additional Features\n- **Inflation Calculator**: Calculate inflation-adjusted values and inflation rates\n- **Chart Pack Access**: Download and explore RBA Chart Pack data\n- **Economic Snapshots**: Access key economic indicators and visualizations\n- **Statistical Alerts**: Set up notifications for new data releases\n- **Glossary**: Look up definitions of economic and financial terms\n\n## Examples\n\nThe package includes comprehensive examples demonstrating all features:\n\n1. **Basic Usage** - Core functionality and data reading\n2. **Data Browsing** - Searching and discovering available data\n3. **Forecasts** - Working with RBA economic forecasts\n4. **Inflation Calculator** - Real-world inflation calculations\n5. **Chart Pack** - Accessing visual economic summaries\n6. **Snapshots** - Quick economic indicators\n7. **Alerts** - Setting up data release notifications\n8. **Glossary** - Economic terminology reference\n9. **Advanced Usage** - Performance optimization and bulk operations\n10. **Data Analysis** - Real-world economic analysis examples\n\nSee the [examples directory](examples/) for detailed code examples with inline documentation.\n\n## Documentation\n\n### Data Sources\n\n- **Statistical Tables**: Access to all RBA statistical tables (current and historical)\n- **Forecasts**: Public RBA forecasts since 1990 from Statement on Monetary Policy\n- **Chart Pack**: Visual summaries released 8 times per year\n- **Snapshots**: Key economic indicators, economy composition, and payment methods\n\n### Common Use Cases\n\n```python\n# Monitor inflation\ninflation = rbadata.read_rba(series_id=\"GCPIAG\")\ncurrent_cpi = inflation.iloc[-1]['value']\n\n# Track interest rates\ncash_rate = rbadata.read_cashrate()\ncurrent_rate = cash_rate.iloc[-1]['value']\n\n# Analyze employment\nunemployment = rbadata.read_rba(series_id=\"GLFSURSA\")\n\n# Get latest economic forecasts\nlatest_forecasts = rbadata.rba_forecasts(all_or_latest=\"latest\")\n```\n\n## Requirements\n\n- Python 3.9+\n- pandas >= 1.3.0\n- requests >= 2.25.0\n- beautifulsoup4 >= 4.9.0\n- openpyxl >= 3.0.0\n\n## Testing\n\nThe package includes comprehensive tests with high coverage. To run tests locally:\n\n```bash\n# Run tests\npytest tests/\n\n# Run tests with coverage report\npytest tests/ --cov=rbadata --cov-report=term-missing\n\n# Generate coverage badge locally\npython scripts/generate_coverage_badge.py --update-readme\n```\n\n### Coverage\n\nThe project maintains high test coverage (currently 97%). Coverage is automatically tracked via GitHub Actions and reported using Codecov.\n\nTo set up Codecov for your fork:\n1. Sign up at [codecov.io](https://codecov.io)\n2. Add your repository\n3. Add the `CODECOV_TOKEN` to your GitHub repository secrets\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\nBefore submitting:\n1. Run the test suite and ensure all tests pass\n2. Add tests for any new functionality\n3. Ensure code coverage remains high\n4. Run linting: `flake8 rbadata/`\n5. Format code: `black rbadata/`\n\n## License\n\nMIT License\n\n## Disclaimer\n\nThis package is not affiliated with or endorsed by the Reserve Bank of Australia. All data is provided subject to any conditions and restrictions set out on the RBA website.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Download and tidy data from the Reserve Bank of Australia",
    "version": "0.1.5",
    "project_urls": {
        "Documentation": "https://rbadata.readthedocs.io",
        "Homepage": "https://github.com/caymandev/rbadata",
        "Issues": "https://github.com/caymandev/rbadata/issues",
        "Repository": "https://github.com/caymandev/rbadata"
    },
    "split_keywords": [
        "rba",
        " economics",
        " finance",
        " australia",
        " data"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "24883036aa5633a9dd0798d916ba059589505f023524afcfa3b347d347fa8347",
                "md5": "e780d575c2031038790e7df2493965ad",
                "sha256": "364488f45c795aeaef7f3b6396b71d730f41931b03c60e4ab2177a30c6b66842"
            },
            "downloads": -1,
            "filename": "rbadata-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e780d575c2031038790e7df2493965ad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 93405,
            "upload_time": "2025-07-24T10:21:23",
            "upload_time_iso_8601": "2025-07-24T10:21:23.334202Z",
            "url": "https://files.pythonhosted.org/packages/24/88/3036aa5633a9dd0798d916ba059589505f023524afcfa3b347d347fa8347/rbadata-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ae4ad22767a5b0a8e787156bd241ad4bdd9e9135d465719d3d8a0c09f081cceb",
                "md5": "7780d25592ba132888a3574cf4554026",
                "sha256": "1601915f99fc21b039ef0132ddde3c8995e2ac952ba47b6c2e3fd265f0c4e74a"
            },
            "downloads": -1,
            "filename": "rbadata-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "7780d25592ba132888a3574cf4554026",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 116920,
            "upload_time": "2025-07-24T10:21:24",
            "upload_time_iso_8601": "2025-07-24T10:21:24.466494Z",
            "url": "https://files.pythonhosted.org/packages/ae/4a/d22767a5b0a8e787156bd241ad4bdd9e9135d465719d3d8a0c09f081cceb/rbadata-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-24 10:21:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "caymandev",
    "github_project": "rbadata",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "rbadata"
}
        
Elapsed time: 1.89137s