7.10. Auxiliary functionsΒΆ

utils.print_model_info

click.echos a header with main model information.

utils.get_geodataframe

Georeferences a pandas dataframe using longitude and latitude columns of that dataframe.

utils.show_versions

click.echos the version numbers by the main python-packages used.

utils.parse_settings

Reads the model configuration file.

utils.parse_projection_settings

This function parses the (various) cfg-files for projections.

utils.determine_projection_period

Determines the period for which projections need to be made.

utils.make_output_dir

Creates the output folder at location specfied in cfg-file, and returns dictionary with config-objects and out-dir per run.

utils.download_UCDP

If specfied in cfg-file, the PRIO/UCDP data is directly downloaded and used as model input.

utils.initiate_setup

Initiates the model set-up.

utils.create_artificial_Y

Creates an array with identical percentage of conflict points as input array.

utils.global_ID_geom_info

Retrieves unique ID and geometry information from geo-dataframe for a global look-up dataframe.

utils.get_conflict_datapoints_only

Filters out only those polygons where conflict was actually observed in the test-sample.

utils.save_to_csv

Saves an dictionary to csv-file.

utils.save_to_npy

Saves an argument (either dictionary or dataframe) to npy-file.