예제 #1
0
yr_dict = {}
for y in np.arange(mny,mxy+1):
    yr_dict[str(y)] = str(y)
# print(mxy,mny)
# print(yr_dict)

# Get a list of the month names for the boxplot
months = month_names(df)

# Boxplot colour formatting
num_m = df['month'].nunique() ## 12 months in year
box_colours = col_range(num_m) 


# defaults (leave these alone):
header_logo = html.A([html.Img(id="logo",src=app.get_asset_url('oceans21logo_small.png'),
                    style={
                    'height' : '15%',
                    'width' : '15%',
                    'float' : 'right',
                    'position' : 'relative',
                    'padding-top' : 0,
                    'padding-right' : 0
                })],href="https://www.csir.co.za",target="_blank")

header_text = html.H1('Waves')


   
    
layout = html.Div([
예제 #2
0
    },
)

app.layout = html.Div([
    dcc.Location(id='url', refresh=False), sidebar,
    html.Div(id='page-content',
             style={
                 "margin-left": "18rem",
                 "margin-right": "2rem",
                 "padding": "2rem 1rem",
             })
])

index_page = html.Div([
    html.H1('Home Page', id='index-header'),
    html.Img(src=app.get_asset_url('dash_img.jpg'))
])


@app.callback(
    [dash.dependencies.Output(f"{i}-link", "active") for i in page_ids],
    [dash.dependencies.Input("url", "pathname")],
)
def toggle_active_links(pathname):
    if pathname == "/":
        return True, False, False, False
    return [pathname == f'/{i}' for i in page_ids]


@app.callback(dash.dependencies.Output('page-content', 'children'),
              [dash.dependencies.Input('url', 'pathname')])
예제 #3
0
# Imports from 3rd party libraries
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

# Imports from this application
from app import app


restoringPeaceCenter = dbc.Col(
    [
        html.Center(
            children=[
                html.Img(src=app.get_asset_url('restoringPeace.png'), style={'marginTop':60,'display': 'block', 'width':'80%'}),
                html.Br(),
                html.Span(' ', className='mr-1'),
                html.Div(
                    [
                        dbc.Card(
                            dbc.CardBody(
                            [
                                html.H4("Restoring Peace Within Yourself",className="card-text",style={'fontSize':32, 'marginTop':40, 'marginBottom':55}),
                                html.P(
                                    "We understand how a pandemic can create anxiety, panic and stress, especially with how fast the worldwide spread has been. We would like to help you restore peace of mind within yourself by introducing the mindfulness practice taught by Thich Nhat Hanh, the father of mindfulness. The following comes from the chapter “Restoring Peace Within Yourself” from his book True Love.",className="blockquote",style={'text-align':'left'}
                                ),
                                html.P(
                                    "During the day, if you practice walking meditation, each step brings you back to the present moment; each step enables you to touch what is beautiful, what is true. And in this way, after a few weeks of practice, joy will become something possible, you will be able to undo many knots within yourself, and you will be able to transform negative energies into joy and peace. The Buddha said this: “The object of your practice should first of all be yourself. Your love for the other, your ability to love another person, depends on your ability to love yourself.” If you are not able to take care of yourself, if you are not able to accept yourself, how could you accept another person and how could you love him or her? So it is necessary to come back to yourself in order to be able to achieve the transformation.",className="card-text",style={'text-align':'left'}
                                ),
                                html.P(
예제 #4
0
from app import app
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc

home_layout = [
    html.Div([
        html.H3("Welcome to Camunzon !"),
        html.Img(src=app.get_asset_url('meme1.png'), className='meme'),
        html.Img(src=app.get_asset_url('meme2.png'), className='meme'),
        html.Img(src=app.get_asset_url('meme3.jpg'), className='meme'),
    ],
             className='layout-container')
]
def card_graph2_physician_performance_drilldown_bundle(app):
    return dbc.Card(dbc.CardBody([
        dbc.Row(
            [
                dbc.Col(html.Img(
                    src=app.get_asset_url("bullet-round-blue.png"),
                    width="10px"),
                        width="auto",
                        align="start",
                        style={"margin-top": "-4px"}),
                dbc.Col(html.H4("Performance Drilldown by Managing Physician",
                                style={
                                    "font-size": "1rem",
                                    "margin-left": "10px"
                                }),
                        width=8),
            ],
            no_gutters=True,
        ),
        html.Div([
            html.Div(
                [
                    dbc.Row([
                        dbc.Col(html.H1(
                            "Major joint replacement of the lower extremity (MJRLE)",
                            id='dimname_on_physician_lv1_bundle',
                            style={
                                "color": "#f0a800",
                                "font-size": "1.5rem",
                                "padding-top": "1.2rem"
                            }),
                                width=9),
                    ])
                ],
                style={
                    "padding-left": "2rem",
                    "padding-right": "1rem",
                    "border-radius": "5rem",
                    "background-color": "#f7f7f7",
                    "margin-top": "2rem"
                }),
            html.
            H4("* Default sorting: by Contribution to Overall Performance Difference",
               style={
                   "font-size": "0.8rem",
                   "color": "#919191",
                   "padding-top": "1rem",
                   "margin-bottom": "-1rem"
               }),
            html.Div(drilltable_physician(
                drilldata_process_bundle(
                    'Physician ID', 'Bundle Name',
                    'Major joint replacement of the lower extremity (MJRLE)'),
                'dashtable_physician_lv1_bundle', 1),
                     id="drill_physician_lv1_bundle",
                     style={
                         "padding-top": "2rem",
                         "padding-bottom": "2rem"
                     }),
        ],
                 style={"max-height": "80rem"}),
    ]),
                    className="mb-3",
                    style={
                        "box-shadow":
                        "0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.05)",
                        "border": "none",
                        "border-radius": "0.5rem"
                    })
예제 #6
0
파일: layout.py 프로젝트: neha1611/Odometry
import dash 
import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc

from app import app
from layout.sidebar import sidebar
from dash.dependencies import Input, Output
from settings import config

logo_postion =  html.Div(
                    [
                        html.Img(src=app.get_asset_url("/images/logo.jpg"), className = 'logo')
                    ]
                )

content = html.Div(id="page-content")

layout = html.Div([logo_postion,dcc.Location(id="url"), sidebar, content])
예제 #7
0
        id="wAxisLimit-popover-target-BE",
        color="info",
    ),
    dbc.Popover(
        [
            dbc.PopoverHeader("ω axis limit Input"),
            dbc.PopoverBody([], id="wAxisLimit_validation_message-BE"),
        ],
        id="wAxisLimit_popover-BE",
        is_open=False,
        target="wAxisLimit-popover-target-BE",
    ),
], )
''' This is the set of inputs for the 1st system. It was done like this to accommodate multiple system inputs.'''
system1_input = dbc.Row([
    dbc.Col(html.Img(src=app.get_asset_url('BaseExcitation.png'),
                     className="img-fluid"),
            className="col-12 col-sm-5 col-md-3 col-lg-3"),
    dbc.Col([
        dbc.Row(html.H6("System 1")),
        dbc.Row([
            dbc.Col(dbc.InputGroup([
                dbc.InputGroupAddon("Mass, m (kg)", addon_type="prepend"),
                dbc.Input(id="m-BE",
                          placeholder="kg",
                          debounce=True,
                          type="number",
                          value=1,
                          min=0.001,
                          step=0.001),
                dbc.InputGroupAddon(mass_popover, addon_type="append"),
예제 #8
0
def serve_layout():

    # import stock returns
    df_returns = pd.read_excel(file_returns, sheet_name='Sheet1')
    tickers = df_returns['Code']
    df_returns = df_returns.iloc[:, 2:].T
    df_returns.columns = tickers
    df_returns.columns.name = ''
    df_returns.index.name = 'Date'
    df_returns.dropna(inplace=True)
    df_returns.index = pd.to_datetime(df_returns.index)

    # import indicator data
    df_data = pd.read_csv(file_data, index_col='Date')
    df_data.index = pd.to_datetime(df_data.index)

    layout = dbc.Container(
        [

            # store initial data
            dcc.Store(id='initial_returns_data',
                      data=df_returns.reset_index().to_dict('records')),
            dcc.Store(id='initial_indicators_data',
                      data=df_data.reset_index().to_dict('records')),

            # indicator descriptions based on user stock selection
            dcc.Store(id='indicators_desc'),

            # filtered returns data based on user stock selection
            dcc.Store(id='returns_data'),

            # filtered indicator data based on user stock selection
            dcc.Store(id='indicators_data'),

            # Top Banner
            dbc.Navbar([
                html.Div(dbc.Row([dbc.Col(html.H1('Leading Indicators'))])),
                dbc.Row(
                    [
                        dbc.Col(
                            html.Img(src=app.get_asset_url('IML_Logo.png'),
                                     height="40px")),
                    ],
                    className="ml-auto flex-nowrap mt-3 mt-md-0",
                )
            ]),

            # Drop Down Menus
            dbc.Row([
                dbc.Col(dcc.Dropdown(
                    id='sect-dropdown',
                    options=sector_options,
                    placeholder="Select a sector",
                ),
                        width={'size': 3}),
                dbc.Col(dcc.Dropdown(
                    id='stock-dropdown',
                    placeholder="Select a stock",
                ),
                        width={'size': 2}),
            ]),

            # table with links to indicators
            dbc.Row([dbc.Col(id='table-content', )]),

            # create charts for indicators vs share price
            dbc.Row(id='chart-layout', )
        ],
        fluid=True)

    return layout
예제 #9
0
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.express as px

# Imports from this application
from app import app

# 2 column layout. 1st column width = 4/12
# https://dash-bootstrap-components.opensource.faculty.ai/l/components/layout
column1 = dbc.Col(
    [
        dcc.Markdown("""
        
            ## Air BnB Price Predictor

            This app will help owners choose a resonable price for their AirBnB.

            """),
        dcc.Link(dbc.Button('Predict!', color='primary'), href='/predictions')
    ],
    md=4,
)

column2 = dbc.Col([
    html.Div([html.Img(src=app.get_asset_url('coolerAirBnB image.jpeg'))]),
])

layout = dbc.Row([column1, column2])
예제 #10
0
# APP

layout = html.Div(
    className="",
    children=[
        ##
        html.Div(
            className="pkcalc-banner",
            children=[
                html.Div(
                    className="pkcalc-title",
                    children=[
                        html.A(
                            id="dash-logo",
                            children=[
                                html.Img(src=app.get_asset_url("nyan.gif"))
                            ],
                            href="/",
                        ),
                        html.H2("DRUG MATCHMAKER"),
                    ],
                ),
                html.Div(
                    className="pkcalc-nav",
                    children=[
                        dcc.Link('Targets', href='/targets'),
                        dcc.Link('Database Information', href='/database'),
                        dcc.Link('Team', href='/team')
                    ],
                ),
            ],  #children banner
예제 #11
0
longitude = get_lon_data()
latitude = get_lat_data()
# print(flatten(longitude[0,:],latitude[:,0],sal_data[0,0,:,:]))

# mapbox token:
# mapbox_access_token = "sk.eyJ1Ijoia2lyb2RoIiwiYSI6ImNrMDVjbHd2ejBzenczbnBuemUxZGxjM3gifQ.uEjF3QBfWY8xToNwU5NHKg" # my own one
mapbox_access_token = "pk.eyJ1Ijoia2lyb2RoIiwiYSI6ImNrMDVjaWY0ZzBqaXAzbXFvenp3OWVpd2MifQ.apsaN8lTiMfqgsOArDA5Xg"  # public

###############################################
# put the dash layout here
# ...

# defaults (leave these alone):
header_logo = html.A([
    html.Img(id="logo",
             src=app.get_asset_url('oceans21logo_small.png'),
             style={
                 'height': '15%',
                 'width': '15%',
                 'float': 'right',
                 'position': 'relative',
                 'padding-top': 0,
                 'padding-right': 0
             })
],
                     href="https://www.csir.co.za",
                     target="_blank")

header_text = html.H1('Salinity')

# these are yours :-)
예제 #12
0
              'remaining humble, we did our best to not only present our findings, but to '
              'make the app as interactive as possible so that other knowledgeable users can '
              'conduct their own analyses.'),
            html.P('We sincerely hope that you enjoy it and find it useful!')
        ],
        style=STYLE_DESCRIPTION))
# ------------------------------
# 3. Images
# ------------------------------
bg = html.Div(style=GENERAL_BACKGROUND)

# ------------------------------
# 4. Photos
# ------------------------------
ph1 = html.Div(
    [html.Img(src=app.get_asset_url("img/alejandra_c.png"), style=PHOTO_1)])
ph2 = html.Div(
    [html.Img(src=app.get_asset_url("img/carlos_c.png"), style=PHOTO_2)])
ph3 = html.Div(
    [html.Img(src=app.get_asset_url("img/daniel_j_3.png"), style=PHOTO_3)])
ph4 = html.Div(
    [html.Img(src=app.get_asset_url("img/alberto_l.png"), style=PHOTO_4)])
ph5 = html.Div(
    [html.Img(src=app.get_asset_url("img/diego_m.png"), style=PHOTO_5)])
ph6 = html.Div(
    [html.Img(src=app.get_asset_url("img/luis_p.png"), style=PHOTO_6)])
bck_ph = html.Div(
    [html.Img(src=app.get_asset_url("img/colegio6.png"), style=BACK_PHOTO)])

name_1 = html.Div(
    [html.P('Alejandra Castelblanco  '
예제 #13
0
layout = html.Div([
    html.H3('About'),
    html.Div(
        html.P([
            html.Strong(
                'A detailed introduction with video demonstration is available '
            ),
            dcc.Link('here', href=link), '.'
        ])),
    html.Div(html.P(p1)),
    html.Div(html.Strong('Isn’t flattening the curve enough?')),
    html.Div(html.P(p2)),
    html.Div([
        html.P(
            html.Img(src=app.get_asset_url("flat_curve.png"),
                     id="flat_curve-logo",
                     style={
                         "height": "250px",
                         'textAlign': 'center',
                         "width": "auto",
                         "margin-bottom": "25px",
                     }), )
    ]),
    html.Div(html.P(p3)),
    html.Div(html.P(p4)),
    html.Div([
        html.P(
            html.Img(src=app.get_asset_url("flat_curve2.png"),
                     id="flat_curve-logo2",
                     style={
예제 #14
0
#external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']

#app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
#auth = dash_auth.BasicAuth(
#    app,
#    VALID_USERNAME_PASSWORD_PAIRS
#)
#http://54.212.39.89/start

application = app.server
app.layout = html.Div(
    [
        # header
        html.Div([
            html.Span("XXXXXXX[V01]", className='app-title'),
            html.Div(html.Img(src=app.get_asset_url('logo_3.png'),
                              height="100%"),
                     style={
                         "float": "right",
                         "height": "100%"
                     })
        ],
                 className="row header",
                 style={"BackColor": "dodgerblue"}),

        # tabs
        html.Div(
            [
                dcc.Tabs(
                    id="tabs",
                    style={
예제 #15
0
column1 = dbc.Col(
    [
        dcc.Markdown(
            """
        
            ## Welcome to San Fransisco!

            Enjoy some of the best weather , diverse cuisines , great shopping districts and attractions such as antique cable cars, the Golden Gate bridge, Fisherman’s Wharf and Pier 39, wine country, Alcatraz, Muir Woods’ 1000 year-old redwood forest and so much more!
            
            This app helps you find a place to stay that fits in your budget.          

            
            """
        ),
        dcc.Link(dbc.Button('Next', color='primary'), href='/predictions')
    ],
    md=4,
)

gapminder = px.data.gapminder()
fig = px.scatter(gapminder.query("year==2007"), x="gdpPercap", y="lifeExp", size="pop", color="continent",
           hover_name="country", log_x=True, size_max=60)

column2 = dbc.Col(
    [
        #dcc.Graph(figure=fig),
        html.Div(html.Img(src=app.get_asset_url('download.jpeg')), style={'height':'10%', 'width':'10%'})
    ]
)

layout = dbc.Row([column1, column2])
예제 #16
0
def login_layout(app):

    return html.Div(
        [
            html.Div(
                [
                    html.Div(html.Img(src=app.get_asset_url("coeus.png"),
                                      style={"height": "4rem"}),
                             style={
                                 "text-align": "center",
                                 "padding": "4rem"
                             }),
                    html.Div(html.H2("Patient",
                                     style={
                                         "font-size": "1.6rem",
                                         "padding-left": "20px"
                                     }),
                             style={"text-align": "start"}),
                    html.Div(id='store-location'),
                    dbc.Card(
                        dbc.CardBody(
                            [
                                html.Div(style={"padding-top": "20px"}),
                                dbc.Collapse(children=[
                                    "\u2757",
                                    "Please check your username and password."
                                ],
                                             id='login-collapse-check',
                                             is_open=False,
                                             style={"text-align": "center"}),
                                html.Div(dbc.Input(
                                    placeholder="Username",
                                    type="text",
                                    style={"border-radius": "10rem"},
                                    id="login-input-username"),
                                         style={"padding": "0.5rem"}),
                                html.Div(dbc.Input(
                                    placeholder="Password",
                                    style={"border-radius": "10rem"},
                                    type='password',
                                    id="login-input-password"),
                                         style={"padding": "0.5rem"}),
                                dbc.Row(
                                    [
                                        dbc.Col(html.Div(), ),
                                        dbc.Col(
                                            [
                                                dbc.Button(
                                                    "Log In",
                                                    # id = 'manager-button-openmodal-pmpm',
                                                    className="mb-3",
                                                    style={
                                                        "background-color":
                                                        "#38160f",
                                                        "border": "none",
                                                        "border-radius":
                                                        "10rem",
                                                        "font-family":
                                                        "NotoSans-Regular",
                                                        "font-size": "1rem",
                                                        "width": "6rem"
                                                    },
                                                    id="login-button-submit"),
                                            ],
                                            width=3),
                                        dbc.Col(html.Div(), ),
                                    ],
                                    style={
                                        "padding-top": "2rem",
                                        "padding-right": "1rem"
                                    })
                            ],
                            style={
                                "padding-left": "2rem",
                                "padding-right": "2rem"
                            }),
                        className="mb-3",
                        style={
                            "box-shadow":
                            "0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.1)",
                            "border": "2px solid #1357dd",
                            "border-radius": "1rem"
                        })
                ],
                style={
                    "background-color": "transparent",
                    "border": "none",
                    "width": "500px",
                    "margin": "auto",
                    "padding-top": "10vh"
                }),
        ],
        style={
            "background": "url(./assets/patient-login.png)",
            "height": "100vh"
        })
예제 #17
0
                    html.Section(id="slideshow", children=[
                        html.Div(id="slideshow-container",
                                 children=[html.Div(id="image"),
                                           dcc.Interval(id='interval', interval=6000),
                                           ]),
                    ],className='pretty_container six columns')]),
       ], className="twelve columns"
)





### Photo Carousel
Photo1 = app.get_asset_url('FieldStation.jpg')
Photo2 = app.get_asset_url('HarrisSampling.jpg')
Photo3 = app.get_asset_url('Tank.jpg')

@app.callback(Output('image', 'children'),
              [Input('interval', 'n_intervals')])
def display_image(n):
    if n == None or n % 3 == 1:
        img = html.Div(html.Img(src=Photo1))
    elif n % 3 == 2:
        img = html.Div(html.Img(src=Photo2))
    elif n % 3 == 0:
        img = html.Div(html.Img(src=Photo3))
    else:
        img = "None"
    return img
예제 #18
0
             style={
                 "color": "#8190A5",
                 "font-weight": "bold"
             },
         ),
     ],
     style={
         "background-color": "#F8F6F6",
         "border": "0px",
     },
 ),
 dbc.Container([
     dbc.Row([
         dbc.Col([
             html.Img(
                 src=app.get_asset_url("luisM.jpg"),
                 height="250px",
                 className="img_marg",
             ),
             html.H5(
                 "Luis Gustavo Maldonado Archila",
                 className="H5_margin",
             ),
             html.P(
                 "Mechatronics Engineer",
                 className="P_margin",
             ),
             dbc.Button(
                 [
                     html.Img(
                         src=PTP_LOGO,
예제 #19
0
from dash.dependencies import Input, Output
from app import app
from database.transforms import today, vessel_name, vessel_imo, start_date, end_date
from tabs import tab1, tab2
from database import transforms
import base64

df = transforms.df

PGT_marine_logo = 'PGMTLogo.jpg'
ENVI_marine_logo = 'ENVI EGCS Header.jpg'

layout = html.Div([
    html.Div(
        [
            html.Div(html.Img(src=app.get_asset_url(PGT_marine_logo),
                              style={
                                  'height': '50px',
                                  'width': '250px'
                              }),
                     className='one-third column'),
            html.Div(html.Img(src=app.get_asset_url(ENVI_marine_logo),
                              style={
                                  'height': '50px',
                                  'width': '700px'
                              }),
                     className='two-thirds column'),
        ],
        style={
            'color': '#002332',
            'background': '#FFFFFF',
예제 #20
0
                                               href="/apps/marketing",
                                               color="primary",
                                               size='lg',
                                               className="mt-3"),
                                           dbc.Button("Growth",
                                               href="/apps/growth",
                                               color="primary",
                                               size='lg',
                                               className="mt-3")
                                                    ])
                                    ),
                            dbc.Col(width=2,
                                    children=
                                        html.Img(id='em-logo',
                                             style=dict(marginTop=20, height='10vh'),
                                             src=app.get_asset_url('EM-logo.svg')
                                                 )),
                            ])]),

#Branch dropdown
    dbc.Row(id='dropdowns',children=[
            dbc.Col(id='scatter-map-label', width=3, children=html.Label('National Distribution of Members',
                                                                style=dict(
                                                                    fontSize=28,
                                                                    fontFamily='Times',
                                                                    marginLeft='35px',
                                                                    marginTop='55px')
                                                                )),
            dbc.Col(id='branch-dropdown', width=3, style=dict(marginLeft='25px'), #backgroundColor='orange'),
                children=[
                    html.Label('Select Service Branch to plot points',
예제 #21
0
])

app.layout = html.Div(
    id=DARK_THEME_CONTAINER,
    children=[
        dcc.Store(id=CHAT_COUNT_MEMORY, storage_type="local"),
        dcc.Store(id=MESSAGE_COUNT_MEMORY, storage_type="local"),
        html.Header(
            className="container",
            style={"text-align": "center"},
            children=[
                html.A(
                    href="",
                    children=[
                        html.Img(
                            src=app.get_asset_url("logo.png"),
                            className=HOVER_BOB_CONTINUOUS,
                            alt="Banter.ly Logo",
                            style={"max-width": "300px"},
                        )
                    ],
                ),
                html.H1("Banter.ly"),
                html.
                H3("The world's most comprehensive open source chat analytics 🔎 and visualization app 📊"
                   ),
                html.A(
                    href="https://ko-fi.com/I3I01O8A7",
                    children=[
                        html.Img(
                            src="https://cdn.ko-fi.com/cdn/kofi1.png?v=2",
예제 #22
0
###########################################################

# LOAD THE DIFFERENT FILES
from scripts import dashboard,tabs
from data_fetch import get_views
from get_callbacks import return_callbacks

# PLACE THE COMPONENTS IN THE LAYOUT
app.layout = html.Div(
    [
    	html.Div([
    			# left image
    			html.Div(
    				[
    					html.Img(
    							src = app.get_asset_url("ds4a-img.svg"), 
    							id="ds4a-image",
    							style = {
    								"height": "60px",
    								"width": "auto",
    								"margin-bottom": "25px",
									"padding": "5px"
    							},
    						),
    				],
    				className = "one-third column",
    			),
    			# title
    			html.Div(
    				[
	    				html.Div(
def card_key_driver_drilldown_bundle(app):
    return dbc.Card(dbc.CardBody([
        dbc.Row(
            [
                dbc.Col(html.Img(
                    src=app.get_asset_url("bullet-round-blue.png"),
                    width="10px"),
                        width="auto",
                        align="start",
                        style={"margin-top": "-4px"}),
                dbc.Col(html.H4("Key Drivers",
                                style={
                                    "font-size": "1rem",
                                    "margin-left": "10px"
                                }),
                        width=2),
                dbc.Col(
                    [
                        dbc.Button(
                            "See All Drivers",
                            id='button-all-driver-bundle',
                            style={
                                "background-color": "#38160f",
                                "border": "none",
                                "border-radius": "10rem",
                                "font-family": "NotoSans-Regular",
                                "font-size": "0.6rem"
                            },
                        ),
                        dbc.Modal([
                            dbc.ModalHeader("All Drivers"),
                            dbc.ModalBody(children=html.Div(
                                [table_driver_all(df_detail_default)],
                                id='table-all-driver-bundle',
                                style={"padding": "1rem"})),
                            dbc.ModalFooter(
                                dbc.Button(
                                    "Close",
                                    id='close-all-driver-bundle',
                                    style={
                                        "background-color": "#38160f",
                                        "border": "none",
                                        "border-radius": "10rem",
                                        "font-family": "NotoSans-Regular",
                                        "font-size": "0.8rem"
                                    },
                                ))
                        ],
                                  id='modal-all-driver-bundle',
                                  size="lg")
                    ],
                    width=3,
                ),
            ],
            no_gutters=True,
        ),
        dbc.Row([
            dbc.Col([
                dbc.Row([
                    dbc.Col(
                        html.Div([gaugegraph(df_driver_default, 0)],
                                 id='figure-driver-bundle-1',
                                 style={"padding-top": "1.5rem"})),
                    dbc.Col(
                        html.Div(html.H4("{:.1f} %".format(
                            abs(df_driver_default['%'][0] * 100)),
                                         style={"color": "#ff4d17"}),
                                 id='value-driver-bundle-1',
                                 style={
                                     "font-size": "1rem",
                                     "color": "#ffeb78",
                                     "margin-top": "6rem",
                                     "margin-left": "-1rem"
                                 })),
                ])
            ]),
            dbc.Col([
                dbc.Row([
                    dbc.Col(
                        html.Div([gaugegraph(df_driver_default, 1)],
                                 id='figure-driver-bundle-2',
                                 style={"padding-top": "1.5rem"})),
                    dbc.Col(
                        html.Div(html.H4("{:.1f} %".format(
                            abs(df_driver_default['%'][1] * 100)),
                                         style={"color": "#ff4d17"}),
                                 id='value-driver-bundle-2',
                                 style={
                                     "font-size": "1rem",
                                     "color": "#aeff78",
                                     "margin-top": "6rem",
                                     "margin-left": "-1rem"
                                 }))
                ])
            ]),
            dbc.Col([
                dbc.Row([
                    dbc.Col(
                        html.Div([gaugegraph(df_driver_default, 2)],
                                 id='figure-driver-bundle-3',
                                 style={"padding-top": "1.5rem"})),
                    dbc.Col(
                        html.Div(html.H4("{:.1f} %".format(
                            abs(df_driver_default['%'][2] * 100)),
                                         style={"color": "#ff4d17"}),
                                 id='value-driver-bundle-3',
                                 style={
                                     "font-size": "1rem",
                                     "color": "#39db44",
                                     "margin-top": "6rem",
                                     "margin-left": "-1rem"
                                 }), )
                ])
            ]),
        ], ),
    ]),
                    className="mb-3",
                    style={
                        "box-shadow":
                        "0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.05)",
                        "border": "none",
                        "border-radius": "0.5rem"
                    })
예제 #24
0
import dash_table as dt
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from app import app

help_content = [
    dcc.Markdown('''
## Usage

**Upload** data in the top left-hand side of the app. One Excel
file or multiple CSVs/DATs/TXTs are accepted. Data is read in as below.
    '''),
    html.Img(src=app.get_asset_url('images/PCA_Help_Data.png'),
             style=dict(width=400)),
    dcc.Markdown('''
If doing PCA, then **selecting** a class option will simply identify the classes in the plot.
PCA is unsupervised so the class selection is not necessary.

If doing LDA, the class is required to do analysis as it is a form of supervised learning.

**Slide** between sheets, or datafiles, with the slide feature at the bottom of the page.

**Filter** the data to plot using the Filter Data button.
The plot contains selected data or all rows if none are selected.
Filter arguments can be simple searches or inequalities (eg. < 60).
Download the plotted data in the navigation bar.
''')
]

modal = html.Div(
def card_table1_physician_performance_drilldown_bundle(app):
    return dbc.Card(
        dbc.CardBody(
            [
                dbc.Row(
                    [
                        dbc.Col(html.Img(
                            src=app.get_asset_url("bullet-round-blue.png"),
                            width="10px"),
                                width="auto",
                                align="start",
                                style={"margin-top": "-4px"}),
                        dbc.Col(html.H4("Cost by Service Category",
                                        style={
                                            "font-size": "1rem",
                                            "margin-left": "10px"
                                        }),
                                width=8),
                    ],
                    no_gutters=True,
                ),
                html.Div(
                    [
                        html.Div(
                            [
                                dbc.Row([
                                    dbc.Col(html.
                                            H1("Physician ID: All",
                                               id='dimname_on_physician_lv2_bundle',
                                               style={
                                                   "color": "#f0a800",
                                                   "font-size": "1.5rem",
                                                   "padding-top": "1.2rem"
                                               }),
                                            width=9),
                                ])
                            ],
                            style={
                                "padding-left": "2rem",
                                "padding-right": "1rem",
                                "border-radius": "5rem",
                                "background-color": "#f7f7f7",
                                "margin-top": "2rem"
                            }),
                        html.Div(
                            [
                                drilltable_lv3(
                                    data_lv2_bundle, 'Service Category',
                                    'dashtable_physician_lv2_bundle', 0)
                            ],
                            id="drill_physician_lv2_bundle",
                            style={"padding": "1rem"})
                    ],
                    style={"max-height": "120rem"}),
            ]),
        className="mb-3",
        style={
            "box-shadow":
            "0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 6px 20px 0 rgba(0, 0, 0, 0.05)",
            "border": "none",
            "border-radius": "0.5rem"
        })
예제 #26
0
                                      className="nav-item nav-link btn",
                                      href='/1er_dataset'),
                               html.A('Résultat des classifieurs',
                                      className="nav-item nav-link active btn",
                                      href='/2eme_dataset'),
                           ]),
                       html.H3('Contexte'),
                       Parag,
                       html.Img(style={
                           'height': '60%',
                           'width': '50%',
                           'border-radius': '8px',
                           'padding': '50px'
                       },
                                id='image_roue',
                                src=app.get_asset_url('roue.png')),
                   ]),
"""2eme Page"""
layout2 = html.Div([
    html.Div(children=[
        html.Nav(className="nav nav-pills",
                 children=[
                     html.A(
                         'Home', className="nav-item nav-link btn", href='/'),
                     html.A('Analyse des données brutes',
                            className="nav-item nav-link btn",
                            href='/1er_dataset'),
                     html.A('Résultat des classifieurs',
                            className="nav-item nav-link active btn",
                            href='/2eme_dataset'),
                 ]),
예제 #27
0
def parse_contents(contents, filename, date):
    content_type, content_string = contents.split(',')

    decoded = base64.b64decode(content_string)
    df = pd.read_csv(io.StringIO(decoded.decode('utf-8')))
    df.columns = ["Pagina", "Probabilidad"]

    plt.figure(figsize=(10, 10))

    fig = go.Figure(
        go.Bar(x=df["Probabilidad"],
               y=(df["Pagina"].astype(str)),
               orientation='h'))

    fig.update_layout(
        title={
            'text': "Páginas más probables",
            'y': 0.8,
            'x': 0.5,
            'xanchor': 'center',
            'yanchor': 'top'
        },
        autosize=False,
        width=300,
        height=300,
        xaxis=dict(
            title_text="%Probabilidad",
            tickmode="array",
            titlefont=dict(size=15),
        ),
        yaxis=dict(title_text="Página",
                   tickmode="array",
                   titlefont=dict(size=15),
                   tickformat=',d'),
    )
    ###############################################################
    #Inicio Parte nueva 20200729
    ###############################################################
    fig.write_image("assets/fig1.jpg")

    graph1 = html.Div(children=[
        html.Img(
            src=app.get_asset_url("fig1.jpg"),
            id="graph1-image",
        )
    ],
                      className='graph1-style-image')

    graph2 = html.Div(children=[
        html.Img(
            src=app.get_asset_url("fig1.jpg"),
            id="graph2-image",
        )
    ],
                      className='graph2-style-image')

    graph3 = html.Div(children=[
        html.Img(
            src=app.get_asset_url("fig1.jpg"),
            id="graph3-image",
        )
    ],
                      className='graph3-style-image')

    return html.Div([
        graph1,
        graph2,
        graph3,
    ])
예제 #28
0
row = html.Div([
    dbc.Row([
        dcc.Markdown("""
                
                    ## Process

                    Our process uses two diffrent models, the first one uses TFIDF vectorization to turn our data into 
                    values that we can work with and manipulate into a way that we can use them in the second model to make 
                    recomendations for the user.

                    The second model is called nearest neighbors, it takes the data from the first model and gives a value
                    to each observation, and it finds the observations nearest to a given observation that the user will input

                    We made a function that passes user input into the TFIDF vectorization and then it uses the nearest neighbors
                    model to recommend the three nearest marjuana strains that suits all the users specified parameters`

                    """),
    ]),
    dbc.Row([
        dbc.Col(
            html.Div(
                html.Img(src=app.get_asset_url('nearestNeighbors.png'),
                         style={
                             'height': '83%',
                             'width': '83%'
                         })), ),
        dbc.Col(html.Div(html.Img(src=app.get_asset_url('equation.png'))), ),
    ])
], )

layout = row
예제 #29
0
                     },
                     style_header={
                         'border': '1px solid black',
                         'fontSize': 30,
                         'font-weight': 'bold'
                     },
                     style_cell_conditional=[{
                         'if': {
                             'column_id': c
                         },
                         'textAlign': 'left'
                     } for c in ['Class', 'Node']])
    ],
             style={
                 'width': '65%',
                 'margin': 'auto'
             }),
    html.Div([
        html.P('Social Network of the Graph',
               className='title-1',
               style={
                   'fontSize': 30,
                   'font-weight': 'bold',
                   'text-align': 'center'
               }),
        html.Img(src=app.get_asset_url('dmnetwork.png'),
                 style={'width': '49%'}),
        html.Img(src=app.get_asset_url('dmnetwork2.jpeg'),
                 style={'width': '49%'})
    ])
])
예제 #30
0
import dash_html_components as html

from app import app

# Navbar
navbar = html.Div([
    html.Div(className='navbar navbar-expand-lg navbar-light bg-light',
             children=[
                 html.Div(
                     className='container-fluid',
                     children=[
                         html.Div(children=html.Img(
                             src=app.get_asset_url('img/white_text_logo.png'),
                             style={'height': 50}),
                                  className='navbar-brand'),
                         html.Div(
                             className='collapse navbar-collapse',
                             children=[
                                 html.Ul(
                                     className='navbar-nav',
                                     children=[
                                         html.Li(
                                             html.A('Home',
                                                    style={'color': 'white'},
                                                    className='nav-link',
                                                    href='/home')),
                                         html.Li(
                                             html.A('Import',
                                                    style={'color': 'white'},
                                                    className='nav-link',
                                                    href='/import')),