OliverSherouse / wbdata

A python library for accessing world bank data
GNU General Public License v2.0
182 stars 55 forks source link

Data for 2017 not available when querying for all countries #26

Closed wochner closed 5 years ago

wochner commented 5 years ago

When I query an indicator for one country, the 2017 value will be available.

indicators = {"CC.PER.RNK": "Control of Corruption"}
df = wbdata.get_dataframe(indicators, country=("AFG"))
Out[11]: 
      Control of Corruption
date                       
2017               3.846154
2016               3.846154
2015               6.250000
2014               5.288462
2013               1.895735

Doing the same for all countries, will not give the 2017 datapoint:

df = wbdata.get_dataframe(indicators)
Out[13]: 
                  Control of Corruption
country     date                       
Afghanistan 2016               3.365385
            2015               6.250000
            2014               5.288462
            2013               1.895735
            2012               2.369668
            2011               0.947867
            2010               0.952381
            2009               0.956938
            2008               0.485437
            2007               0.970874
            2006               3.902439
            2005               2.439024
            2004               5.853659
            2003               5.050505
            2002               5.050505
            2000               5.076142
            1998               9.793815
            1996               4.301075
Albania     2016              41.346153
            2015              38.461540
            2014              34.615383
            2013              27.014217
OliverSherouse commented 5 years ago

Try deleting the cache. If you don't know where that is:

wochner commented 5 years ago

Thanks for the hint, but it proved unsuccesful. Still no values for 2017. Can you replicate this or is it an issue only on my side?

MaxGhenis commented 5 years ago

FWIW I wasn't able to reproduce this - 2017 AFG data showed up with and without specifying the country: image

image

wochner commented 5 years ago

Can also not replicate any longer. Closing the issue.