Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Forked from bollwyvl/Bokeh YAML.ipynb
Last active August 29, 2015 14:27
Show Gist options
  • Save tonyfast/ea2f710aaf8d3f4a8e81 to your computer and use it in GitHub Desktop.
Save tonyfast/ea2f710aaf8d3f4a8e81 to your computer and use it in GitHub Desktop.
Use yaml to parse and also to create a bokeh chart
# &fisher is an anchor/alias provided by yaml
fisher-iris-data: &fisher !io
read_csv: http://www.math.uah.edu/stat/data/Fisher.csv
cdn: !resources
js_files:
# import javascript file
- https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js
css_files:
# bootstrap stylesheet
- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
css_raw:
- >
#notebook-container {
width: 90%;
}
bokeh: !figure
figure:
width: 800
height: 400
x_axis_label: Petal Length
y_axis_label: Sepal Width
tools: pan,wheel_zoom
glyphs:
- circle:
x: PL
y: SW
fill_color: red
size: 10
line_color:
# use alias to reference the column data source
source: *fisher
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment