MexicoDataAPI
Access Mexican Data via APIs and Curated Datasets
Description
Provides functions to access data from public RESTful APIs including 'REST Countries API', 'World Bank API', and 'Nager.Date API', covering Mexico's economic indicators, population statistics, literacy rates, international geopolitical information and official public holidays. The package also includes curated datasets related to Mexico such as air quality monitoring stations, pollution zones, income surveys, postal abbreviations, election studies, forest productivity and demographic data by state. It supports research and analysis focused on Mexico by integrating reliable global APIs with structured national datasets drawn from open and academic sources. For more information on the APIs, see: 'REST Countries API' <https://restcountries.com/>, 'World Bank API' <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392>, and 'Nager.Date API' <https://date.nager.at/Api>.
Downloads
466
Last 30 days
8382nd
1.5K
Last 90 days
5.2K
Last year
Trend: -2.1% (30d vs prior 30d)
7
Last 30 days
18
Last 90 days
87
Last year
Trend: -36.4% (30d vs prior 30d)
2
Last 7 days
11
Last 30 days
1
All-time
autoCRAN-only: this name is served only by autoCRAN, so the count is exact.
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’ [4s/7s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-g
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [3s/4s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-g
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [7s/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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-get_mexic
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [4s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-get_
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [6s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-get_
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [4s/5s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-g
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running ‘testthat.R’ [4s/6s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-g
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted
tests
Running 'testthat.R' [4s]
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(MexicoDataAPI)
>
> test_check("MexicoDataAPI")
Saving _problems/test-get_country_info_mx-24.R
Saving _problems/test-get_country_info_mx-45.R
Datasets available in the 'MexicoDataAPI' package:
Datasets available in the 'MexicoDataAPI' package:
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
══ Skipped tests (22) ══════════════════════════════════════════════════════════
• On CRAN (22): 'test-get_mexico_cpi.R:24:3', 'test-get_mexico_cpi.R:52:3',
'test-get_mexico_gdp.R:24:3', 'test-get_
...[truncated]...
3',
'test-get_mexico_population.R:75:3', 'test-get_mexico_unemployment.R:24:3',
'test-get_mexico_unemployment.R:44:3', 'test-get_mexico_unemployment.R:51:3',
'test-get_mexico_unemployment.R:58:3', 'test-get_mexico_unemployment.R:65:3',
'test-get_mexico_unemployment.R:73:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-get_country_info_mx.R:24:3'): get_country_info_mx() returns a tibble with correct structure ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:24:3
── Error ('test-get_country_info_mx.R:45:3'): get_country_info_mx() returns data for Mexico ──
Error in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
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’ [3s/5s]
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 te
...[truncated]...
rror in `data_list[1, ]`: incorrect number of dimensions
Backtrace:
▆
1. └─MexicoDataAPI::get_country_info_mx() at test-get_country_info_mx.R:45:3
[ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ]
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’ [3s/24s] 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]... request_fetch.write_memory(req$output, req$url, handle) 6. │ └─curl::curl_fetch_memory(url, handle = handle) 7. └─curl:::raise_libcurl_error(...) [ FAIL 2 | WARN 0 | SKIP 22 | PASS 149 ] Error: ! Test failures. Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 29, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 24, 2026
tests
Running 'testthat.R' [5s]
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
...[truncated]...
Mexico ──
Expected `result$subregion` to equal "North America".
Differences:
`actual` is NULL
`expected` is a character vector ('North America')
[ FAIL 15 | WARN 0 | SKIP 22 | PASS 149 ]
Error:
! Test failures.
Execution halted