Example #1
0
def _compute_analytics(dataset_dict):
    result = {}
    result['is_cod'] = analytics.is_cod(dataset_dict)
    result['is_indicator'] = analytics.is_indicator(dataset_dict)
    result['analytics_group_names'], result['analytics_group_ids'] = analytics.extract_locations_in_json(dataset_dict)
    result['analytics_dataset_availability'] = analytics.dataset_availability(dataset_dict)
    return result
Example #2
0
def hdx_create_screenshot_for_cod(context, data_dict):
    _check_access('hdx_create_screenshot_for_cod', context, data_dict)

    id = _get_or_bust(data_dict, 'id')
    dataset_dict = _get_action('package_show')(context, {'id': id})

    if is_cod(dataset_dict) == 'true':
        screenshot.create_screenshot(dataset_dict)