Skip to content

Commit 4a6dc86

Browse files
author
Mike
committed
Update documentation
1 parent fe0174d commit 4a6dc86

1 file changed

Lines changed: 29 additions & 14 deletions

File tree

src/hdx/data/dataset.py

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,13 +2071,20 @@ def _generate_resource_view(
20712071
indicators: Optional[ListTuple[Dict]] = None,
20722072
findreplace: Optional[Dict] = None,
20732073
) -> resource_view.ResourceView:
2074-
"""Create QuickCharts for dataset from configuration saved in resource view. You can disable specific bites
2075-
by providing bites_disabled, a list of 3 bools where True indicates a specific bite is disabled and False
2076-
indicates leave enabled. If you supply indicators, then the internal indicators resource view template will be
2077-
used. The parameter indicators is a list with 3 dictionaries of form:
2078-
{'code': 'MY_INDICATOR_CODE', 'title': 'MY_INDICATOR_TITLE', 'unit': 'MY_INDICATOR_UNIT'}.
2079-
Creation of the resource view will be delayed until after the next dataset create
2080-
or update if a resource id is not yet available.
2074+
"""Create QuickCharts for dataset from configuration saved in resource
2075+
view. You can disable specific bites by providing bites_disabled, a
2076+
list of 3 bools where True indicates a specific bite is disabled and
2077+
False indicates leave enabled. If you supply indicators, then the
2078+
internal indicators resource view template will be used. The parameter
2079+
indicators is a list with 3 dictionaries of form:
2080+
{"code": "MY_INDICATOR_CODE", "title": "MY_INDICATOR_TITLE",
2081+
"unit": "MY_INDICATOR_UNIT"}. Optionally, the following defaults can be
2082+
overridden in the parameter indicators: {"code_col": "#indicator+code",
2083+
"value_col": "#indicator+value+num", "date_col": "#date+year",
2084+
"date_format": "%Y", "aggregate_col": "null"}.
2085+
2086+
Creation of the resource view will be delayed until after the next
2087+
dataset create or update if a resource id is not yet available.
20812088
20822089
Args:
20832090
resource (Union[Resource,Dict,str,int]): Either resource id or name, resource metadata from a Resource object or a dictionary or position. Defaults to 0.
@@ -2289,13 +2296,21 @@ def generate_resource_view(
22892296
indicators: Optional[ListTuple[Dict]] = None,
22902297
findreplace: Optional[Dict] = None,
22912298
) -> resource_view.ResourceView:
2292-
"""Create QuickCharts for dataset from configuration saved in resource view. You can disable specific bites
2293-
by providing bites_disabled, a list of 3 bools where True indicates a specific bite is disabled and False
2294-
indicates leave enabled. If you supply indicators, then the internal indicators resource view template will be
2295-
used. The parameter indicators is a list with 3 dictionaries of form:
2296-
{'code': 'MY_INDICATOR_CODE', 'title': 'MY_INDICATOR_TITLE', 'unit': 'MY_INDICATOR_UNIT'}.
2297-
Creation of the resource view will be delayed until after the next dataset create
2298-
or update if a resource id is not yet available.
2299+
"""Create QuickCharts for dataset from configuration saved in resource
2300+
view. You can disable specific bites by providing bites_disabled, a
2301+
list of 3 bools where True indicates a specific bite is disabled and
2302+
False indicates leave enabled. If you supply indicators, then the
2303+
internal indicators resource view template will be used. The parameter
2304+
indicators is a list with 3 dictionaries of form:
2305+
{"code": "MY_INDICATOR_CODE", "title": "MY_INDICATOR_TITLE",
2306+
"unit": "MY_INDICATOR_UNIT"}. Optionally, the following defaults can be
2307+
overridden in the parameter indicators: {"code_col": "#indicator+code",
2308+
"value_col": "#indicator+value+num", "date_col": "#date+year",
2309+
"date_format": "%Y", "aggregate_col": "null"}.
2310+
2311+
Creation of the resource view will be delayed until after the next
2312+
dataset create or update if a resource id is not yet available and will
2313+
be disabled if there are no valid charts to display.
22992314
23002315
Args:
23012316
resource (Union[Resource,Dict,str,int]): Either resource id or name, resource metadata from a Resource object or a dictionary or position. Defaults to 0.

0 commit comments

Comments
 (0)