NEWS
worldbank 0.11.0.9000
worldbank 0.11.0 (2026-10-02)
Breaking changes
pip_cp(), pip_data(), and pip_group() now default to povline = NULL, which uses the international poverty line of the requested ppp_version instead of the outdated 2.15.
wb_cache_delete(), deprecated since worldbank 0.8.0, is now defunct. Use wb_cache_clear() instead.
wb_indicator() now returns every topic of an indicator in topic_id and topic_value, separated by ;, instead of only the first. topic_id is now character, and comparisons such as topic_value == "Health" no longer match indicators with several topics. Use grepl("(^|;)Health(;|$)", topic_value) instead.
New features
- Progress bars for slow paginated requests can now be turned off with
options(worldbank.progress = FALSE).
wb_country() gains region, income_level, and lending_type arguments to filter countries server-side instead of downloading the full list.
wb_data() gains an mrnev argument to return the most recent non-empty values for each country, even if they are from different years. Unlike mrv, it keeps countries without a value in the most recent year.
wb_data() gains a source argument to query a database other than the World Development Indicators, as listed by wb_source().
- New
wb_document() searches the World Bank Documents & Reports archive by search term, country, document type, project, and date. Use limit to cap the number of documents returned, since broad queries can match hundreds of thousands of documents.
wb_indicator() and wb_search() gain a source argument to query indicators from a specific database, as listed by wb_source().
wb_project() gains a limit argument to cap the number of projects returned.
wb_project() is now several times faster, since it only requests the fields it returns.
Bug fixes
- Requests are now also retried on HTTP 502 and 504 responses, which the World Bank APIs return for temporary gateway failures.
pip_data() and pip_group() now accept year = "all" and year = "MRV", which the PIP API supports, instead of only four-digit years.
wb_bulk() now trims whitespace and returns NA instead of "" for empty fields.
wb_data() and the other Indicators API functions now fetch every page of results, instead of silently returning only the first 32,500 rows.
wb_project() no longer returns duplicated or missing projects for queries spanning several pages. Projects are now sorted by descending id.
wb_project() now errors when start_date is after end_date, instead of silently returning no projects.
wb_search() gains a fixed argument to match pattern as a literal string. As in grepl(), the match is case sensitive, but it no longer warns about ignore.case.
worldbank 0.10.0 (2026-08-21)
- The PIP functions now require
release_version and ppp_version to be exactly 8 and 4 digits, given as a string or a number.
fone_dataset() and fone_view() now return no more than the requested limit when pagination is required.
fone_dataset(), fone_view(), and the PIP functions now keep Namibia's "NA" country code, instead of reading it as a missing value.
fone_view() now trims whitespace and returns NA instead of "" for empty fields, matching fone_dataset() and the rest of the package.
pip_cp(), pip_data(), pip_group(), and pip_versions() now trim whitespace and return NA instead of "" for empty fields, matching the rest of the package.
pip_cp(), pip_data(), and pip_group() now require povline to be a number between 0 and 2700, and pip_data() and pip_group() require popshare to be a number between 0 and 1.
pip_data() and pip_group() now correctly document popshare as taking precedence over povline; the documentation previously claimed the opposite. The behavior is unchanged.
wb_bulk() now keeps Namibia's "NA" code in the iso2_code and wb_iso2_code columns of the country table, instead of reading it as a missing value.
wb_data() gains a footnote argument to return the footnotes published with each observation.
wb_data() no longer returns NA dates when a query mixes annual and sub-annual indicators.
wb_project() now returns results when country holds more than one code, instead of silently returning no rows. Codes are also upper-cased before querying, and must be two characters, since the Projects API matches them exactly.
wb_project() now accepts multiple values for id, status, and region, returning the projects that match any of them.
wb_project() now requires status to be one of "active", "closed", "dropped", or "pipeline", matched case insensitively.
wb_project() now numbers the rows of the returned data frame, instead of naming them after the project IDs already held in the id column.
wb_search() now numbers the rows of the returned data frame, instead of naming them after each match's position in the indicator catalog.
worldbank 0.9.1 (2026-06-29)
wb_data() now returns an empty data frame instead of erroring when a query has no observations.
worldbank 0.9.0 (2026-05-03)
wb_bulk() downloads the entire World Development Indicators dataset as a zip and returns its six CSVs as a list of data frames, including footnote and series-time metadata not exposed by the API.
wb_search() searches the indicator catalog for a regular expression pattern across one or more fields.
- Documentation improvements.
worldbank 0.8.0 (2026-03-15)
wb_data() gains mrv and gapfill parameters to query the most recent values and forward-fill missing data.
wb_project() queries World Bank project data with support for filtering by country, status, region, date range, and free-text search.
pip_cp() returns country profile data from the PIP API.
pip_data() gains a nowcast parameter to include nowcast estimates.
wb_cache_clear() replaces wb_cache_delete(), which is now deprecated.
worldbank 0.7.1 (2025-12-06)
- Don't cache queries in tests to comply with CRAN
worldbank 0.7.0 (2025-11-10)
- Added optional request caching to improve performance for repeated queries. Enable with
options(worldbank.cache = TRUE). Cache duration can be customized with worldbank.cache_max_age (default: 1 day).
- New functions
wb_cache_delete() and wb_cache_dir() to manage the cache.
worldbank 0.6.1 (2025-08-29)
- Documentation improvements.
worldbank 0.6.0 (2025-05-29)
wb_data() has been added as an alias for wb_country_indicator()
worldbank 0.5.0 (2025-01-27)
wb_country_indicator() now allows for multiple indicators to be requested at once.
worldbank 0.4.0 (2024-12-09)
- Removed conditional return of tibble and now always return a data.frame instead. This ensures type stability across all functions.
- Add support for Finances One API data.
worldbank 0.3.0 (2024-08-26)
- Moved to HTTPS for all API calls.
- Support for Poverty and Inequality Platform (PIP) data.
worldbank 0.2.0 (2024-07-31)
- Support month and quarter date format in
wb_country_indicator().
- More robust error handling.
worldbank 0.1.0 (2024-07-02)