import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import pandas as pd
from dash.dependencies import Input, Output, State
df = pd.read_csv(‘E:\Epicenter\Project 1\Final Notupdated.csv’)
df = df.dropna()
app = dash.Dash(name)
app.layout = html.Div(
children = [
dcc.Dropdown(id = ‘my_dropdown’, multi = False,
options=[{‘label’ : “Support”, ‘value’ : “Support”},
{‘label’ : “Domestic”, ‘value’ : “Domestic”},
{‘label’ : “International”, ‘value’ : “International”}]),
dcc.Graph(id = ‘graph-output’, figure = {})
]
)
@app.callback(
Output(component_id = ‘graph-output’, component_property = ‘figure’),
[Input(component_id = ‘my_dropdown’, component_property = ‘value’)],
prevent_initial_call=False
)
def update_my_graph(val_chosen):
print(f"value user chose: {val_chosen}")
print(type(val_chosen))
#dff = df[df[“Group”].isin(val_chosen)]
fig = px.scatter(df, x=“RAG_Status”, y=“Score”,color=df[“RAG Status”], hover_name=“Employee Name”)
return fig
if name == ‘main’:
app.run_server(debug=True)