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
An interactive UMAP visualization of the MNIST data set.

Code for an interactive UMAP visualization of the MNIST data set. Demo at https://grantcuster.github.io/umap-explorer/. You can read more about the de

grant 70 Dec 27, 2022
Tandem Mass Spectrum Prediction with Graph Transformers

MassFormer This is the original implementation of MassFormer, a graph transformer for small molecule MS/MS prediction. Check out the preprint on arxiv

Röst Lab 13 Oct 27, 2022
With Holoviews, your data visualizes itself.

HoloViews Stop plotting your data - annotate your data and let it visualize itself. HoloViews is an open-source Python library designed to make data a

HoloViz 2.3k Jan 02, 2023
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
The plottify package is makes matplotlib plots more legible

plottify The plottify package is makes matplotlib plots more legible. It's a thin wrapper around matplotlib that automatically adjusts font sizes, sca

Andy Jones 97 Nov 04, 2022
Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly

Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly Problem: 2 peloton users were looking for a way to track their metri

9 Jul 22, 2022
This project is created to visualize the system statistics such as memory usage, CPU usage, memory accessible by process and much more using Kibana Dashboard with Elasticsearch.

System Stats Visualizer This project is created to visualize the system statistics such as memory usage, CPU usage, memory accessible by process and m

Vishal Teotia 5 Feb 06, 2022
Bar Chart of the number of Senators from each party who are up for election in the next three General Elections

Congress-Analysis Bar Chart of the number of Senators from each party who are up for election in the next three General Elections This bar chart shows

11 Oct 26, 2021
HW 2: Visualizing interesting datasets

HW 2: Visualizing interesting datasets Check out the project instructions here! Mean Earnings per Hour for Males and Females My first graph uses data

7 Oct 27, 2021
🗾 Streamlit Component for rendering kepler.gl maps

streamlit-keplergl 🗾 Streamlit Component for rendering kepler.gl maps in a streamlit app. 🎈 Live Demo 🎈 Installation pip install streamlit-keplergl

Christoph Rieke 39 Dec 14, 2022
Altair extension for saving charts in a variety of formats.

Altair Saver This packge provides extensions to Altair for saving charts to a variety of output types. Supported output formats are: .json/.vl.json: V

Altair 85 Dec 09, 2022
📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)

📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)

wq framework 1.2k Jan 01, 2023
Quickly and accurately render even the largest data.

Turn even the largest data into images, accurately Build Status Coverage Latest dev release Latest release Docs Support What is it? Datashader is a da

HoloViz 2.9k Dec 28, 2022
Drug design and development team HackBio internship is a virtual bioinformatics program that introduces students and professional to advanced practical bioinformatics and its applications globally.

-Nyokong. Drug design and development team HackBio internship is a virtual bioinformatics program that introduces students and professional to advance

4 Aug 04, 2022
A little logger for machine learning research

Blinker Blinker provides a fast dispatching system that allows any number of interested parties to subscribe to events, or "signals". Signal receivers

Reinforcement Learning Working Group 27 Dec 03, 2022
Automatization of BoxPlot graph usin Python MatPlotLib and Excel

BoxPlotGraphAutomation Automatization of BoxPlot graph usin Python / Excel. This file is an automation of BoxPlot-Graph using python graph library mat

EricAugustin 1 Feb 07, 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
Pglive - Pglive package adds support for thread-safe live plotting to pyqtgraph

Live pyqtgraph plot Pglive package adds support for thread-safe live plotting to

Martin Domaracký 15 Dec 10, 2022
Python package that generates hardware pinout diagrams as SVG images

PinOut A Python package that generates hardware pinout diagrams as SVG images. The package is designed to be quite flexible and works well for general

336 Dec 20, 2022
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