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 details)

Uploaded Source

File details

Details for the file svl-0.1a8.tar.gz.

File metadata

  • Download URL: svl-0.1a8.tar.gz
  • Upload date:
  • Size: 962.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for svl-0.1a8.tar.gz
Algorithm Hash digest
SHA256 6423be91512932bd57aa5ea11556f48e9b94d586bd3a79feed30c040b2508bf8
MD5 0e904715af9a63dcb6b5c5680526b11c
BLAKE2b-256 7cf9645d58edb3c70c3373f95aa24150530629cf966824d50b5b86d1ec84ef97

See more details on using hashes here.

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