def serve_layout(): return html.Div([ dbc.Alert(id="status_pseg", color='success'), # Interval dcc.Interval(interval=30 * 1000, id="interval_pseg"), # Cards dbc.Row( [ dbc.Col(dbc.Card(first_card, color='info', outline=True)), dbc.Col(dbc.Card(second_card, color='info', outline=True)) ]), dbc.Row( [ dbc.Col(dbc.Card(third_card, color='primary', outline=True)), dbc.Col(dbc.Card(fourth_card, color='primary', outline=True)) ]) ])
def serve_layout(): return html.Div([ # Interval dcc.Interval(interval=30 * 1000, id="interval_seg"), # Cards dbc.Row([dbc.Col(dbc.Card(first_card, color="primary", outline=True))]), ])
def serve_layout(): return html.Div([ # Status dbc.Alert(id="status", color='success'), # Interval dcc.Interval(interval=30 * 1000, id="interval"), # Cards dbc.Row([dbc.Col(first_card, width=6), dbc.Col(second_card, width=6)]) ])
import pathlib #--------------------------------------------------------------- PATH = pathlib.Path(__file__).parent DATA_PATH = PATH.joinpath("../data").resolve() df_pandas = pd.read_csv(DATA_PATH.joinpath("train.csv"),parse_dates=['publish_date']) #category_x = ['category_id', 'country_code'] value_y = ['views', 'dislikes','comment_count'] #------------------------------------------------------------------------------------- style = {'padding': '1.5em'} layout = dbc.Container([ html.Br(), dbc.Row([ dbc.Col( html.H2("Bar Chart for Country and Video Category", className="text-center font-weight-normal text-primary")) #style={"text-align": "center", "font-size":"100%", "color":"black"})) ]), #------------------------------------------------------------------------------------- dbc.Row([ dbc.Col([ html.Label(['X-axis categories to compare:'],style={'font-weight': 'bold'}), dcc.RadioItems(id='xaxis_raditem', options=[{'label': 'Video Category', 'value': 'category_id'}, {'label': 'Country', 'value': 'country_code'}], value='country_code', className="font-weight-normal text-primary", style={"width": "50%"}), ],width=8), ]), #-------------------------------------------------------------------------------------
import dash_html_components as html from app import app, dbc layout = dbc.Container( [ dcc.Markdown('### Final Results'), dbc.Row([ dbc.Col([ html. H6("Feature Importance for predicting youtube likes (Descending Order)" ), html.Img( src= 'https://raw.githubusercontent.com/ianuvrat/datasets/main/download.png' ), ], className="text-center", width={ 'size': 12, 'offset': 0, 'order': 1 }), ]), #----------------------------------------------------------------------- html.Br(), dbc.Row([ dbc.Col([ html.H6(""" Pearson Correlation Matrix """), html.Img( src=
dbc.Row([ dbc.Col([ dash_table.DataTable( id='datatable_id', data=dff.to_dict('records'), columns=[ {"name": i, "id": i, "deletable": True, "selectable": True, "hideable": True} if i == "video_id" or i == "publish_date" or i == "title" or i == "channel_title" or i == "description" or i == "tags" else {"name": i, "id": i, "deletable": True, "selectable": True} for i in dff.columns ], editable=False, # allow editing of data inside all cells filter_action="native", # allow filtering of data by user ('native') or not ('none') sort_action="native", # enables data to be sorted per-column by user or not ('none') sort_mode="multi", # sort across 'multi' or 'single' columns column_selectable="multi", # allow users to select 'multi' or 'single' columns row_selectable="multi", # allow users to select 'multi' or 'single' rows row_deletable=False, # choose if user can delete a row (True) or not (False) selected_columns=[], # ids of columns that user selects selected_rows=[], # indices of rows that user selects page_action='native', style_cell={'whiteSpace': 'normal', 'minWidth': 95, 'maxWidth': 95, 'width': 95}, fixed_rows={'headers': True, 'data': 0}, virtualization=False, style_cell_conditional=[ # align text columns to left. By default they are aligned to right { 'if': {'column_id': c}, 'textAlign': 'left' } for c in ['country', 'iso_alpha3'] ], style_data={ # overflow cells' content into multiple lines 'whiteSpace': 'normal', 'height': 'auto' }, ) ]) , ]),
placeholder='Select a date', date=dt(2020, 3, 13)), className="d-inline p-2 bg-dark text-white") ]), html.Div([ dcc.Graph(id="coil_gait_chart", style={ "overflowY": "scroll", }), ]) ]) ] """ Top Element """ alert = dbc.Alert([ dbc.Row([ dbc.Col( html.H2("TCM Coil Production Performance", className="alert-heading")), dbc.Col(html.H6(id="status_prod", className="alert-heading")), ]), html.Hr(), dbc.Row([ dbc.Col(html.Div( dcc.DatePickerRange(id='date-picker-range', min_date_allowed=dt(2017, 8, 5), max_date_allowed=dt.now(), initial_visible_month=dt.now(), end_date=dt.now())), width="auto"), dbc.Col(html.Div( dbc.Button(id='submit-button', n_clicks=0, children='Submit',
country_code = ['IN', 'CA', 'US', 'GB'] category_id = [24.0, 25.0, 22.0, 10.0] style = {'padding': '1.5em'} alert = dbc.Alert("Prectiction using XGBoost model is better!", color="danger", duration=3000) # dismissable=False), # use dismissable or duration=5000 for alert to close in x milliseconds #----------------------------------------------------------------------- layout = dbc.Container( [ html.Br(), dbc.Row([ dbc.Col([ html. H6("Estimate the number of likes your youtube video can get, based on different parameters.", className="text-dark") ]) ]), #----------------------------------------------------------------------- dbc.Row([ dbc.Col( [ html.Div(id="the_alert", children=[]), html.Label(['Prediction Model:'], style={'font-weight': 'bold'}), dcc.RadioItems(id='xaxis_raditem', options=[{ 'label': 'XGBoost', 'value': 'XGBoost' }, {
bargap=0.15, # gap between bars of adjacent location coordinates. bargroupgap=0.1 # gap between bars of the same location coordinate. ) return {"data": data, "layout": layout} def default_layout_null(): return html.Div(style={'display': 'none'}) """ Layout Elements""" """ Top Element """ alert = dbc.Alert([ dbc.Row([ dbc.Col(html.H2("PLTCM Plant Performance", className="alert-heading")), dbc.Col(html.H6(id="status_stop", className="alert-heading")), ]), html.Hr(), dbc.Row([ dbc.Col(html.Div( dcc.DatePickerRange(id='date-range', min_date_allowed=dt(2017, 8, 5), max_date_allowed=dt.now(), initial_visible_month=dt.now(), end_date=dt.now())), width="auto"), dbc.Col(html.Div( dbc.Button(id='submit-button', n_clicks=0, children='Submit', color="primary",