BrazilDataAPI
Access Brazilian Data via APIs and Curated Datasets
Description
Provides functions to access data from the 'BrasilAPI', 'REST Countries API', 'Nager.Date API', and 'World Bank API', related to Brazil's postal codes, banks, holidays, company registrations, international country indicators, public holidays information, and economic development data. Additionally, the package includes curated datasets related to Brazil, covering topics such as demographic data (males and females by state and year), river levels, environmental emission factors, film festivals, and yellow fever outbreak records. The package supports research and analysis focused on Brazil by integrating open APIs with high-quality datasets from multiple domains. For more information on the APIs, see: 'BrasilAPI' <https://brasilapi.com.br/>, 'Nager.Date' <https://date.nager.at/Api>, 'World Bank API' <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392>, and 'REST Countries API' <https://restcountries.com/>.
Downloads
500
Last 30 days
7881st
1.6K
Last 90 days
5.5K
Last year
Trend: +0.2% (30d vs prior 30d)
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | ERROR |
| r-devel-linux-x86_64-debian-gcc | ERROR |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | ERROR |
| r-patched-linux-x86_64 | ERROR |
| r-release-linux-x86_64 | ERROR |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | ERROR |
Check details (9 non-OK)
tests
Running ‘testthat.R’ [9s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [6s/10s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [16s/45s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_inf
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [15s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_inf
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [11s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info_br
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [12s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info_br
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [9s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [10s/15s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_inf
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [10s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(BrazilDataAPI)
>
> test_check("BrazilDataAPI")
Error: Received status code 400
Error: Received status code 404
Error: status 400 - CNPJ not found or invalid.
Error: status 404 - CNPJ not found or invalid.
Saving _problems/test-get_country_info_br-24.R
Saving _problems/test-get_country_info_br-33.R
Saving _problems/test-get_country_info_br-45.R
Saving _problems/test-get_country_info_br-57.R
Saving _problems/test-get_country_info_br-67.R
Saving _problems/test-get_country_info_br
...[truncated]...
└─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:82:3
── Error ('test-get_country_info_br.R:89:3'): get_country_info_br() returns consistent data types across calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:89:3
── Error ('test-get_country_info_br.R:95:3'): get_country_info_br() returns identical results on multiple calls ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:95:3
── Error ('test-get_country_info_br.R:101:3'): get_country_info_br() has no missing values in required fields ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
Check History
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 12, 2026
tests
Running ‘testthat.R’ [7s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional t
...[truncated]...
or in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─BrazilDataAPI::get_country_info_br() at test-get_country_info_br.R:101:3
[ FAIL 10 | WARN 0 | SKIP 150 | PASS 89 ]
Error:
! Test failures.
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 7, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 31, 2026
tests
Running ‘testthat.R’ [10s/122s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional ...[truncated]... r() has no missing values in required fields ── Expected `is.na(result$languages)` to be FALSE. Differences: `actual`: `expected`: FALSE [ FAIL 23 | WARN 0 | SKIP 150 | PASS 103 ] Error: ! Test failures. Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 5, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 30, 2026
tests
Running ‘testthat.R’ [7s/35s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional t ...[truncated]... br() has no missing values in required fields ── Expected `is.na(result$languages)` to be FALSE. Differences: `actual`: `expected`: FALSE [ FAIL 24 | WARN 0 | SKIP 150 | PASS 91 ] Error: ! Test failures. Execution halted