Package {ipeadatar}


Type: Package
Title: API Wrapper for 'Ipeadata'
Version: 0.2.0
Description: Provides direct access to the macroeconomic, financial, and regional database maintained by the Institute for Applied Economic Research (Ipea) via the Ipeadata API. For more information, see https://www.ipeadata.gov.br/.
Depends: R (≥ 4.1.0)
License: MIT + file LICENSE
Encoding: UTF-8
Language: en-US
URL: https://github.com/ipea/ipeadatar
BugReports: https://github.com/ipea/ipeadatar/issues
Imports: cli, curl, dplyr, jsonlite, lubridate, purrr, rlang, sjlabelled, tibble
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, spelling
VignetteBuilder: knitr
Config/testthat/edition: 3
RoxygenNote: 8.0.0
NeedsCompilation: no
Packaged: 2026-05-28 12:02:43 UTC; T207056565
Author: Luiz Eduardo Gomes ORCID iD [aut, cre], Daniel Herszenhut ORCID iD [ctb], Instituto de Pesquisa Econômica Aplicada (Ipea) [cph, fnd]
Maintainer: Luiz Eduardo Gomes <luiz.gomes@ipea.gov.br>
Repository: CRAN
Date/Publication: 2026-05-28 13:10:02 UTC

ipeadatar: API Wrapper for Ipeadata

Description

Provides direct access to the macroeconomic, financial, and regional database maintained by the Institute for Applied Economic Research (Ipea) via the Ipeadata API.

Author(s)

Maintainer: Luiz Eduardo Gomes luiz.gomes@ipea.gov.br (ORCID)

Authors:

Other contributors:

See Also

Useful links:


Available Series

Description

Returns a list of available series from the Ipeadata API.

Usage

available_series(language = c("en", "br"), label = TRUE)

Arguments

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

Value

A data frame containing the Ipeadata code, name, theme, source, frequency, last update, and activity status of available series.

Note

The original language of the available series names is preserved.


Available Subjects

Description

Returns a list of available subjects from the Ipeadata API.

Usage

available_subjects(language = c("en", "br"), label = TRUE)

Arguments

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

Value

A data frame containing the subject code and subject name.


Available Territorial Divisions

Description

Returns a list of available Brazilian territorial divisions from the Ipeadata API.

Usage

available_territories(language = c("en", "br"), label = TRUE)

Arguments

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

Value

A data frame containing the unit type, code, name, and area (in km²) of Brazilian territorial divisions.


Data for Requested Series

Description

Returns the data associated with requested Ipeadata series.

Usage

ipeadata(code, language = c("en", "br"), label = TRUE, quiet = FALSE)

Arguments

code

A character vector of Ipeadata series codes.

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

quiet

Logical. If FALSE (default), a progress bar is displayed.

Value

A data frame containing the Ipeadata code, date, value, territorial unit name, and territorial code of the requested series.

Note

Ipeadata codes may be obtained using available_series().

References

This package uses the Ipeadata API: https://www.ipeadata.gov.br/

See Also

available_series(), available_territories()

Examples


data <- ipeadata(
  code = "PRECOS12_IPCA12",
  language = "en"
)



Metadata for Requested Series

Description

Returns metadata information for requested Ipeadata series.

Usage

metadata(code, language = c("en", "br"), label = TRUE, quiet = FALSE)

Arguments

code

A character vector of Ipeadata series codes.

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

quiet

Logical. If FALSE (default), a progress bar is displayed.

Value

A data frame containing metadata for the requested Ipeadata series, including code, name, comments, last update, theme, source, frequency, unit, multiplier, status, subject code, and country code.

Note

The original language of series names and comments is preserved. Ipeadata codes may be obtained using available_series().

References

This package uses the Ipeadata API: https://www.ipeadata.gov.br/

See Also

available_series(), available_subjects(), available_territories()

Examples


meta <- metadata(code = "PRECOS12_IPCA12")



Searched Series

Description

Searches for Ipeadata series matching the provided terms.

Usage

search_series(terms = NULL, language = c("en", "br"), label = TRUE)

Arguments

terms

A character vector of search terms.

language

A character string specifying the language. Available options are English ("en", default) and Brazilian Portuguese ("br").

label

Logical. If TRUE (default), variable labels are added to the output data frame using sjlabelled::set_label().

Value

A data frame containing the Ipeadata code, name, theme, source, frequency, last update, and activity status of the matched series.

Note

The original language of the series names is preserved.

Examples


search_series(terms = "rural")