Closed tpike3 closed 3 years ago
That would work except that 'NER'
is not a recognized country code. How about Norway (NOR) instead?
for row in wb.data.fetch('p_M_skl', 'NOR', db=80, sector='BPH'): # all years
print(row)
or with Pandas:
wb.data.DataFrame('p_M_skl', 'NOR', sector='BPH', db=80)
@tgherzog Thanks. That worked. One comment is NER is Niger and is listed in the 'wb.economics.info(db=80)` and works with other requests. My inference would be there is just no data for Niger so it returns the APIResponseError .
Regardless, thanks very much.
One comment is NER is Niger and is listed in the 'wb.economics.info(db=80)` and works with other requests. My inference would be there is just no data for Niger so it returns the APIResponseError .
@tpike3: Niger is in the WDI (db=2, the default), but it's not included in GDLD:
>>> wb.economy.info('NER', db=2)
id value region incomeLevel
---- ---------- -------- -------------
NER Niger SSF LIC
1 elements
>>> wb.economy.info('NER', db=80)
--error--
Ohhh very good to know thanks!
This is great!
I am running into one issue.
I am trying to call sectors of the Gender Disaggregated Labor Database (db=80) but cannot figure out the syntax as sector is a custom dimension.
For example:
for row in wb.data.fetch('p_M_skl', 'NER', db=80, sector=["BPH"]): # all years
print(row)
I should be able to work with any example that pulls the data.
Thanks