Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idvxlab/vega-lite-linter
Fixing your visualization design written in Vega-Lite based on the answer set programming
https://github.com/idvxlab/vega-lite-linter
Last synced: 15 days ago
JSON representation
Fixing your visualization design written in Vega-Lite based on the answer set programming
- Host: GitHub
- URL: https://github.com/idvxlab/vega-lite-linter
- Owner: idvxlab
- License: mit
- Created: 2021-02-22T06:19:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-24T12:56:03.000Z (about 3 years ago)
- Last Synced: 2024-09-27T09:32:20.472Z (about 2 months ago)
- Language: Python
- Size: 59.3 MB
- Stars: 66
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vega-lite-linter
A smart visual designer for automatic diagnosis and improving your design of visualization charts written in Vega-Lite.## Setup
### Step 1: install **Clingo**
Since vega-lite-linter requires **Clingo** as the solver of Answer Set Programming, you are required to install it first.For MacOS
```
brew install clingo
```For Linux
```
apt-get install -y gringo
```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
```More instruction about can be found on [vega-lite-linter's project website](http://vegalite-linter.idvxlab.com/index.html).
## Usage
```python
from vega_lite_linter import Lintvega_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()```
## Credits
Vega-lite-linter was invented by the [iDVx Lab](https://idvxlab.com/) together with [AntV](https://antv.vision/en).Based on our technology, [AntV](https://antv.vision/en) and [iDVx Lab](https://idvxlab.com/) also developed [ChartLinter](https://ava.antv.vision/en/docs/guide/chart-linter/intro) in Javascript to support visualization charts beyond Vega-Lite.
## License
The software is available under the [MIT License](https://github.com/idvxlab/vega-lite-linter/blob/main/LICENSE).## Contact
If you have any question, feel free to [open an issue](https://github.com/idvxlab/vega-lite-linter/issues/new/) or contact idvx.lab [at] gmail.com.