SviModel
database_builder.SviModel()Model for Social Vulnerability Index (SVI) configuration.
Attributes
classes : list[str], default=["Low", "High"]-
List of vulnerability class names.
colors : list[str], default=["#D5DEE1", "#88A2AA"]-
List of colors corresponding to each vulnerability class.
thresholds : list[float], default=[0.7]-
List of threshold values for vulnerability classification.
Methods
| Name | Description |
|---|---|
| validate_colors_length | Validate that colors list length matches classes list length. |
| validate_thresholds_length | Validate that thresholds list length is one less than classes list length. |
validate_colors_length
database_builder.SviModel.validate_colors_length(colors, info)Validate that colors list length matches classes list length.
Parameters
Returns
Raises
: ValueError-
If colors length doesn’t match classes length.
validate_thresholds_length
database_builder.SviModel.validate_thresholds_length(thresholds, info)Validate that thresholds list length is one less than classes list length.
Parameters
Returns
Raises
: ValueError-
If thresholds length is not one less than classes length.