Skip to content

Plotting map results with plot pkg return TypeError #743

@HenrZu

Description

@HenrZu

Bug description

When trying to call the pm.extract_data function with created results, i get the error:
TypeError: object of type 'NoneType' has no len()

Also, there a few other things, which could be improved, e.g. the scale_dataframe_relative function

Version

Linux

To reproduce

Script:

    files_input = {'Data set 1': 'test2/p75/Results'}
    file_format = 'h5'
    age_groups = {0: '0-4', 1: '5-14', 2: '15-34',
                  3: '35-59', 4: '60-79', 5: '80+'}
    if len(age_groups) == 6:
        filter_age = None
    else:
        if file_format == 'json':
            filter_age = [val for val in age_groups.values()]
        else:
            filter_age = ['Group' + str(key) for key in age_groups.keys()]
    relative = True
    num_days = 92
    for day in range(0, num_days):
        i = 0
        for file in files_input.values():
            df = pm.extract_data(
                file, region_spec=None, column=None, date=day,
                filters={'Group': filter_age, 'InfectionState': [1,2,3]},
                file_format=file_format)

Relevant log output

No response

Add any relevant information, e.g. used compiler, screenshots.

No response

Checklist

  • Attached labels, especially loc:: or model:: labels.
  • Linked to project

Metadata

Metadata

Labels

class::bugBugs found in the softwareclass::improvementCleanup that doesn't affect functionalityloc::data analysisThis issue concerns any kind of data analysis.model::odeThis issue concerns any kind of ODE-based model.

Type

No type

Projects

Status

Done (Total)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions