02_data_viz
02_data_viz
USING PYTHON
1
D-VELOP WORKSHOP SERIES – Summer 2021
2
What will we cover today?
§ Motivation
§ Useful Python Libraries
§ Usages of Bokeh
§ Interactive Tools
§ Learn by Doing
3
Visualization Objectives
§ Record information
§ Analyze data to support reasoning
§ Confirm hypotheses
§ Communicate ideas to others
4
Why Visualize
To record information
5
Why Visualize
To point out interesting things
6
Why Visualize
To point out interesting things
7
Why Visualize
To communicate information
8
Why Visualize
To analyze data
10
NumPy
11
Pandas
12
Matplotlib
13
Seaborn
14
Bokeh
15
What is Bokeh used for?
16
Build Data Applications
17
Interactively Explore Data
18
Publish Dashboards
19
Visualize Streaming Data
20
Add content to Web Pages
21
Basic Interactive Tools
§ Gesture Tools:
• pan, drag, pinch, scroll
§ Action Tools:
• redo, reset, save, zoom in
§ Inspector Tools:
• hover, crosshair
22
Linking
Link plots to add connected interactivity between plots
§ Linked Panning
• Link pan or zooming actions across many
plots
§ Linked Brushing
• Shared data sources between renderers
§ Linked Properties
• Link values of model properties together
so that they remain synchronized
23
Interactive Legend
Bokeh plots can be made interactive so that clicking or tapping on the
legend entries will hide or mute the entries
24
Widgets
Widgets are interactive controls that can be added to Bokeh applications to
provide a front end user interface to a visualization.
§ Computations
§ Update Plots
§ Connect to other programmatic functionality
§ Examples: checkbox, sliders, table, tabs,
dropdown, multi-choice, radio-buttons
25
Widget Callbacks
To use widgets, add them to the document and define their callbacks.
§ CustomJS callback
§ Event Handlers:
• Python functions that can be attached to widgets.
• Called when certain attributes on the widget are
changed.
§ Attached using: on_change, on_click, etc.
26
LEARN BY DOING
To access the videos and material from the workshop series please visit:
https://guides.lib.purdue.edu/d-velop
27