a python package for vega-lite lint and quick-fix
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vega-lite-linter-0.0.1.tar.gz
(317.6 kB
view details)
Built Distribution
File details
Details for the file vega-lite-linter-0.0.1.tar.gz
.
File metadata
- Download URL: vega-lite-linter-0.0.1.tar.gz
- Upload date:
- Size: 317.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09f4b587dc7ef7a7a8d7b5c6bf71f18f55719980b2d28a7bc52595fb06afc2a3 |
|
MD5 | 1932ae60f7a77f86c239756b2c9eab7e |
|
BLAKE2b-256 | 04ddf1222f975cb662ba05b17225840653229833fa562aa1242eb553e18d3df1 |
File details
Details for the file vega_lite_linter-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: vega_lite_linter-0.0.1-py3-none-any.whl
- Upload date:
- Size: 335.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f4b0dbd76f00562cbc4b82b08e4dce8105855853f9958af702cc54ad3d0d896 |
|
MD5 | 8e88211b4f8e1e80a64ce5d333a6b1e1 |
|
BLAKE2b-256 | 8cb79613f0c7dc315dca67f0d6aabcb0f4c11fc7a6bb0aeb7d08238b2e8bd1eb |