Code
import pandas as pd
import altair as alt
df = pd.read_csv('data/volcano-heights.csv')
alt.Chart(df).mark_bar().encode(
alt.X('height', bin=alt.Bin(extent=[0, 20_000], step=1000), title='Volcano height (feet)'),
alt.Y('count()', title='Count'),
tooltip=[
alt.Tooltip('height', bin=True, title='Height range'),
alt.Y('count()', title='Count'),
]
).properties(
width=900,
height=300,
).configure_axis(
labelFontSize=24,
titleFontSize=24,
).interactive()
