Create a measure from a dictionary of attributes and a type string.
Parameters
Name
Type
Description
Default
attrs
dict[str, Any]
Dictionary of attributes for the measure.
required
type
str
Type of measure to create.
None
Returns
Name
Type
Description
IMeasure
Measure object.
delete_measure
api.measures.delete_measure(name)
Delete an event from the database.
Parameters
Name
Type
Description
Default
name
str
The name of the event to delete.
required
Raises
Name
Type
Description
ValueError
If the event does not exist.
edit_measure
api.measures.edit_measure(measure)
Edit an event object in the database.
Parameters
Name
Type
Description
Default
measure
IMeasure
The measure object to edit.
required
Raises
Name
Type
Description
ValueError
If the event object does not exist.
get_green_infra_table
api.measures.get_green_infra_table(measure_type)
Return a table with different types of green infrastructure measures and their infiltration depths.
Parameters
Name
Type
Description
Default
measure_type
str
The type of green infrastructure measure.
required
Returns
Name
Type
Description
pd.DataFrame
A table with different types of green infrastructure measures and their infiltration depths.
get_measure
api.measures.get_measure(name)
Get a measure from the database by name.
Parameters
Name
Type
Description
Default
name
str
The name of the measure to retrieve.
required
Returns
Name
Type
Description
IMeasure
The measure object with the given name.
Raises
Name
Type
Description
ValueError
If the measure with the given name does not exist.
get_measures
api.measures.get_measures()
Get all measures from the database.
Returns
Name
Type
Description
dict[str, Any]
A dictionary containing all measures. Includes keys: ‘name’, ‘description’, ‘path’, ‘last_modification_date’, ‘objects’ Each value is a list of the corresponding attribute for each measure.