Skip to content

wbids

Seamless Access to World Bank International Debt Statistics (IDS)

v1.1.3 · Dec 19, 2025 · MIT + file LICENSE

Description

Access and analyze the World Bank's International Debt Statistics (IDS) <https://www.worldbank.org/en/programs/debt-statistics/ids>. IDS provides creditor-debtor relationships between countries, regions, and institutions. 'wbids' enables users to download, process and work with IDS series across multiple geographies, counterparts, and time periods.

Downloads

216

Last 30 days

15236th

216

Last 90 days

216

Last year

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc ERROR
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
ERROR r-devel-linux-x86_64-fedora-gcc

tests

  Running ‘testthat.R’ [0m/17m]
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(wbids)
  > 
  > test_check("wbids")
  Reading in file.
  Processing file.
  Downloading file to: /tmp/Rtmpw9ccbZ/working_dir/RtmpRrsRhL/file34969fc185b2b...
  Processing file.
  Downloading file to: /tmp/Rtmpw9ccbZ/working_dir/RtmpRrsRhL/file34969f2aa0d73...
  Reading in file.
  Downloading file to: /tmp/Rtmpw9ccbZ/working_dir/RtmpRrsRhL/file34969f631e9db...
  Saving _problems/test-ids_get-596.R
  Saving _problems/test-ids_get-652.R
  Saving _problems/test-perform_request-16.R
  Saving _problems/test-perform_request-63.R
  Saving _problems/test-perform_request-83.R
  Saving _problems/test-perform_request-113.R
  [ FAIL 9 | WARN 0 | SKIP 6 | PASS 135 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (6): 'test-ids_bulk.R:161:3', 'test-ids_bulk.R:215:3',
    'test-ids_bulk.R:248:3', 'test-ids_bulk.R:301:3', 'test-ids_bulk.R:368:3',
    'test-ids_get_ed.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ids_get.R:536:3'): ids_get handles valid entity codes correctly ──
  <httr2_failure/httr2_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: Failed to perform HTTP request.
  Caused by error in `curl::curl_fetch_memory()`:
  ! Timeout was reached [api.worldbank.org]:
  SSL connection timeout
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-ids_get.R:536:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─wbids::ids_get(...)
   10.   └─wbids:::get_debt_statistics(...)
   11.     └─wbids:::perform_request(resource, progress = progress_message)
   12.       └─httr2::req_perform(req)
   13.         └─httr2:::handle_resp(req, resp, error_call = error_call)
   14.           └─rlang::cnd_signal(resp)
  ── Error ('test-ids_get.R:554:3'): ids_get handles valid counterpart codes correctly ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at test-ids_get.R:554:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─wbids::ids_get(...)
   10.   └─wbids:::get_debt_statistics(...)
   11.     └─wbids:::perform_request(resource, progress = progress_message)
   12.       └─httr2::req_perform(req)
   13.         └─httr2:::handle_resp(req, resp, error_call = error_call)
   14.           └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   15.             ├─rlang::catch_cnd(...)
   16.             │ ├─rlang::eval_bare(...)
   17.             │ ├─base::tryCatch(...)
   18.             │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   19.             │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20.             │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   21.             │ └─base::force(expr)
   22.             └─rlang::abort(...)
  ── Error ('test-ids_get.R:591:3'): ids_get returns expected data structure ─────
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. └─wbids::ids_get(...) at test-ids_get.R:591:3
    2.   └─wbids:::get_debt_statistics(...)
    3.     └─wbids:::perform_request(resource, progress = progress_message)
    4.       └─httr2::req_perform(req)
    5.         └─httr2:::handle_resp(req, resp, error_call = error_call)
    6.           └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
    7.             ├─rlang::catch_cnd(...)
    8.             │ ├─rlang::eval_bare(...)
    9.             │ ├─base::tryCatch(...)
   10.             │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   11.             │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   12.             │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   13.             │ └─base::force(expr)
   14.             └─rlang::abort(...)
  ── Error ('test-ids_get.R:644:3'): ids_get handles pre-1970 dates correctly ────
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-ids_get.R:644:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─wbids::ids_get(...)
    8.   └─wbids:::get_debt_statistics(...)
    9.     └─wbids:::perform_request(resource, progress = progress_message)
   10.       └─httr2::req_perform(req)
   11.         └─httr2:::handle_resp(req, resp, error_call = error_call)
   12.           └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   13.             ├─rlang::catch_cnd(...)
   14.             │ ├─rlang::eval_bare(...)
   15.             │ ├─base::tryCatch(...)
   16.             │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   17.             │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   18.             │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   19.             │ └─base::force(expr)
   20.             └─rlang::abort(...)
  ── Error ('test-perform_request.R:15:7'): perform_request handles error responses ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::with_mocked_bindings(...) at test-perform_request.R:10:3
    2. ├─testthat::expect_error(perform_request("indicators"), "API error: Invalid indicator") at test-perform_request.R:15:7
    3. │ └─testthat:::expect_condition_matching_(...)
    4. │   └─testthat:::quasi_capture(...)
    5. │     ├─testthat (local) .capture(...)
    6. │     │ └─base::withCallingHandlers(...)
    7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. └─wbids:::perform_request("indicators")
    9.   └─httr2::req_perform(req)
   10.     └─httr2:::handle_resp(req, resp, error_call = error_call)
   11.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   12.         ├─rlang::catch_cnd(...)
   13.         │ ├─rlang::eval_bare(...)
   14.         │ ├─base::tryCatch(...)
   15.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   16.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   17.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   18.         │ └─base::force(expr)
   19.         └─rlang::abort(...)
  ── Error ('test-perform_request.R:23:3'): perform_request validates per_page parameter ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(perform_request("series", per_page = 1000)) at test-perform_request.R:23:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─wbids:::perform_request("series", per_page = 1000)
   10.   └─httr2::req_perform(req)
   11.     └─httr2:::handle_resp(req, resp, error_call = error_call)
   12.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   13.         ├─rlang::catch_cnd(...)
   14.         │ ├─rlang::eval_bare(...)
   15.         │ ├─base::tryCatch(...)
   16.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   17.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   18.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   19.         │ └─base::force(expr)
   20.         └─rlang::abort(...)
  ── Error ('test-perform_request.R:63:3'): perform_request handles API errors gracefully ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::expect_error(perform_request("nonexistent"), "HTTP 400 Bad Request.") at test-perform_request.R:63:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─wbids:::perform_request("nonexistent")
    8.   └─httr2::req_perform(req)
    9.     └─httr2:::handle_resp(req, resp, error_call = error_call)
   10.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   11.         ├─rlang::catch_cnd(...)
   12.         │ ├─rlang::eval_bare(...)
   13.         │ ├─base::tryCatch(...)
   14.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   15.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   16.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   17.         │ └─base::force(expr)
   18.         └─rlang::abort(...)
  ── Error ('test-perform_request.R:77:7'): perform_request handles wrong requests gracefully ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. ├─testthat::with_mocked_bindings(...) at test-perform_request.R:74:3
    2. ├─testthat::expect_error(...) at test-perform_request.R:77:7
    3. │ └─testthat:::expect_condition_matching_(...)
    4. │   └─testthat:::quasi_capture(...)
    5. │     ├─testthat (local) .capture(...)
    6. │     │ └─base::withCallingHandlers(...)
    7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. └─wbids:::perform_request("country")
    9.   └─httr2::req_perform(req)
   10.     └─httr2:::handle_resp(req, resp, error_call = error_call)
   11.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   12.         ├─rlang::catch_cnd(...)
   13.         │ ├─rlang::eval_bare(...)
   14.         │ ├─base::tryCatch(...)
   15.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   16.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   17.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   18.         │ └─base::force(expr)
   19.         └─rlang::abort(...)
  ── Error ('test-perform_request.R:110:3'): perform_request handles pagination correctly ──
  <httr2_http_502/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(req)`: HTTP 502 Bad Gateway.
  Backtrace:
       ▆
    1. └─wbids:::perform_request(...) at test-perform_request.R:110:3
    2.   └─httr2::req_perform(req)
    3.     └─httr2:::handle_resp(req, resp, error_call = error_call)
    4.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
    5.         ├─rlang::catch_cnd(...)
    6.         │ ├─rlang::eval_bare(...)
    7.         │ ├─base::tryCatch(...)
    8.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    9.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   11.         │ └─base::force(expr)
   12.         └─rlang::abort(...)
  
  [ FAIL 9 | WARN 0 | SKIP 6 | PASS 135 ]
  Error:
  ! Test failures.
  Execution halted
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-linux-x86_64-fedora-gcc

tests

  Running ‘testthat.R’ [0m/17m]
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(w

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies cli withr httr2 dplyr purrr (>= 1.0.0) tibble tidyr rlang econdatasets econdataverse wbids

Version History

new 1.1.3 Mar 9, 2026