aequilibrae.utils.simwrapper.simwrapper_panel#

Classes

AequilibraEMapPanel(title[, database, ...])

Panel for rendering interactive AequilibraE network maps.

AequilibraEResultsMapPanel(title[, project, ...])

Panel for rendering interactive AequilibraE network maps with optional results styling.

ConvergencePanel(title, config[, height, width])

Panel wrapper for Vega/Vega-Lite specifications.

SimwrapperPanel(type, title[, height, width])

Base class for all SimWrapper panels.

TextPanel(title, data[, is_file, height, width])

Panel for displaying text content.

TilePanel(title, dataset[, height, width, ...])

Panel used to display tabular summary statistics.

class aequilibrae.utils.simwrapper.simwrapper_panel.AequilibraEMapPanel(title, database='project_database.sqlite', height=None, width=None, center=None, zoom=None)[source]#

Panel for rendering interactive AequilibraE network maps.

Parameters:
  • **title** (str) – Title

  • **database** (str, optional) – Project database

  • **height** (int, optional) – Panel height

  • **width** (int, optional) – Panel width

  • **center** (list, optional) – Map center coordinates

  • **zoom** (int, optional) – Initial zoom level

add_layer(name, layer_dict)[source]#

Adds a layer definition under the given name

set_defaults(defaults_dict=None)[source]#

Sets default visuals for map layers

set_extra_databases(database_dict)[source]#

Registers extra databases used by map

set_legend(legend_list)[source]#

Sets legend configuration for the map

to_dict()[source]#

Returns dictionary representation of the panel

class aequilibrae.utils.simwrapper.simwrapper_panel.AequilibraEResultsMapPanel(title, project=None, project_database='project_database.sqlite', results_database='results_database.sqlite', colour_metric=None, width_metric=None, height=None, width=None, center=None, zoom=None, palette='Temps', results_table=None, sql_filter=None)[source]#

Panel for rendering interactive AequilibraE network maps with optional results styling.

Behavior - When results_table is provided the panel LEFT JOINs the map links layer with that

table from an extra results database and reads metric values from the joined table.

  • When results_table is omitted the panel reads metrics directly from the project’s links table in project_database.sqlite (no separate results DB/table required).

  • Data ranges used for styling are computed from the lower/upper percentiles (default 5th/95th) and pretty-rounded with pretty_round.

  • If a metric or the corresponding table/column is missing the panel falls back to the default data range [0, 1] (graceful fallback).

Arguments:

title (str): panel title shown in the dashboard project (Project, Optional): open Project instance used to read metric values

and compute percentile ranges; if not provided ranges default to [0, 1]

project_database (str): main project database filename (default: project_database.sqlite) results_database (str): results database filename (default: results_database.sqlite);

used only when results_table is provided

colour_metric (str, Optional): column name used to style line colour. Look-up order:

results table (if provided) → project links table

width_metric (str, Optional): column name used to style line width (same lookup rules) results_table (str, Optional): name of the table in the results DB to join to links.

When omitted, metrics are read from the project links table instead.

palette (str): colour palette for colour_metric scaling (default: Temps) height, width, center, zoom: visual/layout parameters (see

sql_filter (str, Optional): SQL filter expression applied to the links layer

Notes

Examples

  • Read a metric from the project links table

  • Read a metric from a results table and join it to links

add_layer(name, layer_dict)#

Adds a layer definition under the given name

build_legend(colour_range, width_range)[source]#
set_colour_styling(data_range)[source]#
set_defaults(defaults_dict=None)#

Sets default visuals for map layers

set_extra_databases(database_dict)#

Registers extra databases used by map

set_legend(legend_list)#

Sets legend configuration for the map

set_width_styling(data_range)[source]#
to_dict()#

Returns dictionary representation of the panel

class aequilibrae.utils.simwrapper.simwrapper_panel.ConvergencePanel(title, config, height=None, width=None)[source]#

Panel wrapper for Vega/Vega-Lite specifications.

to_dict()[source]#

Returns dictionary representation of the panel.

class aequilibrae.utils.simwrapper.simwrapper_panel.SimwrapperPanel(type, title, height=None, width=None)[source]#

Base class for all SimWrapper panels.

Parameters:
  • **type** (str) – Panel type

  • **title** (str) – Title to show in the dashboard

  • **height** (int, optional) – Panel height

  • **width** (int, optional) – Panel width

to_dict()[source]#

Returns dictionary representation of the panel.

class aequilibrae.utils.simwrapper.simwrapper_panel.TextPanel(title, data, is_file=False, height=None, width=None)[source]#

Panel for displaying text content.

Parameters:
  • **title** (str) – Title

  • **data** (str) – Text content or file path

  • **is_file** (bool, optional) – Whether data is a file reference

  • **height** (int, optional) – Panel height

  • **width** (int, optional) – Panel width

to_dict()[source]#

Returns dictionary representation of the panel.

class aequilibrae.utils.simwrapper.simwrapper_panel.TilePanel(title, dataset, height=None, width=None, colors=None)[source]#

Panel used to display tabular summary statistics.

Parameters:
  • **title** (str) – Title

  • **dataset** (str or list) – CSV path or inline dataset

  • **height** (int, optional) – Panel height

  • **width** (int, optional) – Panel width

to_dict()[source]#

Returns dictionary representation of the panel.