View source: R/get_ipca_from_target.R
| get_ipca_from_target | R Documentation |
Compares 12-month accumulated IPCA inflation against the official inflation target set annually by the CMN (Conselho Monetário Nacional), and returns both series plus the gap between them (positive means inflation is running above target).
get_ipca_from_target(
start_date = NULL,
end_date = NULL,
language = "eng",
labels = TRUE
)
start_date |
Start date for the data period. Accepts multiple formats:
|
end_date |
End date for the data period. Accepts the same formats as
|
language |
Language for the |
labels |
Logical indicating whether to add variable labels using the
|
A data.frame with columns:
Reference date (monthly)
IPCA inflation accumulated over the trailing 12 months (%)
Official CMN inflation target for that calendar year (%)
ipca_12m - target, in percentage points
Series used: SGS 13522 ("IPCA - Variação acumulada em 12 meses"),
monthly, and SGS 13521 ("Meta para a inflação", set by the CMN), which
has annual frequency — one value per calendar year. The target is
broadcast to every month of its year via a left join on the year, so it
lines up with the monthly ipca_12m series. If the CMN has not yet set a
target for the most recent year in the requested window, target/gap
will be NA for those months rather than silently reusing an old value.
df <- get_ipca_from_target()
df2 <- get_ipca_from_target("2015", "2024", language = "pt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.