Introducing KWidget and DataPanels

Introduction

I'm please to announce the early release of the python DataPanels application and the KWidgets library.  Through the pandemic I spent a lot of time at home and a spare room became an office.  I wanted to have something running during the day that would show inspirational quotations, stock market information, etc.  This software is a realization of that. 

This hobby project provides a set of interactive visualizations giving the user access to multiple kinds of data.  These panels change over time, providing an interesting stream of information.  The goal is to grow this over time with new panels (e.g. weather reports, sports scores, news headlines, the state of a smart home).

Although no special hardware is required to run the software (it runs on a normal desktop computer), the DataPanels application was originally designed to work with a  Raspberry Pi 7" Display that is in a  SmartPi Touch 2 case sitting on a desk.  With the touchscreen, this provides a live, changing display of information throughout the day.  You can interact with it without using a keyboard or a mouse.  It also works on a desktop computer.

DataPanels is built using the Kivy user interface library. KWidgets is a set of general purpose Kivy-based components that could be used in multiple applications. It currently includes some simple tables, a box plot, and the cell display that is used with the Game of Life panel. This set of widgets will grow in the future. 

The user can provide a configuration file that set all kinds of options, such as which securities are shown, the color of the Game of Life panel and the size of the cells, what quotations are displayed, and the rate at which everything gets updated.  A default configuration is included with the software to make it easy to get started quickly.  In the future, an interface will be written to create configuration files as per your specifications.  In the meantime, you have to use a text editor.

Here is a picture of the software running in the hardware listed above.  I also run it in another environment on a desktop computer:


Installation

DataPanels is available in Pypi so you can install it easily using pip.  Here's a simple example set of commands that makes it work in anaconda on MS Windows:

conda create -n datapanels_demo python=3.9

conda activate datapanels_demo

pip install datapanels

set KIVY_NO_ARGS=1

python -m datapanels.app

See the DataPanels github README for more details on how to configure and use the software.

Current Panels

Currently there are three panels - one for quotations, one for security prices, and one for the Game of Life.  My current plans are to add more in the future.  Contributions would be welcome. 

Quotations

This is a simple quotation display panel.  The user provides either a list of quotations or (more likely) the path to a file containing one quotation per line.  These quotations are rotated after some specified number of seconds.


Security Quotes

A display containing information about some security displays information such as the price over time, and a box plot showing the distribution of prices and where the current price fits within that distribution. The information is acquired using yfinance.


Note that this information is for entertainment only.

Game of Life

Conway's Game of Life is a well known cellular automaton.  DataPanels has an implementation of the Game of Life.  The screen can be randomized or set to one of a list of provided patterns (the patterns are taken from LifeWiki).  To an existing live display, new random cells can be activated and random ships can be added.

Here's an example showing 160P10H2V0 along with a few other cells activated.

That the state of the software as of today.  Future development will include new panels along with a configuration interface.

Comments