import logging


def generate_data_lists(_list_data):
    """
    Method for generate several lists for dead data, confirmed cases and recovered cases
    :param _list_data: Data table with dead cases, confirmed cases and recovered cases
    :return: Three lists with separated data
    """

    logging.info('Start to generate the different lists for dead, confirmed and recovered data')

    # Create the lists for the graphs
    _list_dead_cases = []
    _list_confirmed_cases = []
    _list_recovered_cases = []

    # Sum the number of cases in every day
    for i in range(0, len(_list_data)):
        _list_dead_cases.append((_list_data[i]['Deaths']).sum())
        _list_confirmed_cases.append((_list_data[i]['Confirmed']).sum())
        _list_recovered_cases.append((_list_data[i]['Recovered']).sum())

    return _list_dead_cases, _list_confirmed_cases, _list_recovered_cases