1.1. copro.pipeline.create_XY

copro.pipeline.create_XY(config, out_dir, root_dir, polygon_gdf, conflict_gdf)[source]

Top-level function to create the X-array and Y-array. If the XY-data was pre-computed and specified in cfg-file, the data is loaded. If not, variable values and conflict data are read from file and stored in array. The resulting array is by default saved as npy-format to file.

Parameters
  • config (ConfigParser-object) – object containing the parsed configuration-settings of the model.

  • out_dir (str) – path to output folder.

  • root_dir (str) – path to location of cfg-file.

  • polygon_gdf (geo-dataframe) – geo-dataframe containing the selected polygons.

  • conflict_gdf (geo-dataframe) – geo-dataframe containing the selected conflicts.

Returns

X-array containing variable values. array: Y-array containing conflict data.

Return type

array