Skip to main content

No project description provided

Project description

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!

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

svl-0.1a8.tar.gz (962.1 kB view hashes)

Uploaded Source

Supported by

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