Page Code

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

import pandas as pd

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', }),
])
])

# ======OPEN LIMITED GRAPH======


open_limited_graph = html.Div(children=[
html.Div([
dcc.Link('Open | ', id='open-link', href='open'),
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 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', }),
])
])

# ======PERM CLOSED GRAPH======


perm_closed_graph = html.Div(children=[
html.Div([
dcc.Link('Open | ', id='open-link', href='open'),
dcc.Link('Open but limited operations | ',
id='open-limit-link', href='openlimit'),
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("PERMANENTLY CLOSED 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', }),
])
])

# ======TEMP CLOSED GRAPH======


temp_closed_graph = html.Div(children=[
html.Div([
dcc.Link('Open | ', id='open-link', href='open'),
dcc.Link('Open but limited operations | ',
id='open-limit-link', href='openlimit'),
dcc.Link('Permanently Closed | ',
id='perm-closed-link', href='permclosed')
], 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("TEMPORARILY CLOSED 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', }),
])
])

You might also like