Data Visualization and UI components for interactive data exploration
dvue is a Python package that provides reusable UI components for creating interactive data visualization dashboards using Panel, HoloViews, and GeoViews. It's designed to make it easy to build rich, interactive web applications for exploring time series catalogs represented as tabular data where each row corresponds to a data series (e.g., monitoring stations). If the catalog contains geospatial information (latitude/longitude), dvue can integrate maps for spatial selection.
- 🗺️ Interactive Map Integration: Seamlessly integrate maps with data tables that contain gis information using GeoViews and Cartopy
- 📊 Time Series Visualization: Built-in support for time series data multi-line plotting
- 📋 Rich Table Interface: Interactive tables with sorting, filtering, and pagination using Panel's Tabulator
- 🔗 Bidirectional Selection: Click on map features to select table rows and vice versa
- 🎨 Customizable Styling: Configure colors, markers, and plot options
- 📥 Data Export: Download data and catalogs as CSV files
- 🔗 Permalink Support: Generate shareable links to specific views
- 🎯 Fullscreen Mode: Expand visualizations to fullscreen for detailed analysis
pip install dvuegit clone https://github.com/CADWRDeltaModeling/dvue.git
cd dvue
pip install -e .For development:
pip install dvue[dev]The easiest way to get started is to explore the working examples in the examples/ directory:
A simple example showing time series visualization without geographic components:
panel serve examples/ex_basic_tsdataui.py --showSee examples/ex_basic_tsdataui.py for the complete implementation. This example demonstrates:
- Creating a data catalog with station information
- Generating synthetic time series data
- Implementing a custom
TimeSeriesDataUIManager - Interactive table selection and plotting
A complete example with geographic features and interactive map:
panel serve examples/ex_tsdataui.py --showSee examples/ex_tsdataui.py for the complete implementation. This example shows:
- GeoDataFrame integration with coordinates
- Interactive map with station locations
- Advanced time series plotting with multiple variables
- Bidirectional selection between map and table
After installing dvue, the dvue command is available on your PATH.
dvue ui [--plugin MODULE]... [--port PORT] [--desktop] [FILES...]
Launches a RegistryUIManager window pre-loaded with FILES. Omit FILES to
start empty and add files via drag-and-drop.
| Option | Description |
|---|---|
--plugin MODULE |
Optional explicit module import before launch (may be repeated). Useful for local/dev plugins. Installed entry-point plugins are auto-loaded. |
--port PORT |
TCP port for the Panel server. 0 (default) picks a free port automatically. |
--desktop |
Open in a native OS window via pywebview instead of a browser tab. Requires pip install pywebview. |
Examples
# Drag-and-drop DSM2 HDF5 tidefiles and DSS output files
dvue ui --desktop
# Pre-load specific files; mix .h5 and .dss freely
dvue ui run.h5 hist_qual.dss hist_hydro.dss
# Combined DSM2 input + output viewer from an echo .inp file
dvue ui output/run_hydro_echo.inp --desktop
# Per-file reader override when multiple readers support the same extension
dvue ui dsm2_dss:my_dsm2_output.dss dss:not_dsm2.dss
# Multiple plugin packages (entry points + optional explicit module)
dvue ui --plugin schismviz.readers output.staout run.h5
# Browser mode on a fixed port
dvue ui --port 5007 run.h5ReaderRegistry (in dvue.registry) is a class-level dict mapping a
ref_type key and file extension list to a reader class. Any installed
package can register its readers via setuptools entry points:
# pyproject.toml
[project.entry-points."dvue.plugins"]
dsm2ui = "dsm2ui.readers:register_readers"At launch, dvue ui auto-loads all dvue.plugins entry points and calls
their registration functions. --plugin MODULE is still supported for
development/local modules that are not installed as entry points.
When multiple readers match the same extension, use per-file override syntax:
dvue ui dsm2_dss:my_dsm2.dss dss:not_dsm2.dssref_type:path forces that file to use the specified reader key.
| Entry-point plugin | File types handled | Equivalent CLI shortcut |
|---|---|---|
dsm2ui |
.h5 / .hdf5 (tidefiles), .dss (DSM2 output channels), .inp (echo files), plus dss generic reader key |
dsm2ui ui output / dsm2ui ui tide / dsm2ui ui echo / dsm2ui ui dss |
Extension conflict note:
dsm2ui.dsm2uiregisters.dssfor DSM2 output channels only (filters toFLOW,STAGE,EC, etc.).dsm2ui.dssui.dss_registryreads all C-parts. Use explicit per-file override (dsm2_dss:path.dssordss:path.dss) when you need both in one session.
dvue diagnose
dvue diagnose -vShows entry-point discovery, plugin loading results, registered readers, extension mappings, and environment details. Use it to troubleshoot "no registered reader" and plugin import problems.
dvue show-versionBase class for creating custom data visualization UIs. Provides:
- Interactive table with selection support
- Action buttons (Plot, Download, Permalink)
- Map integration for geospatial data
- Progress indicators
- Customizable widgets
Specialized manager for time series data with features like:
- Multi-station plotting with customizable colors and line styles
- Date range selection
- Data filtering (e.g., Lanczos filter)
- Aggregation options (daily, monthly, yearly averages)
- Overlay capabilities for comparing multiple datasets
- Interactive catalog table with row selection
- Dynamic plot generation based on selections
Pre-built action handlers:
PlotAction: Generate plots from selected dataDownloadDataAction: Export selected data to CSVDownloadDataCatalogAction: Export full catalog to CSVPermalinkAction: Create shareable URLs
MathDataReference lets you define derived series as Python expressions evaluated over other catalog entries — with full NumPy support and a built-in interactive editor. See README-mathref.md for the full guide including YAML format, the in-UI editor, load/save workflow, and code examples.
Component for adding fullscreen capability to any Panel object.
- pandas: Data manipulation
- geopandas: Geospatial data support
- panel: Interactive dashboards
- holoviews: Declarative visualization
- hvplot: High-level plotting API
- geoviews: Geographic plotting
- bokeh: Interactive visualization backend
- param: Parameterized objects
- cartopy: Cartographic projections
- colorcet: Perceptually uniform colormaps
git clone https://github.com/CADWRDeltaModeling/dvue.git
cd dvue
pip install -e ".[dev]"pytestblack .
isort .
flake8 .The examples/ directory contains complete working examples:
-
ex_basic_tsdataui.py- Basic time series visualization without geographic features- Simple data catalog with stations
- Synthetic time series generation
- Interactive table and plotting
- Good starting point for learning the framework
-
ex_tsdataui.py- Advanced example with full features- GeoDataFrame integration
- Interactive map with station locations
- Multiple variables and intervals
- Bidirectional map/table selection
- Math Reference editor with YAML load/save
- Complete implementation reference
See README-mathref.md for the full Math Reference guide.
Run any example with:
panel serve examples/<example_name>.py --showMIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
California Department of Water Resources - Delta Modeling Section
This package was originally part of the pydelmod package and has been extracted into a standalone library for broader use.