aequilibrae.utils.simwrapper.simwrapper_panel#
Classes
|
Panel for rendering interactive AequilibraE network maps. |
|
Panel for rendering interactive AequilibraE network maps with optional results styling. |
|
Panel wrapper for Vega/Vega-Lite specifications. |
|
Base class for all SimWrapper panels. |
|
Panel for displaying text content. |
|
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
- 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 valuesand 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_tableis 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 (seesql_filter (
str, Optional): SQL filter expression applied to thelinkslayer- colour_metric (
- Notes
The panel will register an extraDatabases entry named
resultsonly whenresults_tableis specified.Ranges are computed from percentiles (5th/95th) and rounded via
aequilibrae.utils.simwrapper.simwrapper_utils.pretty_round().
Examples
Read a metric from the project
linkstableRead a metric from a results table and join it to
links
- add_layer(name, layer_dict)#
Adds a layer definition under the given name
- 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
- 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.
- 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
- 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) – Whetherdatais a file reference**height** (
int, optional) – Panel height**width** (
int, optional) – Panel width
- 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** (
strorlist) – CSV path or inline dataset**height** (
int, optional) – Panel height**width** (
int, optional) – Panel width