Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SVL: Declarative Dashboards

Build Status Coverage Status Code style: black

SVL is a declarative, SQL-like language for simple reports and dashboards.

Initially I made this project to learn and experiment with EBNF context-free grammars, but pretty quickly realized this was something I could actually use for my job. Maybe you will find it useful too.

If you're interested, hit the link for the docs below.

timothyrenner.github.io/svl

and install with

pip install svl

Not convinced? Maybe ✨ this ✨ will change your mind...

SVL code:

DATASETS
    bigfoot "sample_data/bigfoot_sightings.csv"
LINE bigfoot
    X date BY YEAR
    Y number COUNT
    SPLIT BY classification
CONCAT(
    HISTOGRAM bigfoot X temperature_mid
    HISTOGRAM bigfoot X humidity
)

Results:

Alpha Features

Easy to learn: The entire grammar is under 150 lines.

6️⃣ Chart types: Line, bar, scatter, histogram and pie. And number. I plan on adding more, so if I'm missing your favorite one let me know.

📈 Complex layouts: SVL scripts can support any number of plots and makes it straightforward to arrange them so that the most important plots get the most real estate.

📊 Interactive HTML output: SVL uses Plotly to draw the visualizations, and produces an easily shareable but still interactive HTML file.

📂 CSV and Parquet files: Currently the data is limited to files, and SVL has support for CSV and (if pyarrow is installed) parquet files.

Not Alpha Features, but Possible

Other plot backends The compiler isn't married to Plotly. SVL can have future support for other backends like Vega, Bokeh, or even Matplotlib (probably).

Other data sources For simplicity SVL operates on files, but like the plot renderer the compiler isn't coupled to flat files. In fact, most of the data processing is done under the hood by SQLite, so adding support for other data processors like Postgres or MySQL is definitely possible.

Other plot types I picked those five for the alpha release because they're the most common, but obviously more support can be added. Let me know what other chart types you'd like to see!

I'm sold!

🎉 Sweet! 🎉 Check out the docs here to learn more.

Development

I've been using Anaconda to manage environments. If you've got that installed, just do

conda env create -f env.yml

# then install the module

conda activate svl && pip install -e .

To run the tests,

pytest test/ --cov=svl  # last option if you want coverage.

To lint,

flake8 svl

in the top level directory and start hacking away!

Release files for svl 0.1a8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svl 0.1a8
File Size Uploaded
svl-0.1a8.tar.gz 962.1 kB Details

Release files / svl-0.1a8.tar.gz

Download URL svl-0.1a8.tar.gz
Size 962.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6423be91512932bd57aa5ea11556f48e9b94d586bd3a79feed30c040b2508bf8
BLAKE2b-256 checksum
How to use checksums
7cf9645d58edb3c70c3373f95aa24150530629cf966824d50b5b86d1ec84ef97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.5.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page