LowerZoneSystemInfo#

class caf.space.inputs.LowerZoneSystemInfo(*, name, shapefile, id_col, weight_data=None, data_col, weight_id_col=None, weight_data_year)[source]#

Bases: ZoneSystemInfo

Lower level zone system input data for ZoneTranslationInputs.

Inherits from ZoneSystemInfo.

Parameters:
  • weight_data (Path, optional) – File path to the weighting data for the lower zone system. This should be saved as a csv, and only needs two columns (an ID column and a column of weighting data). If there is weighting data already in the shapefile, this is not needed.

  • data_col (str) – The name of the column in the weighting data csv containing the weight data.

  • weight_id_col (str) – The name of the columns in the weighting data containing the zone ids. This will be used to join the weighting data to the lower zoning, so the IDs must match, but the names of the ID columns may be different. Required if weight_data is provided.

  • weight_data_year (int) – The year the weighting data comes from. This is used for writing files to the cache and is important for logging. If you don’t know this you should consider whether your weighting data is appropriate.

  • name (str)

  • shapefile (Path)

  • id_col (str)

Attributes

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

weight_data

data_col

weight_id_col

weight_data_year

name

shapefile

id_col

Methods

Attributes Documentation

model_computed_fields = {}#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra#

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields = {'data_col': FieldInfo(annotation=str, required=True), 'id_col': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'shapefile': FieldInfo(annotation=Path, required=True), 'weight_data': FieldInfo(annotation=Union[Path, NoneType], required=False, default=None), 'weight_data_year': FieldInfo(annotation=int, required=True), 'weight_id_col': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
model_fields_set#

Returns the set of fields that have been explicitly set on this model instance.

Returns:
A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

weight_data: Path | None[source]#
data_col: str[source]#
weight_id_col: str | None[source]#
weight_data_year: int[source]#
name: str[source]#
shapefile: Path[source]#
id_col: str[source]#