Altair Review

Altair works best with tidy data—long-form data where each row is an observation and each column is a variable.

alt.Chart(data).mark_bar().encode( x=alt.X('a', title='Category'), y=alt.Y('b', title='Value'), color='a' # Color by category ).properties( title='My First Altair Chart', width=400, height=300 ) Use code with caution. Copied to clipboard 5. Interaction altair

# Simple interactive tooltip alt.Chart(data).mark_bar().encode( x='a', y='b', tooltip=['a', 'b'] # Add tooltips on hover ).interactive() # Allow zooming/panning Use code with caution. Copied to clipboard 6. Saving Charts Altair works best with tidy data—long-form data where

Create a specific (e.g., click a bar to filter data)? altair

This guide focuses on the for data visualization. 1. Installation & Setup