api-python icon indicating copy to clipboard operation
api-python copied to clipboard

[BUG] get_stats function is not returning in the promised format

Open tjann opened this issue 5 years ago • 0 comments

Describe the bug The docstrings and docs indicate that get_stats returns

"A dictionary mapping each Place identified by the given dcid to its name and the time series associated with the StatisticalVariable identified by the given stats_var and filtered by obs_dates."

Which is not true.

To Reproduce Steps to reproduce the behavior:

> dc.get_stats(['country/USA'], 'Count_Person')
 {'country/USA': {'data': {'2019': 328239523},
  'is_dc_aggregate': True,
  'place_dcid': 'country/USA',
  'place_name': 'United States'}}

Expected behavior

> dc.get_stats(['country/USA'], 'Count_Person')
 {'country/USA': {'data': {'2019': 328239523},
  'place_name': 'United States'}}

OR updated docstring.

Screenshots

Additional context

tjann avatar Jul 10 '20 05:07 tjann