Skip to content

data_parser.py could be improved #153

@robfairh

Description

@robfairh

1-
I believe the function make_plots in data_parser.py could be deleted.
If my reading is correct, the functions make_emissions_plots and make_capacity_plots do together what make_plots does.

2-
Also, the following lines could be a for loop:

            # create dataframes
            df_elc = create_dataframe(datalines, var, sector='elc')
            df_ind = create_dataframe(datalines, var, sector='ind')
            df_vcl = create_dataframe(datalines, var, sector='vcl')
            plot = plots_dict[var]
            plot(dataframe=df_elc,
                 variable=var,
                 scenario=scenario,
                 sector='elc',
                 save=to_save)
            plot(dataframe=df_ind,
                 variable=var,
                 scenario=scenario,
                 sector='ind',
                 save=to_save)
            plot(dataframe=df_vcl,
                 variable=var,
                 scenario=scenario,
                 sector='vcl',
                 save=to_save)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Comp:AnalysisThis issue has to do with the analysis component of the code or document. (plots, postprocessing)Difficulty:1-BeginnerThis issue does not require expert knowledge and may be a good issue for new contributors.Priority:4-LowThis work is valuable, but not urgent or mission critical.Status:1-NewNo one has claimed this issue yet. It is in need of solving.Type:StyleIs related to coding style guide compliance (e.g. PEP8 or google C++ style guide).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions