Skip to main content

tools for manipulating time series data from the Central Bank of Brazil

Project description

๐Ÿ“„ README.md

# BacenAPI

**BacenAPI** is a Python package designed to simplify the access and manipulation of time series data from the Central Bank of Brazil (Banco Central do Brasil - BCB), using its public API (SGS - Sistema Gerenciador de Sรฉries Temporais).

---

## ๐Ÿ“ฆ Features

- ๐Ÿ” **Search series** using keywords in the metadata
- ๐Ÿ”— **Generate URLs** for one or more time series from BCB's SGS API
- ๐Ÿ“Š **Download and structure** the time series data into a unified `pandas.DataFrame`
- ๐Ÿ“ Supports integration with local metadata files in `.txt` or `.parquet` formats

---

## ๐Ÿš€ Installation

```bash
pip install BacenAPI

Or, if you're developing locally:

git clone https://github.com/seu-usuario/BacenAPI.git
cd BacenAPI
pip install -e .

๐Ÿงฉ Dependencies

  • pandas
  • requests

๐Ÿ› ๏ธ Usage Example

from BacenAPI import bacen_search, bacen_url, bacen_series

# Search for time series by keyword
df_search = bacen_search("IPCA")
print(df_search)

# Get URLs for a specific set of series
urls = bacen_url(series=[433, 4440], start_date="01/01/2020", end_date="01/01/2024")

# Download the data and format as DataFrame
df = bacen_series(urls)
print(df.head())

๐Ÿ“‚ Project Structure

BacenAPI/
โ”œโ”€โ”€ BacenAPI/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ bacen_url.py
โ”‚   โ”œโ”€โ”€ bacen_series.py
โ”‚   โ”œโ”€โ”€ bacen_search.py
โ”‚
โ”œโ”€โ”€ Date/
โ”‚   โ””โ”€โ”€ dataset.txt
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md

๐Ÿ‘ฅ Authors

  • Paulo Andre
  • Lissandro Costa de Sousa
  • Prof. Francisco Gildemir Ferreira da Silva (Supervisor)

๐Ÿ“„ License

This project is licensed under the MIT License. See the LICENSE file for more details.


๐Ÿ“ซ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


๐ŸŒ Source and Documentation

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

bacenapi-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

BacenAPI-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file bacenapi-0.1.0.tar.gz.

File metadata

  • Download URL: bacenapi-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for bacenapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2e0e325db1b3573687371608c9786a14b7e4458fa9e80823db054cce4aed140
MD5 609f6f6c9a8c594636510aec67475fe0
BLAKE2b-256 3c7cb4aa2571e69a7ed28a68a4257ee869b6f1a1476b22ef9af33e093e72e057

See more details on using hashes here.

File details

Details for the file BacenAPI-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: BacenAPI-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for BacenAPI-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0f1a7a8bfbfb412b911934a1f73a1b9944006ab1fa6da66ad1de9a8ccafa9b
MD5 52ccf9fcaf9a414585a1c67ca250e79f
BLAKE2b-256 3e5daa973f66c1734965ede2442b30a1d9fbad1284f6aed8a4ec1b174ab1b55a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page