Giter Club home page Giter Club logo

elvis's Introduction

Elvis

  • Combining holoviz panel with the golden-panel layout.
  • Author: Leon van Kouwen, [email protected]
  • Last updated: 28-5-2020
  • Version 0.1.0

About elvis

Elvis is primarily intended to enable using all the features of panel in combination with the golden-layout, in a way that it can be setup entirely from simple python commands. This enables a nice looking and flexible dashboard being setup very quickly, while having all the options of python at ones disposal.

In addition, this package is a collection of somewhat arbitrary additions to panel. Current functionality includes

  • Golden layout combined with panel from pure python
  • Altered styling of golden-layout (dark and light theme)
  • A KPI widget matching the theme.
  • Re-styling of bokeh graphs.
  • A-synchronous live calculation and live plotting.

The .js code for golden-layout is included in this package such that the packge can be used offline as well and to avoid problems when the online golden-layout resources move or are no longer available. This means that the golden-layout code does not automatically follow updates of golden-layout.

NOTE: this package under development and experimental. Some of the solutions are probably not very scalable/maintainable. In particular the a-synchronous live calculation and live plotting isn't what it could be. I appreciate suggestions, advice, contributions... :).

Feel free to use this for any purpose, within the limits of the licenses of panel and golden-layout. If you make improvements or additions I kindly ask you to share them. This can be done by adding them to this repository, or other channels like a blog. Feel free to contact me.

Some documentation is generated using pdoc3 and can be found in 'docs'.

Impression

Dark-Theme Demo Light-Theme Demo

How do I get set up?

Installation

From the directory in which the package folder is located use the following command to install:

pip install elvis

It is now possible to remove the elvis folder. To install in developers mode (changes to local elvis files are active) use:

pip install -e elvis

At present it is required do use a developers install of panel. Follow the instructions here and checkout in the branch static_serve. Use the panel_dev conda environment. Note that this is only required temporarily, as serving static assets will be included in the standard panel distribution at some point. The panel version in which elvis is tested is:

  • panel 0.10.0a2.post9+g643033f dev_0

The following work-around could be useful to test this package without the developers install. Create a main.py (or move one of the examples) in the root folder of the repository. Replace the default way of serving from the code

gpanel.serve()

With

gpanel.servable()

Now from the command line one directory level higher run:

panel serve elvis

In this case it is not needed to pip install elvis. WARNING: With some versions of bokeh + panel there seems to be some problem with serving the .js assets, so this solution might not work.

Examples

To get started with some examples look at the examples folder.

  • live_time_series shows the asynchronous live plotting functionality in the light theme
  • science-dashboard shows the dark theme and some standard panel/param functionality.

Resources

This package is just a very thin layer around the holoviz framework and the golden layout GUI package.

A good comparison with other frameworks can be found here.

As a plotting backend I prefer Bokeh, and it is currently the only one that is themed.

For demonstrations and more additions to panel, visit

Combining panel with the golden-layout was inspired by the VTKSlicer dashboard.

For bugs and problems with the code in this package, please raise a github issue. For more general questions, the holoviz discourse can be used.

Future work

ToDo

  • Fix reset button for streaming plots (resetting a holoviews plot)
  • Redesign the streaming module
  • Add docstrings
  • The css is a mess; needs to be cleaned up
  • Prevent overlapping hover pop-ups in Bokeh plots
  • Bokeh themes for other plot types
  • Address this "WARNING:param.reset: Setting non-parameter attribute value=False using a mechanism intended only for parameters"

Nice-to-haves

  • Remove the 5px left-margin when generating widgets with param.
  • A widget that shows stdout
  • A global message widget
  • Reset the server from a button in the browser
  • Save an elvis panel as static html

elvis's People

Contributors

leonvankouwen avatar jmosbacher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.