Skip to content

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

@tjann

Description

@tjann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions