Professional Documents
Culture Documents
Page Code
Page Code
Page Code
import numpy as np
import plotly.express as px
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
df = pd.read_csv('dataproject2635.csv')
# ======OPEN GRAPH======
open_graph = html.Div(children=[
html.Div([
dcc.Link('Open but limited operations | ',
id='open-limit-link', href='openlimit'),
dcc.Link('Permanently Closed | ',
id='perm-closed-link', href='permclosed'),
dcc.Link('Temporary Closed ',
id='temp-closed-link', href='tempclosed')
], style={'background-color': 'black', }),
dcc.Dropdown(id='region_choice',
options=[{'label': x, 'value': x}
for x in sorted(df.Region.unique())],
style={'width': "40%", 'margin-top': '30px'},
value=''
),
html.H1("OPEN BAR GRAPH", style={
'font-family': 'Verdana', 'color': 'black', 'text-align': 'center',
'margin-top': '30px', }),
html.Div([
dcc.Graph(id='bar_business_graph', figure={}, style={
'height': '890px', 'border-style': 'solid', 'border-width':
'7px', }),
]),
html.H1("PIE GRAPH", style={'font-family': 'Verdana',
'color': 'black', 'text-align': 'center', 'margin-top': '80px', }),
html.Div([
dcc.Graph(id='pie_business_graph', figure={}, style={
'height': '600px', 'border-style': 'solid', 'border-width':
'7px', }),
])
])
dcc.Dropdown(id='region_choice',
options=[{'label': x, 'value': x}
for x in sorted(df.Region.unique())],
style={'width': "40%", 'margin-top': '30px'},
value=''
),
html.H1("OPEN BUT LIMITED BAR GRAPH", style={
'font-family': 'Verdana', 'color': 'black', 'text-align': 'center',
'margin-top': '30px', }),
html.Div([
dcc.Graph(id='bar_business_graph', figure={}, style={
'height': '890px', 'border-style': 'solid', 'border-width':
'7px', }),
]),
html.H1("PIE GRAPH", style={'font-family': 'Verdana',
'color': 'black', 'text-align': 'center', 'margin-top': '80px', }),
html.Div([
dcc.Graph(id='pie_business_graph', figure={}, style={
'height': '600px', 'border-style': 'solid', 'border-width':
'7px', }),
])
])