Welcome to deflateBR’s documentation!

The main deflateBR command: deflate

deflatebr.deflate.deflate(nominal_values, nominal_dates, real_date, index='ipca', progress_bar=False, on_jupyter=False)

deflatebr uses data from the Brazilian Institute for Applied Economic Research’s API (IPEADATA) to adjust nominal Brazilian Reais for inflation.

Parameters:
  • nominal_values ([int, float, np.array or pd.Series]) – An array containing nominal Brazilian Reais to deflate.
  • nominal_dates ([str, date or list]) – A date vector with corresponding nominal dates (i.e., when nominal values were measured). Values are set to the previous month, following the standard methodology used by the Brazilian Central Bank https://www3.bcb.gov.br/CALCIDADAO/publico/metodologiaCorrigirIndice.do?method=metodologiaCorrigirIndice
  • real_date (str) – A value indicating the reference date to deflate nominal values in the format ‘YYYY-MM’ (e.g., ‘2018-01’ for January 2018).
  • index (str) – Indicates the price index used to deflate nominal Reais. Valid options are: ‘ipca’, ‘igpm,’igpdi’, ‘ipc’, and ‘inpc’.
  • progress_bar (bool) – True to display a progress bar. False by default.
  • on_jupyter (bool) – True to display an HTML progress bar on jupyter notebook or jupyter lab.
Returns:

np.ndarray

Return type:

an array of deflated values.

Indices and tables