worldbank / povcalnetR

R client to the Povcalnet API
https://worldbank.github.io/povcalnetR
Other
9 stars 5 forks source link

Region code not correctly returned #23

Open tonyfujs opened 4 years ago

tonyfujs commented 4 years ago

When using the option fill_gaps=True, the regions are all returned as "XX."

poverty <- povcalnet(year = 2015, fill_gaps = TRUE)
poverty <- povcalnet(year = 2015)
tonyfujs commented 4 years ago

This is an issue with the underlying Povcalnet API:

http://iresearch.worldbank.org/povcalnet/povcalnetapi.ashx?SurveyYears=2015&Countries=ARM_3,AUT_3&PovertyLine=1.9&display=C&format=csv

http://iresearch.worldbank.org/povcalnet/povcalnetapi.ashx?YearSelected=2015&Countries=ARM_3,AUT_3&PovertyLine=1.9&display=C&format=csv

A function could be added to take care of the region's recoding on the R package side, but the right way to go is to fix it directly at the API level.