Skip to main content

Build a data visualization dashboard with simple snippets of python code

Project description

preview


An interface for saving python scripts as permanent D-Tale launch points.

PyPI version Code style: black


Getting started

Installation

$ pip install dtaledesktop

Running it from the command line:

$ dtaledesktop

Running it from a python script:

import dtale_desktop

dtale_desktop.run()

Motivation

dtaledesktop simplifies the process of fetching data, cleaning/transforming it, and then performing exploratory data analysis. With dtaledesktop, that entire process is condensed into a single click.

It does this by providing a dashboard GUI, and any python code which returns a pandas DataFrame can be saved to the dashboard as a widget. Users can then execute that code and explore the DataFrame in dtale or pandas-profiling by simply clicking one of the widget buttons. The code associated with that widget can also be edited directly from the dashboard, and upon doing so the dashboard is updated in real-time.

Here's a simple example of using this workflow:

  1. launch dtaledesktop from a terminal. The dashboard automatically opens up in your web browser.
  2. click the 'Add Data Source' button, fill out the form like so, and click save: preview
  3. and bam! You now have a new 'Stocks' section on your dashboard. It will be there every time you launch dtaledesktop, and the python code can be edited directly from the dashboard: preview

If at some point you decide you want to watch Apple too, all you need to do is click the "Settings" button and add "AAPL" to the list of stock symbols. It will immediately appear in the dashboard below TSLA.


How it works

The front end is written with react, using a mixture of ant-design and styled-components.

The back end is written in python, and it actually consists of TWO apps which listen on separate ports. The main one is an asynchronous FastAPI application, and it responsible for communicating with the dashboard, interacting with the file system, and executing user-defined code for fetching/transforming data. It is able to do this by saving the submitted code as persistent files and then using importlib.util to build and then import the resulting modules. The second app is for running dtale instances, and it is a synchronous flask application.


Settings

Disabling features:

Environment Variable Description
DTALEDESKTOP_DISABLE_ADD_DATA_SOURCES "true" if the "Add Data Source" button should not be shown.
DTALEDESKTOP_DISABLE_EDIT_DATA_SOURCES "true" if editing existing data sources should not be allowed.
DTALEDESKTOP_DISABLE_EDIT_LAYOUT "true" if users should not be allowed to edit what sources are visible or what order they're in.
DTALEDESKTOP_DISABLE_PROFILE_REPORTS "true" if the "Profile" option (which builds a pandas_profiling report) should not be shown. This is resource-intensive and currently a bit buggy.
DTALEDESKTOP_DISABLE_OPEN_BROWSER "true" if browser should not open upon startup
DTALEDESKTOP_DISABLE_DTALE_CELL_EDITS "true" if editing cells in dtale should be disabled.

Routing requests:

Environment Variable Description
DTALEDESKTOP_HOST host it will run on
DTALEDESKTOP_PORT port the main application will use
DTALEDESKTOP_DTALE_PORT port the dtale application will use
DTALEDESKTOP_ROOT_URL allows you to override how urls are built, which can be useful if you're running it as a service (ie not locally)
DTALEDESKTOP_DTALE_ROOT_URL added in order to support running dtaledesktop in k8s - by using different domain names for the main app and the dtale app, the ingress controller can use that (domain name) to determine which port requests should be sent to.
DTALEDESKTOP_ENABLE_WEBSOCKET_CONNECTIONS "true" if real-time updates should be pushed to clients via websocket connection. This is only useful/necessary if you are running it as a service and multiple users can access it simultaneously.

Loaders/file storage:

Environment Variable Description
DTALEDESKTOP_ROOT_DIR the location where all persistent data (loaders, cached data, etc.) will be stored. By default this is ~/.dtaledesktop
DTALEDESKTOP_ADDITIONAL_LOADERS_DIRS comma-separated list of directory paths that should be scanned for data sources upon startup
DTALEDESKTOP_EXCLUDE_DEFAULT_LOADERS "true" if the default loaders should not be included in the list of data sources. These are the loaders which look for json, csv, and excel files in your home directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dtaledesktop-0.1.2.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dtaledesktop-0.1.2-py3.8.egg (2.4 MB view details)

Uploaded Egg

dtaledesktop-0.1.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file dtaledesktop-0.1.2.tar.gz.

File metadata

  • Download URL: dtaledesktop-0.1.2.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for dtaledesktop-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bbed348c1bce1734468db0b07641e8daa65eb0e9b3e4eec3b2d4bbdf5fc06f5e
MD5 e609159dac215bc8d347ad5bb4e60a92
BLAKE2b-256 3fef7c38fbde0486deff4afda08ad2b781c11567dea7379a6fa28a8b3e95fadd

See more details on using hashes here.

File details

Details for the file dtaledesktop-0.1.2-py3.8.egg.

File metadata

  • Download URL: dtaledesktop-0.1.2-py3.8.egg
  • Upload date:
  • Size: 2.4 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for dtaledesktop-0.1.2-py3.8.egg
Algorithm Hash digest
SHA256 93eabcedb96f007e29100f13d4e914ace496dcc218d6d44f1054a94b7533243e
MD5 2615eea66175035b4b0ed1942c3afc02
BLAKE2b-256 83ad9404add9940c330c70cc722c07971f1af1abef4a1eaffc415fb69e638203

See more details on using hashes here.

File details

Details for the file dtaledesktop-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dtaledesktop-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for dtaledesktop-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c27840cb2faeade71b9d4496b927d434036a93aacce7ae9e5a5fe503a8339760
MD5 15dd0426818a249512ad9e1b387fcab7
BLAKE2b-256 153e68fd17c29f721a5fce1c8f072fa0510949c5840e6e44a565a08bd815d86b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page