OliverSherouse / wbdata

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

Add source arg for get_data, get_series, get_dataframe #38

Closed OliverSherouse closed 4 years ago

OliverSherouse commented 4 years ago

Per, @polk54, it turns out that an indicator can be in more than one source, and not all sources are updated at the same time, which is a hoot and also a holler. This means we need source arguments for the various data retrieval functions.

For get_data and get_series, this is straightforward enough, but a bit trickier for get_dataframe since you may way indicators from different sources in the same DataFrame. My initial thought is to allow the source to have one of three values:

  1. None, default
  2. an integer argument, which would apply to all variables
  3. an indicator->source dictionary

That seems to me to satisfy the law of least astonishment.

polk54 commented 4 years ago

This is great, thank you!