The Vega editor is a web application for authoring and testing Vega visualizations. It includes a number of example specifications that showcase both the visual encodings and interaction techniques supported by Vega.
To run the editor locally, you must first install the dependencies and then launch a local web server. We assume you have npm installed.
-
Run
npm run vendor
to install 3rd party vendor libraries. This command will first runnpm install
to download the dependencies, and then copy the needed files into thevendor
folder. -
Launch a local web server to run the editor. For example, if you have Python installed on your system, run
python -m SimpleHTTPServer 8000
in the top-level directory of this project and then point your browser to http://localhost:8000/.
The editor is useful for testing if you are involved in Vega development. The editor includes a watch script (launched via npm run watch
) that will automatically copy new Vega builds into the vendor
folder. By default, the watch script assumes that your local Vega repository resides at ../vega
relative to the vega-editor directory. Alternatively, you can indicate the desired Vega project directory as a command line argument (npm run watch VEGA_DIR
).