| .get_sgs_series | R Documentation |
Internal helper function to download time series data from BCB SGS API. Uses httr2 for robust HTTP requests with automatic fallback strategy.
.get_sgs_series(series_id, start_date = NULL, end_date = NULL)
series_id |
Numeric. SGS series ID. |
start_date |
Start date (YYYY, YYYY-MM, or YYYY-MM-DD format). |
end_date |
End date (YYYY, YYYY-MM, YYYY-MM-DD format, or NULL for current date). |
A data.frame with columns 'date' (Date) and 'value' (numeric).
# Example: download SELIC series (ID 432)
df <- brfinance:::.get_sgs_series(432, "2020", "2021")
head(df)
tail(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.