Did anyone use this visualization tool yet? https://altair-viz.github.io/getting_started/overview.html
Hi Marcel,
The Altair package is not running in the normal jupyter hub but runs fine in jupyterlab. So, you will have to launch jupyter lab.
-
Start Jupyter lab
jupyter lab --ip 0.0.0.0 --port 4040 --no-browser --notebook-dir=$HOME -
Wait for the URL to be printed. It would be something like this:
- Change the URL to the public URL:
In my case, I replaced the private IP address to the public IP address of the computer that you are logged in:
http://e.cloudxlab.com:4041/?token=eba5c47ef8535ce8ca83ddc23be6365fb86f4f9437cac8b2&token=eba5c47ef8535ce8ca83ddc23be6365fb86f4f9437cac8b2
-
Open it in the browser
-
Click on “Python3” notebook
-
Copy-paste the following code:
import altair as alt
load a simple dataset as a pandas DataFrame
from vega_datasets import data
cars = data.cars()alt.Chart(cars).mark_point().encode(
x=‘Horsepower’,
y=‘Miles_per_Gallon’,
color=‘Origin’,
).interactive() -
press shift+enter, it should look like the following: