OliverSherouse / wbdata

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

Can I get a country classification? #22

Closed mwouts closed 5 years ago

mwouts commented 5 years ago

Hi, thanks for the nice package.

I'm trying to plot total population per continent, or a similar classification. Is it possible to get a country classification using wbdata? When I download a file manually from the world bank, I get some country metadata (with region information, no continent though). Can I access that metadata using wbdata ?

Thanks

OliverSherouse commented 5 years ago

I don't think you can get continent directly, because I don't think the World Bank gets in the business of defining continents. You can get results for a region by passing the code for the region in the country argument.

mwouts commented 5 years ago

Thanks @OliverSherouse for your answer. Yes, when I asked I was not aware... country not only contains countries, but also "World", and a series of regions as you mention. Precisely, I found that the following zones have a population total equal to the one in "World":

'North America', 'Middle East & North Africa', 'Latin America & Caribbean',
'Europe & Central Asia', 'Sub-Saharan Africa', 'South Asia', 'East Asia & Pacific'