Altair

This integration lets you log interactive charts generated in altair, like confusion matrix or distribution, in Neptune.

Log altair interactive charts

Follow these steps:

Create a run

import neptune.new as neptune
run = neptune.init(project='my_workspace/my_project')

Create altair figure

import altair as alt
from vega_datasets import data
source = data.cars()
brush = alt.selection(type='interval')
points = alt.Chart(source).mark_point().encode(
x='Horsepower:Q',
y='Miles_per_Gallon:Q',
color=alt.condition(brush, 'Origin:N', alt.value('lightgray'))
).add_selection(
brush
)
bars = alt.Chart(source).mark_bar().encode(
y='Origin:N',
color='Origin:N',
x='count(Origin):Q'
).transform_filter(
brush
)
chart = points & bars

Log interactive figure

run['visuals/altair-fig'] = neptune.types.File.as_html(chart)

Explore the results in the Neptune