def Contact(session_id, username): return html.Div([ Header(username), NavBar(UrlIndex.CONTACT.value), Body(), Footer(True) ])
def ChangeUserPassword(username=None): return html.Div([ Header(username), NavBar(), Body(username), Footer(True) ])
def AccountRecoveryPortal(): return html.Div([ html.Br(), html.Br(), html.Br(), dbc.Container(RecoveryPortalCard()), Footer(True) ])
def Homepage(): layout = html.Div([ Navbar(), body, Info(), Footer(), Banner(), ], style={'backgroundColor': colors['background'], 'overflow-x': 'hidden'}) return layout
def UsersPortal(username=None): return html.Div([ Header(username), NavBar(), html.Br(), html.Br(), html.Br(), dbc.Container(UserPortalCard(username)), Footer(True) ])
def CreateUser(username=None): return html.Div([ Header(username), NavBar(), html.Br(), html.Br(), html.Br(), dbc.Container(CreateUserCard()), Footer(True) ])
def Body(username=None): if username is None: return html.Div([ html.Br(), html.Br(), dbc.Container(UserLoginCard()), Footer(True) ]) else: return html.Div([ html.Br(), html.Br(), html.Br(), dbc.Container(ShareSessionsCard(username), id='share-session-container') ])
def Body(username=None, current_session_pkid=None): if username is None: return html.Div([ html.Br(), html.Br(), dbc.Container(UserLoginCard()), Footer(True) ]) else: return html.Div([ html.Div(id='session-storage-toast-div'), html.Br(), html.Br(), html.Br(), dbc.Container(UserStoredSessionsCard(username, current_session_pkid)), html.Br(), html.Br(), dbc.Container(UserSharedSessionsCard(username, current_session_pkid)) ])
def layout(): return html.Div( html.Div([ html.Div(id='page-twitter-content'), Header(), html.Div( [ html.H2(children='Twitter (hourly updated)', style={ 'textAlign': 'center' }, className='twelve columns') ], className="row" ), # Selectors html.Div([ dcc.RangeSlider( id='a-slider', min=days[0], max=days[-1], step= 24 * 60 * 60 * 1000000000, updatemode='mouseup', #'drag' pushable=True, value=[days[0], days[-1]],# int(max(timestamps) - min(timestamps)) marks={int(datetime.timestamp(date)) * 1000000000: date.strftime("%Y-%m-%d") for date in pd.date_range(min(days), max(days)).tolist()[::30]}, ), ], className='twelve columns'), html.Br(), html.Br(), html.Br(), # Map + table + Histogram html.Div( [ html.Div( [ dcc.Graph(id='a-map-graph', animate=True) ], className = "twelve columns" ), html.H5(children='Number users tweeting', style={ 'textAlign': 'center' }, className='twelve columns'), html.Div([ dcc.Graph( id="line-graph-twitteruser")] , className="twelve columns" ), html.H5(children='Number tweets', style={ 'textAlign': 'center' }, className='twelve columns'), html.Div([ dcc.Graph( id="line-graph-twitteruser2")] , className="twelve columns" ), Footer(), ], className="row" ) ], className='ten columns offset-by-one'))
def Home(session_id, username): return html.Div( [Header(username), NavBar(UrlIndex.HOME.value), Body(), Footer()])
def layout(): return html.Div([ html.Div(id='page-pyramics-content'), html.Div( [ Header(), html.Div([ html.H2(children='Pyramics', style={'textAlign': 'center'}, className='twelve columns') ], className="row"), html.Br(), html.Div( [ dcc.RangeSlider( id='slider', min=min(days), max=max(days), step=1000000000 * 3600 * 24, updatemode='mouseup', #'drag' pushable=True, value=[min(days), max(days)], marks={ int(datetime.timestamp(date)) * 1000000000: date.strftime("%Y-%m-%d") for date in pd.date_range( min(days), max(days)).tolist()[::7] }, ), ], className='twelve columns'), html.Br(), html.Br(), html.Div([ html.Div([ dcc.Dropdown(id='pyramics_name', options=[{ 'label': 'Backhus', 'value': 'Backhus' }, { 'label': 'Bürgerstiftung', 'value': 'Bürgerstiftung' }], value=['Backhus', 'Bürgerstiftung'], multi=True), ], className='twelve columns'), ], ), html.Br(), html.Br(), html.Br(), dcc.Tabs(id="tabs-pyramics", value='tab-3-pyramics', children=[ dcc.Tab(label='Totals and gender', value='tab-3-pyramics', style=tab_style, selected_style=tab_selected_style), dcc.Tab(label='Interactions and views', value='tab-1-pyramics', style=tab_style, selected_style=tab_selected_style), dcc.Tab(label='Dwell and age grouping', value='tab-2-pyramics', style=tab_style, selected_style=tab_selected_style) ]), html.Div(id='tabs-content-pyramics'), Footer() ], className='ten columns offset-by-one'), ])
def layout(): return html.Div( html.Div( [ html.Div(id='page-weather-content'), Header(), html.Div([ html.H2(children='Weather', style={'textAlign': 'center'}, className='twelve columns') ], className="row"), html.Br(), html.Div( [ dcc.RangeSlider( id='slider', min=min(days), max=max(days), step=1000000000 * 3600 * 24, updatemode='mouseup', #'drag' pushable=True, value=[min(days), max(days)], marks={ int(datetime.timestamp(date)) * 1000000000: date.strftime("%Y-%m-%d") for date in pd.date_range( min(days), max(days)).tolist()[::30] }, ), ], className='twelve columns'), html.Br(), html.Br(), html.Br(), # Map + table + Histogram html.Div([ html.Div([ html.H5(children='Weather daily', style={'textAlign': 'center'}, className='twelve columns') ], className="row"), html.Div([ html.Div([ dcc.Dropdown( id='daily', options=[{ 'label': value, 'value': key } for key, value in indicators_daily.items()], value=['fm', 'rsk', 'sdk', 'nm', 'tmk'], multi=True), ], className='twelve columns'), ], ), html.Div([dcc.Graph(id="weather-daily-line-graph")], className="twelve columns"), html.Div([ html.H5(children='Weather hourly', style={'textAlign': 'center'}, className='twelve columns') ], className="row"), html.Div([ html.Div([ dcc.DatePickerRange( id='weather-date-picker', min_date_allowed=datetime(1995, 8, 5), max_date_allowed=datetime(2020, 8, 5), initial_visible_month=datetime(2019, 9, 3), start_date=datetime(2019, 9, 3), end_date=datetime(2019, 9, 10)), ], className='twelve columns'), ], ), html.Div([ html.Div([ dcc.Dropdown(id='hourly', options=[{ 'label': value, 'value': key } for key, value in indicators_hourly.items()], value=['tt_tu'], multi=True), ], className='twelve columns'), ], ), html.Div([dcc.Graph(id="weather-hourly-line-graph")], className="twelve columns"), Footer(), ], className="row") ], className='ten columns offset-by-one'))
def layout(): return html.Div( html.Div( [ html.Div(id='page-motion-content'), Header(), html.Div([ html.H2(children='Tracks', style={'textAlign': 'center'}, className='twelve columns') ], className="row"), # Selectors html.Div([ html.Div([ dcc.Dropdown(id='cam', options=[{ 'label': 'DesignOffices', 'value': 'designOffices' }, { 'label': 'Kirchvorplatz', 'value': 'kirchvorplatz' }, { 'label': 'KreuzungDomplatz', 'value': 'kreuzungDomplatz' }, { 'label': 'Backhus', 'value': 'backhus' }], value=[ 'designOffices', 'kirchvorplatz', 'kreuzungDomplatz' ], multi=True), ], className='six columns'), ], ), # Selectors html.Div( [ html.Div( [ dcc.Dropdown( id='track_class', options=[{ 'label': classes[int(item)], 'value': int(item) } for item in set(df['track_class'].astype( int))], multi=True, value=[ 1, 2, 3, 4, 6, 8 ] #list(set(df['track_class'].astype(int))) ) ], className='six columns', ) ], className='row'), # Selectors html.Div([ html.Div( [ dcc.Dropdown(id='day', options=[{ 'label': item, 'value': item } for item in set(df['day'])], multi=True, value=list(set(df['day']))) ], className='six columns', ) ], ), # Selectors html.Div([ html.Div( [ dcc.Dropdown(id='slice', options=[{ 'label': item, 'value': item } for item in set(df['slice'])], multi=True, value=list(set(df['slice']))) ], className='six columns', ) ], className='row'), html.Br(), html.Div( [ dcc.RangeSlider( id='slider', min=min(seconds), max=max(seconds), step=1000000000 * 60, updatemode='mouseup', #'drag' pushable=True, value=[min(seconds), max(seconds)], marks={ min(seconds): datetime.fromtimestamp( min(seconds) / 1000000000).strftime("%Y-%m-%d %H:%M"), max(seconds): datetime.fromtimestamp( max(seconds) / 1000000000).strftime("%Y-%m-%d %H:%M") }, ), ], className='twelve columns'), html.Br(), html.Br(), html.Div( [ dcc.Slider( id='slider2', min=min(seconds), max=max(seconds), value=min(seconds), marks={ int(timestamp): str(i) + 'min' for i, timestamp in enumerate(seconds[::60]) }, step=1, disabled=False, updatemode='drag', #'drag' ), ], className='twelve columns'), html.Br(), html.Br(), html.Br(), # Map + table + Histogram html.Div( [ html.Div([dcc.Graph(id='bar-graph', )], className='three columns'), html.Div([dcc.Graph(id='map-graph', animate=True)], className="six columns"), html.Div([dcc.Graph(id='bar-graph2', )], className='three columns'), html.Div([dcc.Graph(id="line-graph")], className="twelve columns"), html.Div([dcc.Graph(id="line-graph2")], className="twelve columns"), # html.Div( # [ # dt.DataTable( # id='datatable', # columns=[{"name": i, "id": i} for i in df.columns], # data=df.to_dict(orient='records'), # selected_rows=[],#list(df['index'].astype(int)) ,#[], # editable=False, # filtering=False, # sorting=True, # row_selectable="multi", # sorting_type="multi", # style_cell={'padding': '5px'}, # style_table={ # # 'maxHeight': '700px', # 'border': 'thin lightgrey solid', # 'margin-top': 0 # }, # style_header={ # 'backgroundColor': 'white', # 'fontWeight': 'bold' # }, # style_cell_conditional=[ # { # 'if': {'column_id': c}, # 'textAlign': 'left' # } for c in ['cam', 'time','track_id','track_class'] # ] + [ # { # 'if': {'row_index': 'odd'}, # 'backgroundColor': 'rgb(248, 248, 248)' # } # ] + [ # { # 'if': {'column_id': c}, # 'textAlign': 'left' # } for c in ['Date', 'Region'] # ], # # style_as_list_view=True, # pagination_mode='fe', # pagination_settings={ # "displayed_pages": 1, # "current_page": 0, # "page_size": 18, # }, # navigation="page", # ), # ], # className="twelve columns" # ), Footer(), ], className="row") ], className='ten columns offset-by-one'))
def RigdenLab(session_id, username): return html.Div( [Header(username), NavBar(UrlIndex.RIGDEN.value), Body(), Footer()])
dcc.Graph(id='sensor-map') ]), ]) ], className='row'), html.Div([ html.Div([ html.P('text1'), ], className='four columns'), html.Div([ html.P('text2') ], className='four columns'), html.Div([ html.P('text3') ], className='four columns') ], className='row'), Footer() ], className='ten columns offset-by-one') @app.callback(Output('sensor-map', 'figure'), [Input('sensor-dropdown', 'value')]) def update_map_graph(value): zoom = 12.0 lat_init = 29.761993 lon_init = -95.366302 traces = [] trace = dict( type='scattermapbox', lat=lat_init, lon=lon_init, text='Sensor Locations',