Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kindofluke
Created March 1, 2018 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kindofluke/ff19c394d3587ef6bf1bab1d8c0ab4e1 to your computer and use it in GitHub Desktop.
Save kindofluke/ff19c394d3587ef6bf1bab1d8c0ab4e1 to your computer and use it in GitHub Desktop.
PieHoloviews
%%opts Bars [xrotation=90 width=600 height=500 show_legend=False tools=['hover'] invert_axes=True ]
%%opts Bars (fill_color=Cycle('Spectral'))
%%opts Layout [shared_axes=False]
import holoviews as hv
hv.extension('bokeh')
pie_raw_holo_table = hv.Table(pie_raw, kdims=['Source', 'FoodCode'])
sources_chart = pie_raw_holo_table.aggregate('Source', function=np.count_nonzero).to.bars(group='Sources of Pie Consumption ')
flavors_chart = pie_raw_holo_table.aggregate('FoodCode', function=np.count_nonzero).to.bars(group='Flavors of Pie Consumption ')
sources_chart + flavors_chart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment