geoprob_pipe.cmd_app.parameter_input.expand_input_tables ======================================================== .. py:module:: geoprob_pipe.cmd_app.parameter_input.expand_input_tables Functions --------- .. autoapisummary:: geoprob_pipe.cmd_app.parameter_input.expand_input_tables._combine_parameter_invoer_sources geoprob_pipe.cmd_app.parameter_input.expand_input_tables._gather_hrd_frag_line_from_geopackage geoprob_pipe.cmd_app.parameter_input.expand_input_tables._gather_other_freq_line geoprob_pipe.cmd_app.parameter_input.expand_input_tables._gather_frag_line_from_csv geoprob_pipe.cmd_app.parameter_input.expand_input_tables._collect_fragility_values geoprob_pipe.cmd_app.parameter_input.expand_input_tables._add_fragility_values_to_combined_parameter_invoer geoprob_pipe.cmd_app.parameter_input.expand_input_tables._collect_right_columns_combined_parameter_invoer geoprob_pipe.cmd_app.parameter_input.expand_input_tables._construct_df_identifiers geoprob_pipe.cmd_app.parameter_input.expand_input_tables._gather_required_input_parameters geoprob_pipe.cmd_app.parameter_input.expand_input_tables._expand geoprob_pipe.cmd_app.parameter_input.expand_input_tables._concat_collection geoprob_pipe.cmd_app.parameter_input.expand_input_tables.run_expand_input_tables Module Contents --------------- .. py:function:: _combine_parameter_invoer_sources(tables) Combineert de geo-gerefereerde parameter invoer met de handmatige invoer die oorspronkelijk uit de Excel kwam. Zodoende kan vanuit één dataframe de invoer geëxplodeerd worden naar invoer per uittredepunt. .. py:function:: _gather_hrd_frag_line_from_geopackage(ref, geopackage_filepath) .. py:function:: _gather_other_freq_line(ref, tables) Gather a freq line that is not from the HRD-database, and not from a .csv-file. It originates from the Excel, either directly from the Excel, or imported into the 'fragility_values_invoer_hrd'-database table. :param ref: :param tables: :return: .. py:function:: _gather_frag_line_from_csv(csv_file_name, geopackage_filepath) .. py:function:: _collect_fragility_values(tables, fragility_refs, geopackage_filepath) Collects the fragility values from the different sources. The sources are (a) the HRD-file, (b) the Excel input file, and (c) the csv folder. :param tables: :param fragility_refs: :param geopackage_filepath: :return: Returns a dataframe with columns fragility_values_ref and fragility_values. .. py:function:: _add_fragility_values_to_combined_parameter_invoer(df_parameter_invoer_combined, tables, geopackage_filepath, drop_ref = True) Haalt uit de fragility values Excel de arrays op en vervang in de df_parameter_invoer_combined de referentie met de daadwerkelijke fragility values. .. py:function:: _collect_right_columns_combined_parameter_invoer(df_parameter_invoer_combined) Parameter tabel omzetten naar juiste kolommen. Enkel per uittredepunt, scenario en parameter de parameterinvoer. .. py:function:: _construct_df_identifiers(geopackage_filepath, tables) Create identifiers table. The identifiers table is a table with unique rows (unique uittredepunt, vak and scenario combo). It is used as a base to explode to input per scenario and uittredepunt. .. py:function:: _gather_required_input_parameters(geopackage_filepath) .. py:function:: _expand(df_parameter_invoer_combined, df_identifiers, geopackage_filepath) .. py:function:: _concat_collection(collection) .. py:function:: run_expand_input_tables(geopackage_filepath, add_frag_ref = False, tables = None) Performs logic to expand all parameter input from different levels to input on uittredepunt-level. :param geopackage_filepath: :param add_frag_ref: Indien True, dan wordt voor parameter input met een distribution_type 'cdf_curve' de referentie naar de invoer behouden. Deze is niet nodig voor de berekeningen, maar wordt wel gebruikt voor de visualisaties. :param tables: :return: DataFrame with columns parameter_name, vak_id, uittredepunt_id, ondergrondscenario_naam and parameter_input.