Skip to main content

vega-lite-linter

Fixing your visualization design written in Vega-Lite based on the Answer Set Programming.

Setup

Step 1: install Clingo

First, you need to install Clingo.

For MacOS

brew install clingo

Using Conda

conda install -c potassco clingo

For other system, please look up to https://potassco.org/clingo/

Step 2: install vega-lite-linter

pip install vega-lite-linter

Usage

from vega_lite_linter import Lint 

vega_json = {
    "data": {
        "url": "data/cars.json"
    },
    "mark": "bar",
    "encoding": {
        "x": {
            "field": "Horsepower",
            "type": "quantitative"
        },
        "y": {
            "field": "Miles_per_Gallon",
            "type": "quantitative"
        },
        "size": {
            "field": "Cylinders",
            "type": "ordinal"
        }
    }
}

# initialize 
lint = Lint(vega_json)

# show rules that the input vega-lite json violated
violate_rules = lint.lint()

# show fixing recommendation by vega-lite-linter
fix = lint.fix()

License

The software is available under the MIT License.

Contact

If you have any question, feel free to open an issue.

Release files for vega-lite-linter 0.0.1

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

Source distribution (sdist)

Source distribution for vega-lite-linter 0.0.1
File Size Uploaded
vega-lite-linter-0.0.1.tar.gz 317.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vega-lite-linter 0.0.1
File Interpreter ABI Platform
vega_lite_linter-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 652.9 kB

Release files / vega-lite-linter-0.0.1.tar.gz

Download URL vega-lite-linter-0.0.1.tar.gz
Size 317.6 kB
Tags Source
SHA-256 checksum
How to use checksums
09f4b587dc7ef7a7a8d7b5c6bf71f18f55719980b2d28a7bc52595fb06afc2a3
BLAKE2b-256 checksum
How to use checksums
04ddf1222f975cb662ba05b17225840653229833fa562aa1242eb553e18d3df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3

Release files / vega_lite_linter-0.0.1-py3-none-any.whl

Download URL vega_lite_linter-0.0.1-py3-none-any.whl
Size 335.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f4b0dbd76f00562cbc4b82b08e4dce8105855853f9958af702cc54ad3d0d896
BLAKE2b-256 checksum
How to use checksums
8cb79613f0c7dc315dca67f0d6aabcb0f4c11fc7a6bb0aeb7d08238b2e8bd1eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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