Created
March 1, 2018 18:28
-
-
Save kindofluke/ff19c394d3587ef6bf1bab1d8c0ab4e1 to your computer and use it in GitHub Desktop.
PieHoloviews
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%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