kub-dashboard
The kub-dashboard is a read-only web interface for browsing and exploring Ktirio Urban Building simulation results and location data.
1. Features
-
Run Catalog: Browse all simulation runs (single and ensemble) with filtering and search
-
Run Details: View artifacts, plots, maps, and sample information for each run
-
Location Explorer: Explore locations without running simulations
-
Building inventory statistics and distributions
-
Weather data analysis (temperature, HDD/CDD, heatmaps)
-
Interactive building maps
-
Preprocessing information
-
2. Installation
The dashboard requires optional dependencies. Install them with:
pip install feelpp-ktirio-urban-building[dashboard]
For weather analysis with NetCDF support, also install:
pip install feelpp-ktirio-urban-building[dashboard,weather]
3. Quick Start
Start the dashboard server:
kub-dashboard serve --cemdb-root /path/to/cemdb
The dashboard will be available at 127.0.0.1:8050
4. Usage
4.2. Commands
4.2.1. serve
Start the dashboard web server.
kub-dashboard serve [OPTIONS]
Options:
| Option | Description |
|---|---|
|
CEMDB root directory (default: |
|
Host to bind to (default: |
|
Port to bind to (default: |
|
Enable debug mode |
4.2.2. index
Build or refresh the run index cache.
kub-dashboard index [OPTIONS]
Options:
| Option | Description |
|---|---|
|
CEMDB root directory |
|
Save index to file (parquet or json) |
|
Force refresh (clear cache) |
5. Environment Variables
| Variable | Default | Description |
|---|---|---|
|
|
Default CEMDB root directory |
|
|
Default host |
|
|
Default port |
|
|
Enable debug mode |
6. REST API Endpoints
The dashboard exposes a REST API for programmatic access:
| Endpoint | Description |
|---|---|
|
Get the run index (cached) |
|
Get run manifest with resolved paths |
|
Get locations list with inventory summary |
|
Get location details |
|
Get weather files and quick stats |
|
Get building inventory statistics |
|
Health check |
7. Pages
7.1. Run Catalog (/)
The main landing page displays a table of all simulation runs with:
-
Location, run type, run ID, status
-
Sample count (for ensemble runs)
-
Run date/time
-
Filters for location, type, and search
Click a row to navigate to the run detail page.
7.2. Run Detail (/run/<location>/<run_type>/<run_id>)
Shows detailed information about a specific run:
-
Summary tab: Run information, timing configuration
-
Artifacts tab: List of output artifacts with paths and checksums
-
Plots tab: Visualizations of KPI summaries, distributions, and timers
-
Map tab: Building locations on an interactive map
-
Samples tab: (Ensemble only) List of ensemble samples
7.3. Locations (/locations)
Browse all available locations showing:
-
Building count, run count
-
Available data (GIS, weather, scenarios, preprocessing)
-
Last modified time
7.4. Location Detail (/location/<name>)
Explore a location without running simulations:
-
Building Inventory tab: Statistics, category distribution, attribute completeness
-
Weather Analysis tab: Temperature stats, HDD/CDD, hourly heatmap, extremes
-
Map tab: Building locations visualization
-
Preprocessing tab: Available partitions and files
8. KPI Playbook and Thresholds
The dashboard renders KPI panels using a registry of KPI specifications. Each spec defines the recommended plots, interpretation hints, and default thresholds.
To add a new KPI:
-
Create a spec in
src/python/feelpp/ktirio/ub/dashboard/kpi/specs/ -
Register it with
register_spec(…) -
Provide the desired views and threshold defaults
Location-specific thresholds can be overridden via:
cemdb/locations/<location>/scenarios/kpi_thresholds.yaml
If no specialized spec is found, the dashboard falls back to a generic KPI panel.
9. Architecture
The dashboard is built with:
-
Dash - Python framework for web applications
-
Dash Bootstrap Components - Bootstrap UI components
-
Flask - Web framework for API routes
-
Plotly - Interactive visualizations
9.1. Manifest-First Design
The dashboard uses a manifest-first approach:
-
Runs are discovered by scanning for
manifest.jsonfiles -
Artifact paths are resolved relative to the run root
-
Heavy datasets (parquet, HDF5) are loaded lazily on demand
-
Results are cached with TTL to balance freshness and performance
10. CEMDB Structure
The dashboard expects the following CEMDB structure:
cemdb/
└── locations/
└── <location>/
└── simulations/
├── single/
│ └── run_*/
│ └── manifest.json
└── ensemble/
└── run_*/
└── manifest.json
11. Troubleshooting
12. Development
Run the dashboard in debug mode for development:
kub-dashboard serve --debug
Run tests:
pytest tests/dashboard/
13. See Also
-
kub-dataset - Dataset management CLI
-
kub-bestest - BESTEST reference case generation
-
kub-event-weather - Historical weather data for events
-
Data Layout - CEMDB directory structure
-
KPI Catalog - Available KPI definitions