Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
data
README.md
Vega Bar Tutorial.ipynb
Vincent_Examples.ipynb
area_chart_examples.py
bar_chart_examples.py
grouped_bar_examples.py
line_chart_examples.py
map_examples.py
pie_chart_example.py
scatter_chart_examples.py
stacked_area_examples.py
stacked_bar_examples.py

README.md

In order to see the visualization, you will need to start a simple Python HTTP server and serve the html and javascript. In order to do so, run the code in the example file, then the following in the Python REPL (Ctrl-C to shutdown):

import os
import SimpleHTTPServer
import SocketServer
import webbrowser
try: 
    Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
    httpd = SocketServer.TCPServer(("", 8000), Handler)
    httpd.serve_forever()
except KeyboardInterrupt: 
    httpd.shutdown()
    httpd.server_close()

Alternatively, within the terminal/cmd window you can cd to your directory containing the vega.json and vega_template.html files and run the following command:

$python -m SimpleHTTPServer 8000

Point your webbrowser to http://localhost:8000/vega_template.html to see the visualization.

For the IPython notebook, you need to host it locally (javascript safety), and use the "Run in Place" command.