Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Created March 30, 2018 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save WillKoehrsen/f585900309e1eb426115bc316259a6db to your computer and use it in GitHub Desktop.
Save WillKoehrsen/f585900309e1eb426115bc316259a6db to your computer and use it in GitHub Desktop.
# Pandas for data management
import pandas as pd
# os methods for manipulating paths
from os.path import dirname, join
# Bokeh basics
from bokeh.io import curdoc
from bokeh.models.widgets import Tabs
# Each tab is drawn by one script
from scripts.histogram import histogram_tab
from scripts.density import density_tab
from scripts.table import table_tab
from scripts.draw_map import map_tab
from scripts.routes import route_tab
# Using included state data from Bokeh for map
from bokeh.sampledata.us_states import data as states
# Read data into dataframes
flights = pd.read_csv(join(dirname(__file__), 'data', 'flights.csv'),
index_col=0).dropna()
# Formatted Flight Delay Data for map
map_data = pd.read_csv(join(dirname(__file__), 'data', 'flights_map.csv'),
header=[0,1], index_col=0)
# Create each of the tabs
tab1 = histogram_tab(flights)
tab2 = density_tab(flights)
tab3 = table_tab(flights)
tab4 = map_tab(map_data, states)
tab5 = route_tb(flights)
# Put all the tabs into one application
tabs = Tabs(tabs = [tab1, tab2, tab3, tab4, tab5])
# Put the tabs in the current document for display
curdoc().add_root(tabs)
@GonzalezKelvin
Copy link

Hello good afternoon.!
I liked the article Data Visualization with Bokeh in Python, Part III: Making a Complete Dashboard, and downloaded the file bokeh_app.zip I do the step that says but when the application runs in bokeh serve the page of http: // localhost : 5006 / me aparace en blancon, my question is how can I solve this problem ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment