Last active
June 24, 2022 00:17
-
-
Save jingningzhang1/eb4f32e3afcd475ea0f475701ae46e75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
from dash import dcc, html, Input, Output | |
import dash_mantine_components as dmc | |
import plotly.express as px | |
from utils import dbx_utils, chart_utils | |
from skimage import io | |
app = dash.Dash(__name__) | |
app.title = "dash-dbx" | |
server = app.server # expose server variable for Procfile | |
users = dbx_utils.get_listofusers() | |
userlist = [{"label": str(i), "value": str(i)} for i in users["userid"]] | |
app.layout = html.Div( | |
[ | |
html.Header( | |
[ | |
html.Img(src=app.get_asset_url("plotly_logo.png"), width="17%"), | |
html.H1("Dash with Databricks"), | |
], | |
style={"text-align": "center"}, | |
), | |
dcc.Tabs( | |
[ | |
dcc.Tab( | |
label="Population level visualizations", | |
children=[ | |
dmc.Grid( | |
[ | |
html.Div( | |
[ | |
dmc.Select( | |
id="comparison", | |
label="Select the color comparison category:", | |
data=[ | |
{"label": "Sex", "value": "sex"}, | |
{"label": "Smoker?", "value": "Smoker"}, | |
{ | |
"label": "Cholesterol Level", | |
"value": "cholesterol", | |
}, | |
{ | |
"label": "Blood Pressure", | |
"value": "bloodpressure", | |
}, | |
], | |
value="sex", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment