def default_grouping(datasets, date_field=None):
    """
    Heuristic for default boxplot grouping
    """
    if datasets > 20 and date_field:
        return 'year'
    elif datasets > 10 or not date_field:
        return 'series'
    else:
        return 'series-year'
