reVeal.grid.run_weighted_scoring#

run_weighted_scoring(df, attributes)[source]#

Calculated weighted score for the input dataframe based on the specified attributes and corresponding weights.

Parameters:
  • df (geopandas.GeoDataFrame) – Input grid geodataframe

  • attributes (List[reVeal.config.score_weighted.Attribute]) – List of Attribute models specifying the attribute columns and corresponding weights to use.

Returns:

pandas.DataFrame – Returns a pandas DataFrame with a “value” column, representing the output weighted score derived from the specified inputs. The index from the input df is also included.

Raises:

ValueError – A ValueError will be raised if the input attribute weights do not sum to 1.