gshs-ornl / wbstats

wbstats: An R package for searching and downloading data from the World Bank API
http://gshs-ornl.github.io/wbstats/
Other
127 stars 23 forks source link

duplicated results in `wbsearch` #14

Closed vincentarelbundock closed 4 years ago

vincentarelbundock commented 5 years ago

I get some duplicated results when I search using a simple regex.

library(wbstats)
a <- wbsearch('gdp.*capita')
a <- duplicated(a$indicatorID)
sum(a)
#> [1] 15

Created on 2019-02-04 by the reprex package (v0.2.1)

jpiburn commented 4 years ago

Thank you for finding that. wbsearch() still had this issue, but has been deprecated in version 1.0. its replacement, wb_search() works correctly.

library(wbstats)

b <- wb_search('gdp.*capita')
b <- duplicated(b$indicator_id)

sum(b)
#> [1] 0

Created on 2020-04-23 by the reprex package (v0.3.0)