Measure

objects.Measure()

The expected variables and data types of attributes common to all measures.

A measure is a collection of attributes that can be applied to a model.

Attributes

name : str

Name of the measure.

description : str

Description of the measure.

type : MeasureType

Type of measure. Should be one of the MeasureType enum values.

selection_type : SelectionType

Type of selection. Should be one of the SelectionType enum values.

polygon_file : (str, Optional)

Path to a polygon file, either absolute or relative to the measure’s toml path in the database.

aggregation_area_name : (str, Optional)

Name of the aggregation area. Required if selection_type is ‘aggregation_area’.

aggregation_area_type : (str, Optional)

Type of aggregation area. Required if selection_type is ‘aggregation_area’.

Methods

Name Description
load_file Load the measure from a file.
serialize_polygon_file Serialize the polygon_file attribute to a string of only the file name.

load_file

objects.Measure.load_file(file_path: Path | str | os.PathLike)

Load the measure from a file.

Parameters

filepath : Path | str | os.PathLike

Path to the file to load the measure from.

Returns

: Measure

The loaded measure object.

serialize_polygon_file

objects.Measure.serialize_polygon_file(value: Optional[str])

Serialize the polygon_file attribute to a string of only the file name.

Back to top