I can create a simple bar chart with the code below, but I want to add error bars if that is even possible.
gm12878_close_TAD_df = pd.DataFrame(gm12878_close, columns=['distance'])
gm12878_close_TAD_df_500kb = gm12878_close_TAD_df[gm12878_close_TAD_df['distance'] < 10000]
alt.Chart(gm12878_close_TAD_df_500kb).mark_bar().encode(x = alt.X('distance', bin=alt.Bin(maxbins=30)), y='count()')
Which produces this chart: CHART PRODUCED HERE
To add error bars I have been trying to use something like this based off this link (https://altair-viz.github.io/gallery/grouped_bar_chart_with_error_bars.html)
chart = alt.Chart(gm12878_close_TAD_df_500kb).mark_bar().encode(x = alt.X('distance', bin=alt.Bin(maxbins=30)), y='count()')
error_bars = chart.mark_errorbar(extent='ci').encode(x = 'distance', y='count():Q')
alt.layer(chart, error_bars)
I would appreciate any suggestions and help. Thank you in advanced.
