Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions intro-to-bokeh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ The tutorial utilizes the following three files:

- **2017-18_standings.csv**
- Contains daily team standing information for the 2017-18 season
- [Original Kaggle Link](https://www.kaggle.com/pablote/nba-enhanced-stats/downloads/2017-18_standings.csv/26)
- [Original Kaggle Link](https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?select=2017-18_standings.csv)
- **2017-18_playerBoxScore.csv**
- Contains per-game box score player statistics for the 2017-18 season
- [Original Kaggle Link](https://www.kaggle.com/pablote/nba-enhanced-stats/downloads/2017-18_playerBoxScore.csv/26)
- [Original Kaggle Link](https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?select=2017-18_playerBoxScore.csv)
- **2017-18_teamBoxScore.csv**
- Contains per-game box score team statistics for the 2017-18 season
- [Original Kaggle Link](https://www.kaggle.com/pablote/nba-enhanced-stats/downloads/2017-18_teamBoxScore.csv/26)
- [Original Kaggle Link](https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?select=2017-18_teamBoxScore.csv)

The original Kaggle link for this data is: [**NBA Enhanced Box Score and Standings Stats**](https://www.kaggle.com/pablote/nba-enhanced-stats/home)
The original Kaggle link for this data is: [**NBA Enhanced Box Score and Standings Stats**](https://www.kaggle.com/datasets/pablote/nba-enhanced-stats)

This data is licensed under [**CC BY-SA 4.0**](https://creativecommons.org/licenses/by-sa/4.0/).

Expand Down
3 changes: 1 addition & 2 deletions intro-to-bokeh/code-snippets/bokeh-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
# Bokeh libraries
from bokeh.io import output_file, output_notebook
from bokeh.layouts import column, gridplot, row # noqa
from bokeh.models import ColumnDataSource # noqa
from bokeh.models.widgets import Panel, Tabs # noqa
from bokeh.models import ColumnDataSource, TabPanel, Tabs # noqa
from bokeh.plotting import figure, show

# Prepare the data
Expand Down
8 changes: 4 additions & 4 deletions intro-to-bokeh/code-snippets/east-west-tabbed-layout.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bokeh Library
from bokeh.io import output_file
from bokeh.models.widgets import Panel, Tabs
from bokeh.models import TabPanel, Tabs

# Output to file
output_file(
Expand All @@ -9,11 +9,11 @@
)

# Increase the plot widths
east_fig.plot_width = west_fig.plot_width = 800 # noqa
east_fig.width = west_fig.width = 800 # noqa

# Create two panels, one for each conference
east_panel = Panel(child=east_fig, title="Eastern Conference") # noqa
west_panel = Panel(child=west_fig, title="Western Conference") # noqa
east_panel = TabPanel(child=east_fig, title="Eastern Conference") # noqa
west_panel = TabPanel(child=west_fig, title="Western Conference") # noqa

# Assign the panels to Tabs
tabs = Tabs(tabs=[west_panel, east_panel])
Expand Down
5 changes: 2 additions & 3 deletions intro-to-bokeh/code-snippets/first-figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
background_fill_alpha=0.5,
border_fill_color="blue",
border_fill_alpha=0.25,
plot_height=300,
plot_width=500,
h_symmetry=True,
height=300,
width=500,
x_axis_label="X Label",
x_axis_type="datetime",
x_axis_location="above",
Expand Down
6 changes: 3 additions & 3 deletions intro-to-bokeh/code-snippets/first-glyphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
# Create a figure with no toolbar and axis ranges of [0,3]
fig = figure(
title="My Coordinates",
plot_height=300,
plot_width=300,
height=300,
width=300,
x_range=(0, 3),
y_range=(0, 3),
toolbar_location=None,
)

# Draw the coordinates as circles
fig.circle(x=x, y=y, color="green", size=10, alpha=0.5)
fig.scatter(x=x, y=y, color="green", size=10, alpha=0.5)

# Show plot
show(fig)
8 changes: 4 additions & 4 deletions intro-to-bokeh/code-snippets/multiply-glyphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Create a figure with a datetime type x-axis
fig = figure(
title="My Tutorial Progress",
plot_height=400,
plot_width=700,
height=400,
width=700,
x_axis_label="Day Number",
y_axis_label="Words Written",
x_minor_ticks=2,
Expand All @@ -31,7 +31,7 @@
top=daily_words,
color="blue",
width=0.75,
legend="Daily",
legend_label="Daily",
)

# The cumulative sum will be a trend line
Expand All @@ -40,7 +40,7 @@
y=cumulative_words,
color="gray",
line_width=1,
legend="Cumulative",
legend_label="Cumulative",
)

# Put the legend in the upper left corner
Expand Down
Loading