Lumen provides a framework for visual analytics, which allows users to build data-driven dashboards from a simple yaml specification

Overview

Lumen

Illuminate your data

Build Status Linux/MacOS/Windows Build Status
Coverage codecov
Latest dev release Github tag dev-site
Latest release Github release PyPI version lumen version conda-forge version defaults version
Docs gh-pages site
Support Discourse

Why Lumen?

The Lumen project provides a framework for visual analytics, which allows users to build data-driven dashboards from a simple yaml specification. The power of Lumen comes from the ability to leverage the powerful data intake, data processing and data visualization libraries available in the PyData ecosystem.

  • Data Intake: A flexible system for declaring data sources with strong integration with Intake, allows Lumen to query data from a wide range of sources including many file formats such as CSV or Parquet but also SQL and many others.
  • Data Proccessing: Internally Lumen stores data as DataFrame objects, allowing users to leverage familiar APIs for filtering and transforming data using Pandas while also providing the ability to scale these transformations out to a cluster thanks to Dask.
  • Data Visualization: Since Lumen is built on Panel all the most popular plotting libraries and many other components such as powerful datagrids and BI indicators are supported.

The core strengths of Lumen include:

  • Flexibility: The design of Lumen allows flexibly combining data intake, data processing and data visualization into a simple declarative pipeline.
  • Extensibility: Every part of Lumen is designed to be extended letting you define custom Source, Filter, Transform and View components.
  • Scalability: Lumen is designed with performance in mind and supports scalable Dask DataFrames out of the box, letting you scale to datasets larger than memory or even scale out to a cluster.
  • Security: Lumen ships with a wide range of OAuth providers out of the box, making it a breeze to add authentication to your applications.

Examples

London Bike Points
NYC Taxi
Palmer Penguins
Precipitation
Seattle Weather

Getting started

Lumen works with Python 3 and above on Linux, Windows, or Mac. The recommended way to install Lumen is using the conda command provided by Anaconda or Miniconda:

conda install -c pyviz lumen

or using PyPI:

pip install lumen

Once installed you will be able to start a Lumen server by running:

lumen serve dashboard.yaml --show

This will open a browser serving the application or dashboard declared by your yaml file in a browser window. During development it is very helpful to use the --autoreload flag, which will automatically refresh and update the application in your browser window, whenever you make an edit to the dashboard yaml specification. In this way you can quickly iterate on your dashboard.

Try it out! Click on one of the examples below, copy the yaml specification and launch your first Lumen application.

Comments
  • Renaming Target

    Renaming Target

    With the Lumen 0.5.0 release finally coming up we've got one last chance to fix naming mistakes in Lumen. One major sticking point has always been the Target component. This name came about as a natural pair to the data Source, where data would flow from source to target. However, even then it never really made sense and since there's been quite a lot of refactoring that more cleanly separates views, filters and transforms (which used to be grouped together on a target).

    This means that now a Target is defined as a component consisting of one or more view components that consume data from a pipeline and render the views into a layout. Therefore I suggest I finally pull the trigger and simply rename Target -> Layout. Alternatively I could also consider LayoutGroup as the name of the Python class but keep the YAML key as layouts.

    I'd like to collect everyone's opinion so please chime in @Hoxbro, @maximlt, @jbednar, @droumis, @jlstevens and @eli-pinkus.

    opened by philippjfr 9
  • Allow launching UI from CLI

    Allow launching UI from CLI

    Adds a lumen builder CLI command that launches a Bokeh/Panel server running the builder.

    • [x] Add tests
    • [x] Decide on naming of builder, is it ui, gui, or builder?
    opened by philippjfr 8
  • Create how to on custom local components

    Create how to on custom local components

    • [x] import a component by its module path, e.g. you can do my_library.some_module.MyTransform

    • Also made the install page more explicit about python installation after a good talk with @Hoxbro.

    • Also included some minor fixes like syntax highlighting and a couple of links

    127 0 0 1_5500_docs__build_html_how_to_local_components html (1)

    opened by droumis 5
  • Example for how to use variables

    Example for how to use variables

    It started with an example of how to use variables but failed with a verification error. This is fixed with 488ee9c5d935788602d1de50f4f8f93032040ee5.

    Though, I still get this warning WARNING:param.Source: Resolving nested variable references currently not supported. which I think is why I get no automatic update when changing the variable input.

    Maybe I'm doing something wrong with the specification.

    variables:
      ticker:
        type: widget
        kind: TextInput
        default: https://raw.githubusercontent.com/matplotlib/sample_data/master/aapl.csv
    
    sources:
      stock_data:
        type: file
        tables:
          ticker: $variables.ticker
    
    targets:
    - title: Table
      source: stock_data
      views:
        - type: table
          table: ticker
    
    opened by Hoxbro 5
  • Added suggestion for mistyped/wrong parameters

    Added suggestion for mistyped/wrong parameters

    It can be hard to know if something is transform or transforms. I have tried to take account of this by using difflib to come up with suggestions if parameters are mistyped/wrong.

    I have chosen to raise an error when an input parameter does not match the class parameters. My reasoning for this is that the error usually will arrive later, making it harder to debug.

    I have used the following example to see if I can provoke an error by adding or removing an s.

    from lumen.pipeline import Pipeline
    
    data_url = 'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv'
    
    pipeline = Pipeline.from_spec({
        'source': {
            'type': 'file',
            'table': {
                'penguins': data_url
            }
        },
        'filters': [
            {'type': 'widget', 'field': 'species'},
            {'type': 'widget', 'field': 'island'},
            {'type': 'widget', 'field': 'sex'},
            {'type': 'widget', 'field': 'year'}
        ],
        'transforms': [
            {'type': 'aggregate', 'method': 'mean', 'by': ['species', 'sex', 'year']}
        ]
    })
    

    The example will raise an error (try to find out what raises it).

    Error message

    Before:

    image

    After:

    image

    opened by Hoxbro 5
  • ModuleNotFoundError: No module named 'panel.pane.perspective' when running lumen

    ModuleNotFoundError: No module named 'panel.pane.perspective' when running lumen

    I'm having trouble with an error message "ModuleNotFoundError: No module named 'panel.pane.perspective' " when attempting to launch lumen https://lumen.holoviz.org/index.html. error panel

    I have panel 0.11.0a8 installed through conda with pyviz/label/dev. Any insights please?

    opened by eschares 5
  • Add ability to generate specification

    Add ability to generate specification

    All components currently implement .from_spec methods which instantiate the component from the declarative specification. We want to be able to do the reverse and construct a specification from component instances by implementing .to_spec methods.

    For all the basic component types this should be fairly straightforward, e.g. a Source, View or Filter simply has to serialize it's parameters and its type. It becomes a little more difficult if we are dealing with references and variables because View.pipeline should generally not inline and serialize the entire Pipeline specification.

    def to_spec(self, allow_refs=True):
        """
        Converts the component to a declarative specification that can be serialized to YAML.
        Whether sub-component definitions are inlined depends on the type of component,
        e.g. Filter and Transform components will be inlined on a Pipeline but a Pipeline will
        not be inlined on a View.
    
        Arguments
        -----------
        allow_refs: boolean
          Whether to allow exporting references or to inline the materialized values.
    
        Returns
        --------
        Declarative specification containing the definition of this component.
        """
    

    Goals

    • We can serialize all component types individually but also a whole Dashboard or Pipeline definition.
    • We can handle references and variables
    • The exported specification faithfully roundtrips to an identical instance, i.e. we can go from instance -> specification -> instance and end up with an identical copy.
    opened by philippjfr 4
  • Various improvements to the DateFilter widget

    Various improvements to the DateFilter widget

    Includes various fixes to the DateFilter:

    • On picker mode cast start/end/value to datetime.date
    • Override the value Parameter by a CalendarDate or DateRange Parameters (let me know if there's a better way, that looks hacky!)
    • Bidirectionally link the widget to the value Parameter, this allows URL query parameter changes to be synced back to the widget.

    This is work in progress and requires other changes both in Param and Panel. I've also noticed accumulating calls in get_data on picker mode so there's something wrong there.

    opened by maximlt 4
  • Display selected custom view parameters as widgets

    Display selected custom view parameters as widgets

    This issue summarizes some discussion I've had with @philippjfr and @jbednar about how best to generate widgets for custom view parameters. Here are the three options we talked about:

    1. Use param precedence according to the usual panel semantics when converting parameters to widgets.
    2. Declaring constant=True for the parameters that shouldn't be shown as widgets.
    3. Explicitly list which parameters should become widgets (by name) in the yaml declaration.

    Personally, I like option 3 the most as it is the most explicit and lets you easily set the widget order in the yaml. Then I like option 1 as it is consistent with how panel displays widgets for parameters and I like option 3 the least.

    opened by jlstevens 4
  • Gracefully Handle Multiple Extensions or Assert an Error Message

    Gracefully Handle Multiple Extensions or Assert an Error Message

    If different views are used (for example Perspective with Holoviews), the dashboard doesn’t build, as two separate extensions are needed.

    It would be nice if the various extensions could be gracefully handled, if not an assertion error on crossing multiple extensions would be nice for users to understand the error instead of the dashboard not displaying anything.

    opened by tlmille2 4
  • Add functionality to manually apply updates

    Add functionality to manually apply updates

    Adds a manual_update option to the global config, each Target and Pipeline to be able to manually update the data using a button click. This is useful when applying a filter or transform is very slow.

    apply_update

    • [x] Add tests
    • [x] Decide on naming of manual_update parameter
    opened by philippjfr 3
  • Make

    Make "non-standard" keywords in methods keyword-only arguments

    Some methods in Lumen need different inputs depending on the class it is called from. An example of this could be from_spec, the example below. I would like to see these non-standard keywords being keyword-only arguments, so passing in the wrong arguments is impossible.

    https://github.com/holoviz/lumen/blob/95809959b18eb31d069c084f4fabdefbc2cfb05e/lumen/views/base.py#L267-L269

    https://github.com/holoviz/lumen/blob/95809959b18eb31d069c084f4fabdefbc2cfb05e/lumen/dashboard.py#L299

    opened by Hoxbro 0
  • Host CSV dataset ourself

    Host CSV dataset ourself

    Currently, the penguins' dataset (https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv) is used extensively in the new documentation.

    It should be added to this repo or an S3 (which we control).

    opened by Hoxbro 2
  • Added threadpool to WebsiteSource

    Added threadpool to WebsiteSource

    I just thought it made a lot of sense to check the websites asynchronously.

    I have set a 10 seconds timeout, which could be removed again or given as a parameter.

    opened by Hoxbro 1
  • Make it possible to programmatically unselect/reset widget filter in a Notebook Pipeline

    Make it possible to programmatically unselect/reset widget filter in a Notebook Pipeline

    Once a widget filter has been selected in a Lumen Pipeline within a notebook, there is no way to programmatically unselect or reset the filter.

    ALL software version info

    lumen: 0.5.0a64

    Description of expected behavior and the observed behavior

    A way to programmatically unselect options in a widget filter. @Hoxbro suggested: pipeline.reset_filters()

    Complete, minimal, self-contained example code that reproduces the issue

    import lumen
    from lumen.views import Table
    from lumen.pipeline import Pipeline
    import panel as pn
    
    pn.extension('tabulator', template='fast')
    
    data_url = 'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv'
    
    pipeline = Pipeline.from_spec({
        'source': {
            'type': 'file',
            'tables': {
                'penguins': data_url
            }
        },
        'filters': [
            {'type': 'widget', 'field': 'species'},
            {'type': 'widget', 'field': 'island'},
            {'type': 'widget', 'field': 'sex'},
            {'type': 'widget', 'field': 'year'}
        ],
        'transforms': [
            {'type': 'aggregate', 'method': 'mean', 'by': ['sex', 'year']}
        ]
    })
    
    pn.Row(pipeline.control_panel, Table(pipeline=pipeline, pagination='remote'))
    

    Screenshots or screencasts of the bug in action

    Screenshot 2022-09-21 at 17 33 02 enhancement 
    opened by droumis 4
  • Add more Sources tests

    Add more Sources tests

    Changes addressed in this PR:

    • split catalog to different files to test IntakeSource and IntakeSQLSource separately
    • move tests for FileSource to a new file
    • add tests to JSONSource
    • add tests to JoinedSource
    • move common testing logics to a utils file
    • test Source.from_spec when loading from source in state.sources

    Bug fixes:

    • JSONSource._resolve_template_vars(): convert template to string to make sure re.findall(template) work properly. Currently, a local file path will be read as a pathlib.PosixPath object: https://github.com/holoviz/lumen/blob/master/lumen/sources/base.py#L528
    opened by thuydotm 1
Releases(v0.5.0)
  • v0.4.1(Apr 23, 2021)

  • v0.4.0(Apr 23, 2021)

    (Relatively) major release:

    New features:

    • Handle errors while rendering dashboard (#131)
    • Defer rendering of dashboard contents until page is rendered (#123)
    • Add Melt transform (#122)
    • Implement DerivedSource with ability to filter and transform existing sources (#121)
    • Add caching to DerivedSource
    • Use Datetime pickers (#119)

    Bugfixes and minor improvements:

    • Clear original source cache on DerivedSource
    • Allow providing custom Download labels (#130)
    • Fix handling of range filters (#129)
    • Unpack panes correctly on Views (#128)
    • Fixed dask kwarg on JSONSource (#127)
    • Pin python3.8 in conda build env
    • Ensure None on widget filter is handled (#120)
    • Improve docs (#112)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Apr 23, 2021)

  • v0.3.1(Apr 23, 2021)

    Minor release:

    • Updated dependencies
    • Add Download options to targets (#110)
    • Make editable a configurable option (#109)
    • Improve docs (#107, #108)
    • Gracefully handle missing dask and parquet libraries (#105)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Mar 17, 2021)

  • v0.1.0(Oct 15, 2020)

    This is the first public release of the Lumen project, which provides a framework to build dashboards from a simple yaml specification. It is designed to query information from any source, filter it in various ways and then provide views of that information, which can be anything from a simply indicator to a table or plot.

    For now the Lumen project is available only from conda and can be installed with conda install -c pyviz/label/dev lumen.

    Source code(tar.gz)
    Source code(zip)
Owner
HoloViz
High-level tools to simplify visualization in Python
HoloViz
Simple python implementation with matplotlib to manually fit MIST isochrones to Gaia DR2 color-magnitude diagrams

Simple python implementation with matplotlib to manually fit MIST isochrones to Gaia DR2 color-magnitude diagrams

Karl Jaehnig 7 Oct 22, 2022
Visualization Library

CamViz Overview // Installation // Demos // License Overview CamViz is a visualization library developed by the TRI-ML team with the goal of providing

Toyota Research Institute - Machine Learning 67 Nov 24, 2022
Data Visualizations for the #30DayChartChallenge

The #30DayChartChallenge This repository contains all the charts made for the #30DayChartChallenge during the month of April. This project aims to exp

Isaac Arroyo 7 Sep 20, 2022
These data visualizations were created as homework for my CS40 class. I hope you enjoy!

Data Visualizations These data visualizations were created as homework for my CS40 class. I hope you enjoy! Nobel Laureates by their Country of Birth

9 Sep 02, 2022
Displaying plot of death rates from past years in Poland. Data source from these years is in readme

Average-Death-Rate Displaying plot of death rates from past years in Poland The goal collect the data from a CSV file count the ADR (Average Death Rat

Oliwier Szymański 0 Sep 12, 2021
Lumen provides a framework for visual analytics, which allows users to build data-driven dashboards from a simple yaml specification

Lumen project provides a framework for visual analytics, which allows users to build data-driven dashboards from a simple yaml specification

HoloViz 120 Jan 04, 2023
Frbmclust - Clusterize FRB profiles using hierarchical clustering, plot corresponding parameters distributions

frbmclust Getting Started Clusterize FRB profiles using hierarchical clustering,

3 May 06, 2022
3D rendered visualization of the austrian monuments registry

Visualization of the Austrian Monuments Visualization of the monument landscape of the austrian monuments registry (Bundesdenkmalamt Denkmalverzeichni

Nikolai Janakiev 3 Oct 24, 2019
Visualization of numerical optimization algorithms

Visualization of numerical optimization algorithms

Zhengxia Zou 46 Dec 01, 2022
Rick and Morty Data Visualization with python

Rick and Morty Data Visualization For this project I looked at data for the TV show Rick and Morty Number of Episodes at a Certain Location Here is th

7 Aug 29, 2022
Simple addon for snapping active object to mesh ground

Snap to Ground Simple addon for snapping active object to mesh ground How to install: install the Python file as an addon use shortcut "D" in 3D view

Iyad Ahmed 12 Nov 07, 2022
CPG represent!

CoolPandasGroup CPG represent! Arianna Brandon Enne Luan Tracie Project requirements: use Pandas to clean and format datasets use Jupyter Notebook to

Enne 3 Feb 07, 2022
Yata is a fast, simple and easy Data Visulaization tool, running on python dash

Yata is a fast, simple and easy Data Visulaization tool, running on python dash. The main goal of Yata is to provide a easy way for persons with little programming knowledge to visualize their data e

Cybercreek 3 Jun 28, 2021
Create a table with row explanations, column headers, using matplotlib

Create a table with row explanations, column headers, using matplotlib. Intended usage was a small table containing a custom heatmap.

4 Aug 14, 2022
Fractals plotted on MatPlotLib in Python.

About The Project Learning more about fractals through the process of visualization. Built With Matplotlib Numpy License This project is licensed unde

Akeel Ather Medina 2 Aug 30, 2022
Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects

carcassonne_tools Graphical display tools, to help students debug their class implementations in the Carcassonne family of projects NOTE NOTE NOTE The

1 Nov 08, 2021
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

146 Nov 12, 2022
Pebble is a stat's visualization tool, this will provide a skeleton to develop a monitoring tool.

Pebble is a stat's visualization tool, this will provide a skeleton to develop a monitoring tool.

Aravind Kumar G 2 Nov 17, 2021
Leyna's Visualizing Data With Python

Leyna's Visualizing Data Below is information on the number of bilingual students in three school districts in Massachusetts. You will also find infor

11 Oct 28, 2021
Custom ROI in Computer Vision Applications

EasyROI Helper library for drawing ROI in Computer Vision Applications Table of Contents EasyROI Table of Contents About The Project Tech Stack File S

43 Dec 09, 2022