Skip to content

Instantly share code, notes, and snippets.

View Joyakis's full-sized avatar

Joy Akinyi Joyakis

View GitHub Profile
''' A grouped bar chart using a cleaned up version of the `Auto MPG dataset`_.
This examples demonstrates automatic handing of Pandas GroupBy objects and
colormapping nested factors with ``factor_cmap``. A hover tooltip displays
information for each bar.
.. bokeh-example-metadata::
:sampledata: autompg
:apis: bokeh.plotting.figure.vbar, bokeh.transform.factor_cmap
:refs: :ref:`ug_basic_bars_pandas`
:keywords: bars, categorical, colormap, groupby, pandas
fruits = ['Apples', 'Pears', 'Nectarines', 'Plums', 'Grapes', 'Strawberries']
years = ['2015', '2016', '2017']
data = {'fruits' : fruits,
'2015' : [2, 1, 4, 3, 2, 4],
'2016' : [5, 3, 3, 2, 4, 6],
'2017' : [3, 2, 4, 4, 5, 3]}
# Define group colors for each fruit
fruit_colors = Turbo[6]
from bokeh.models import ColumnDataSource, FactorRange
from bokeh.palettes import Turbo
from bokeh.plotting import figure, show
fruits = ['Apples', 'Pears', 'Nectarines', 'Plums', 'Grapes', 'Strawberries']
years = ['2015', '2016', '2017']
data = {'fruits' : fruits,
'2015' : [2, 1, 4, 3, 2, 4],
'2016' : [5, 3, 3, 2, 4, 6],
@Joyakis
Joyakis / plot_update.py
Last active March 19, 2023 15:54
I updated one of bokeh's plots using the following code
''' A grouped bar chart using a cleaned up version of the `Auto MPG dataset`_.
This examples demonstrates automatic handing of Pandas GroupBy objects and
colormapping nested factors with ``factor_cmap``. A hover tooltip displays
information for each bar.
.. bokeh-example-metadata::
:sampledata: autompg
:apis: bokeh.plotting.figure.vbar, bokeh.transform.factor_cmap
:refs: :ref:`ug_basic_bars_pandas`
:keywords: bars, categorical, colormap, groupby, pandas
@Joyakis
Joyakis / BOKEH_VIZ_TAXI.ipynb
Last active March 18, 2023 02:58
BOKEH visualisation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Joyakis
Joyakis / BOKEH_TAXI.ipynb
Created March 18, 2023 01:21
As a prerequisite to join the outreachy internship program i analysed the following dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Joyakis
Joyakis / BOKEH_TAXI.ipynb
Created March 18, 2023 00:50
As a prerequisite to join the outreachy internship program i analysed the following dataset
Sorry, this is too big to display.
@Joyakis
Joyakis / BOKEH_TAXI.ipynb
Created March 18, 2023 00:49
As a prerequisite to join the outreachy internship program i analysed the following dataset
Sorry, this is too big to display.