Skip to content

Commit 0a180c8

Browse files
committed
deploy: c427118
1 parent f0cf049 commit 0a180c8

31 files changed

Lines changed: 961 additions & 106 deletions

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 8bb14704750664f4e180572ccf86c0d9
3+
config: 38a20b912ec2bacd3166b1ff0bd91ebb
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_images/currency1.png

15.9 KB
Loading

_images/sgs1.png

19.4 KB
Loading

_images/taxajuros1.png

68.8 KB
Loading

_sources/currency.rst.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ O módulo ``currency`` obtem dados de moedas do conversor de moedas do Banco Cen
2727
2828
.. ipython:: python
2929
30+
@savefig currency1.png
3031
df.plot(figsize=(12, 6));
3132
32-
.. plot:: plots/currency1.py
33-
3433
3534
.. autofunction:: get_currency_list
3635

_sources/index.rst.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
python-bcb
77
==========
88

9+
.. toctree::
10+
:maxdepth: 1
11+
:caption: Conteúdo:
12+
13+
sgs
14+
currency
15+
expectativas
16+
taxajuros
17+
odata
18+
api
19+
920
**python-bcb** é uma interface em Python estruturada para obter informações
1021
da API de dados abertos do `Banco Central do Brasil <https://www.bcb.gov.br>`_.
1122

@@ -76,18 +87,6 @@ Uso
7687
sgs.get(('IPCA', 433), last=12)
7788
7889
79-
80-
.. toctree::
81-
:maxdepth: 2
82-
:caption: Conteúdo:
83-
84-
sgs
85-
currency
86-
expectativas
87-
odata
88-
api
89-
90-
9190
Índices e tabelas
9291
==================
9392

_sources/sgs.rst.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ Função :ref:`bcb.sgs.get`
3838
plt.suptitle('IPCA acumulado 12 meses - Janela Móvel', fontsize=18)
3939
plt.xlabel('Data')
4040
plt.ylabel('%')
41+
@savefig sgs1.png
4142
plt.legend().set_visible(False)
42-
43-
.. plot:: plots/sgs1.py

_sources/taxajuros.rst.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Taxas de Juros
2+
##############
3+
4+
A API de taxas de juros de operações de crédito pode ser acessada através da
5+
classe :py:class:`bcb.TaxaJuros`.
6+
7+
.. _documentacao: https://olinda.bcb.gov.br/olinda/servico/TaxaJuros/versao/v1/documentacao
8+
9+
__ documentacao_
10+
11+
Os dados são obtidos a partir da `API de Taxas de Juros`__.
12+
13+
.. currentmodule:: bcb
14+
15+
16+
.. autoclass:: TaxaJuros
17+
:members:
18+
:inherited-members:
19+
20+
21+
Esta API tem os ``EntitySets``:
22+
23+
.. ipython:: python
24+
25+
from bcb import TaxaJuros
26+
em = TaxaJuros()
27+
em.describe()
28+
29+
As características do ``EntitySets`` podem ser visualizadas por:
30+
31+
.. ipython:: python
32+
33+
em.describe("TaxasJurosDiariaPorInicioPeriodo")
34+
35+
Vejamos um gráfico da mediana das taxas de juros do cheque especial praticada
36+
pelas instituições financeiras.
37+
38+
.. ipython:: python
39+
40+
import pandas as pd
41+
42+
ep = em.get_endpoint('TaxasJurosDiariaPorInicioPeriodo')
43+
df_cheque = (ep.query()
44+
.filter(ep.Segmento == 'PESSOA FÍSICA',
45+
ep.Modalidade == 'CHEQUE ESPECIAL - PRÉ-FIXADO')
46+
.collect())
47+
df_cheque['InicioPeriodo'] = pd.to_datetime(df_cheque['InicioPeriodo'])
48+
grp = df_cheque.groupby('InicioPeriodo')
49+
df_mean = grp.agg({'TaxaJurosAoMes': 'median'})
50+
51+
@savefig taxajuros1.png
52+
df_mean['TaxaJurosAoMes'].plot(figsize=(16,6), style='o', markersize=1,
53+
xlabel='Data', ylabel='Taxa',
54+
title='Médias das Taxas de Juros de Cheque Especial - Fonte:BCB');
55+
60.8 KB
Loading

_static/images/savefig/sgs1.png

73 KB
Loading

0 commit comments

Comments
 (0)