Skip to content

Commit

Permalink
deploy: e8ce366
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonfreitas committed Dec 28, 2024
1 parent 48e497c commit 5e221d7
Show file tree
Hide file tree
Showing 16 changed files with 163 additions and 14 deletions.
Binary file modified _images/taxajuros1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Módulo :py:mod:`bcb.sgs`
.. automodule:: bcb.sgs
:members:

.. automodule:: bcb.sgs.regional_economy
:members:

Módulo :py:mod:`bcb.currency`
-----------------------------

Expand Down
24 changes: 22 additions & 2 deletions _sources/sgs.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ A função :py:func:`bcb.sgs.get` obtem os dados do webservice do Banco Central
interface json do serviço BCData/SGS -
`Sistema Gerenciador de Séries Temporais (SGS) <https://www3.bcb.gov.br/sgspub/localizarseries/localizarSeries.do?method=prepararTelaLocalizarSeries>`_.

Exemplo
-------
Exemplos
--------

.. ipython:: python
Expand Down Expand Up @@ -34,3 +34,23 @@ Exemplo
plt.ylabel('%')
@savefig sgs1.png
plt.legend().set_visible(False)
Dados de Inadimplência de Operações de Crédito
==============================================

.. ipython:: python
from bcb.sgs.regional_economy import get_non_performing_loans
from bcb.utils import BRAZILIAN_REGIONS, BRAZILIAN_STATES
import pandas as pd
get_non_performing_loans(["RR"], last=10, mode="all")
.. ipython:: python
northeast_states = BRAZILIAN_REGIONS["NE"]
get_non_performing_loans(northeast_states, last=5, mode="pj")
.. ipython:: python
get_non_performing_loans(BRAZILIAN_STATES, mode="PF", start="2024-01-01")
Binary file modified _static/images/savefig/taxajuros1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions api.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1"><a class="reference internal" href="currency.html">Moedas</a></li>
<li class="toctree-l1"><a class="reference internal" href="expectativas.html">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down Expand Up @@ -295,6 +296,46 @@ <h1>API<a class="headerlink" href="#api" title="Link permanente para este cabeç
</dl>
</dd></dl>

<span class="target" id="module-bcb.sgs.regional_economy"></span><dl class="py function">
<dt class="sig sig-object py" id="bcb.sgs.regional_economy.get_non_performing_loans">
<span class="sig-prename descclassname"><span class="pre">bcb.sgs.regional_economy.</span></span><span class="sig-name descname"><span class="pre">get_non_performing_loans</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">states_or_region</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'total'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">last</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">freq</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bcb.sgs.regional_economy.get_non_performing_loans" title="Link permanente para esta definição"></a></dt>
<dd><p>Dados de inadimplência das operações de crédito.</p>
<p>Esta função é um <em>wrapper</em> para o método para a função <code class="docutils literal notranslate"><span class="pre">get</span></code> do módulo <code class="docutils literal notranslate"><span class="pre">sgs</span></code>,
simplificando o acesso aos dados de inadimplência das operações de crédito.
Nessa função o usuário escolhe o tipo de inadimplência, o(s) estado(s) ou as regiões
que deseja obter os dados.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">bcb.sgs.regional_economy</span> <span class="kn">import</span> <span class="n">get_non_performing_loans</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">bcb.utils</span> <span class="kn">import</span> <span class="n">BRAZILIAN_REGIONS</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">series</span> <span class="o">=</span> <span class="n">get_non_performing_loans</span><span class="p">([</span><span class="s2">&quot;RR&quot;</span><span class="p">],</span> <span class="n">last</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;all&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">northeast_states</span> <span class="o">=</span> <span class="n">BRAZILIAN_REGIONS</span><span class="p">[</span><span class="s2">&quot;NE&quot;</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">series_ne</span> <span class="o">=</span> <span class="n">get_non_performing_loans</span><span class="p">(</span><span class="n">northeast_states</span><span class="p">,</span> <span class="n">last</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;pj&quot;</span><span class="p">)</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parâmetros<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>(</strong><strong>List</strong><strong>[</strong><strong>str</strong><strong>]</strong><strong>)</strong> (<em>states_or_region</em>) – </p></li>
<li><p><strong>(</strong><strong>str</strong><strong>)</strong> (<em>mode</em>) – “PJ” (pessoas jurídicas) ou “total” (inadimplência total).</p></li>
<li><p><strong>start</strong> (<em>str</em><em>, </em><em>int</em><em>, </em><em>date</em><em>, </em><em>datetime</em><em>, </em><em>Timestamp</em>) – Data de início da série.
Interpreta diferentes tipos e formatos de datas.</p></li>
<li><p><strong>end</strong> (<em>string</em><em>, </em><em>int</em><em>, </em><em>date</em><em>, </em><em>datetime</em><em>, </em><em>Timestamp</em>) – Data final da série.
Interpreta diferentes tipos e formatos de datas.</p></li>
<li><p><strong>last</strong> (<em>int</em>) – Retorna os últimos <code class="docutils literal notranslate"><span class="pre">last</span></code> elementos disponíveis da série temporal
solicitada. Se <code class="docutils literal notranslate"><span class="pre">last</span></code> for maior que 0 (zero) os argumentos <code class="docutils literal notranslate"><span class="pre">start</span></code>
e <code class="docutils literal notranslate"><span class="pre">end</span></code> são ignorados.</p></li>
<li><p><strong>freq</strong> (<em>str</em>) – Define a frequência a ser utilizada na série temporal</p></li>
</ul>
</dd>
<dt class="field-even">Retorna<span class="colon">:</span></dt>
<dd class="field-even"><p>série temporal univariada ou multivariada,
quando solicitado mais de uma série temporal.</p>
</dd>
<dt class="field-odd">Tipo de retorno<span class="colon">:</span></dt>
<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">DataFrame</span></code></p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-bcb.currency">
<span id="modulo-bcb-currency"></span><h2>Módulo <a class="reference internal" href="#module-bcb.currency" title="bcb.currency"><code class="xref py py-mod docutils literal notranslate"><span class="pre">bcb.currency</span></code></a><a class="headerlink" href="#module-bcb.currency" title="Link permanente para este cabeçalho"></a></h2>
Expand Down Expand Up @@ -761,6 +802,7 @@ <h1>API<a class="headerlink" href="#api" title="Link permanente para este cabeç
<li><a class="reference internal" href="#">API</a><ul>
<li><a class="reference internal" href="#module-bcb.sgs">Módulo <code class="xref py py-mod docutils literal notranslate"><span class="pre">bcb.sgs</span></code></a><ul>
<li><a class="reference internal" href="#bcb.sgs.get"><code class="docutils literal notranslate"><span class="pre">get()</span></code></a></li>
<li><a class="reference internal" href="#bcb.sgs.regional_economy.get_non_performing_loans"><code class="docutils literal notranslate"><span class="pre">get_non_performing_loans()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-bcb.currency">Módulo <code class="xref py py-mod docutils literal notranslate"><span class="pre">bcb.currency</span></code></a><ul>
Expand Down
1 change: 1 addition & 0 deletions currency.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Moedas</a></li>
<li class="toctree-l1"><a class="reference internal" href="expectativas.html">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down
1 change: 1 addition & 0 deletions expectativas.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1"><a class="reference internal" href="currency.html">Moedas</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down
16 changes: 14 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul>
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1"><a class="reference internal" href="currency.html">Moedas</a></li>
<li class="toctree-l1"><a class="reference internal" href="expectativas.html">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down Expand Up @@ -272,20 +273,27 @@ <h2>B</h2>
<li><a href="api.html#module-bcb.currency">módulo</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
bcb.odata.api

<ul>
<li><a href="api.html#module-bcb.odata.api">módulo</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
bcb.sgs

<ul>
<li><a href="api.html#module-bcb.sgs">módulo</a>
</li>
</ul></li>
<li>
bcb.sgs.regional_economy

<ul>
<li><a href="api.html#module-bcb.sgs.regional_economy">módulo</a>
</li>
</ul></li>
</ul></td>
Expand Down Expand Up @@ -339,6 +347,8 @@ <h2>G</h2>
<li><a href="api.html#bcb.currency.get_currency_list">get_currency_list() (no módulo bcb.currency)</a>
</li>
<li><a href="api.html#bcb.odata.api.BaseODataAPI.get_endpoint">get_endpoint() (método bcb.odata.api.BaseODataAPI)</a>
</li>
<li><a href="api.html#bcb.sgs.regional_economy.get_non_performing_loans">get_non_performing_loans() (no módulo bcb.sgs.regional_economy)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -369,6 +379,8 @@ <h2>M</h2>
<li><a href="api.html#module-bcb.odata.api">bcb.odata.api</a>
</li>
<li><a href="api.html#module-bcb.sgs">bcb.sgs</a>
</li>
<li><a href="api.html#module-bcb.sgs.regional_economy">bcb.sgs.regional_economy</a>
</li>
</ul></li>
</ul></td>
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul>
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1"><a class="reference internal" href="currency.html">Moedas</a></li>
<li class="toctree-l1"><a class="reference internal" href="expectativas.html">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down Expand Up @@ -353,6 +354,7 @@ <h1>Uso<a class="headerlink" href="#uso" title="Link permanente para este cabeç
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="sgs.html">SGS</a></li>
<li class="toctree-l1"><a class="reference internal" href="sgs.html#dados-de-inadimplencia-de-operacoes-de-credito">Dados de Inadimplência de Operações de Crédito</a></li>
<li class="toctree-l1"><a class="reference internal" href="currency.html">Moedas</a></li>
<li class="toctree-l1"><a class="reference internal" href="expectativas.html">Expectativas</a></li>
<li class="toctree-l1"><a class="reference internal" href="taxajuros.html">Taxas de Juros</a></li>
Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit 5e221d7

Please sign in to comment.