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/LissandroSousa/BacenAPI.py.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.2.0.tar.gz (5.2 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.2.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bacenapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e3183624e55119eb3c4c616988aa5c5ff3535062492efeed9e2ff1d0fd7a9c62
MD5 8a0ca26341240d67bb629fb5bd9ab074
BLAKE2b-256 da691049a0379104ec8e5dff952fff8d80723ca3163259cd453e7b3f8ce8bf09

See more details on using hashes here.

File details

Details for the file bacenapi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bacenapi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d997e7ff5b843595a16591e1a58b8b2b70fec7cd6dce615e602f42555323561
MD5 457910be9e5dfe57afd00b4bd17d18b7
BLAKE2b-256 a7faa05e5328b88cabb05337c100043c2ce704f3eb99f268732ccbcdaa1389c5

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