Exemple #1
0
def Contact(session_id, username):
    return html.Div([
        Header(username),
        NavBar(UrlIndex.CONTACT.value),
        Body(),
        Footer(True)
    ])
def exposure_summary_page(exposure):
    page = html.Div([
        Header(),
        html.Div([
            HalfRowCard("TIV by State",
                        Table(exposure.tiv_by_state(), display_header=True)),
            HalfRowCard("TIV by State",
                        TIVBarGraph(exposure.tiv_by_state(), "State"))
        ],
                 className="row "),
        html.Div([
            HalfRowCard(
                "TIV by Occupancy",
                Table(exposure.tiv_by_occupancy(), display_header=True)),
            HalfRowCard("TIV by Occupancy",
                        TIVBarGraph(exposure.tiv_by_occupancy(), "Occupancy"))
        ],
                 className="row "),
        html.Div([
            HalfRowCard(
                "TIV by State",
                Table(exposure.tiv_by_construction(), display_header=True)),
            HalfRowCard(
                "TIV by State",
                TIVBarGraph(exposure.tiv_by_construction(), "Construction"))
        ],
                 className="row "),
    ],
                    className="container")
    return page
def ChangeUserPassword(username=None):
    return html.Div([
        Header(username),
        NavBar(),
        Body(username),
        Footer(True)
    ])
def username_in_layout(id):
    oauth_token = flask.request.cookies['plotly_oauth_token']
    base_url = 'https://plotly.charleyferrari.com/v2'
    endpoint = '/users/current'
    headers = {
        'plotly-client-platform': 'dash-auth',
        'content-type': 'application/json',
        'Authorization': 'Bearer {}'.format(oauth_token)
    }
    r = requests.get(url=base_url + endpoint, headers=headers, verify=False)
    username = r.json()['username']
    return html.Div(className='container',
                    children=[
                        Header('Hello {}'.format(username)),
                        Row([
                            Column(width=4,
                                   children=[
                                       dcc.Dropdown(
                                           id='dropdown',
                                           options=[{
                                               'label': i,
                                               'value': i
                                           } for i in ['LA', 'NYC', 'MTL']],
                                           value='LA')
                                   ]),
                            Column(width=8, children=[dcc.Graph(id='graph')])
                        ])
                    ])
Exemple #5
0
def CreateUser(username=None):
    return html.Div([
        Header(username),
        NavBar(),
        html.Br(),
        html.Br(),
        html.Br(),
        dbc.Container(CreateUserCard()),
    ])
Exemple #6
0
def UsersPortal(username=None):
    return html.Div([
        Header(username),
        NavBar(),
        html.Br(),
        html.Br(),
        html.Br(),
        dbc.Container(UserPortalCard(username)),
        Footer(True)
    ])
Exemple #7
0
def noPage(url, username):
    layout = html.Div([
        Header(username),
        NavBar(),
        html.Br(),
        html.Br(),
        html.Br(),
        dbc.Container(NoPageFoundCard(url)),
    ],
                      className="no-page")
    return layout
Exemple #8
0
def overview_page(summary, company_facts, key_losses):

    page = html.Div([
        Header(),
        html.Div([
            HalfRowCard("Summary", TextArea(summary, "summary")),
            HalfRowCard("Key Info", Table(company_facts))
        ],
                 className="row"),
        html.Div([
            FullRowCard("Key Losses", Table(key_losses, display_header=True))
        ],
                 className="row")
    ],
                    className="container")

    return page
def ep_curve_page(ep_curves):
    page = html.Div([
        Header(),
        
        html.Div([
            HalfRowCard("EP all peril", Table(ep_curves.get_ep_curves(['netprecat'], ['ALL'], ['AEP', 'OEP']), display_header=True)),
            HalfRowCard("EP all peril", EPGraph(ep_curves.get_ep_curves(['netprecat'], ['ALL'], ['AEP', 'OEP'])))
        ], className="row "),

        html.Div([
            HalfRowCard("EP Windstorm", Table(ep_curves.get_ep_curves(['netprecat'], ['Windstorm'], ['AEP', 'OEP']), display_header=True)),
            HalfRowCard("EP Windstorm", EPGraph(ep_curves.get_ep_curves(['netprecat'], ['Windstorm'], ['AEP', 'OEP'])))
        ], className="row "),

        html.Div([
            HalfRowCard("EP Earthquake", Table(ep_curves.get_ep_curves(['netprecat'], ['Earthquake'], ['AEP', 'OEP']), display_header=True)),
            HalfRowCard("EP Earthquake", EPGraph(ep_curves.get_ep_curves(['netprecat'], ['Earthquake'], ['AEP', 'OEP'])))
        ], className="row "),

        ], className="container")
    return page
Exemple #10
0
def Home(session_id, username):
    return html.Div([
        Header(username),
        NavBar(UrlIndex.HOME.value),
        Body(),
    ])
Exemple #11
0
#                          params=('%' + term + '%',))

print("Head of plot_df after formatting is : ", plot_df.head())
print("Head of original df after formatting is : ", df.head())
print("plot_df shape is: ", plot_df.shape)
print("original df shape is: ", df.shape)
current_year = plot_df['Date'].max().year

######################## START Line chart Layout ########################

sentiment_line_graph_layout = html.Div(
    [
        html.Div(
            [
                # CC Header
                Header.Header(),
                # Date Picker
                html.Div(
                    [
                        dcc.DatePickerRange(
                            id='my-date-picker-range-birst-category',
                            # with_portal=True,
                            min_date_allowed=(
                                plot_df['Date'].min() - timedelta(6)
                            ).to_pydatetime(),  #dt(2018, 1, 1),
                            max_date_allowed=plot_df['Date'].max().
                            to_pydatetime(),
                            initial_visible_month=dt(
                                current_year,
                                plot_df['Date'].max().to_pydatetime().month,
                                1),
Exemple #12
0
import pyodbc

from components import Column, Header, Row
import config
from auth import auth
from utils import StaticUrlPath

app = dash.Dash(__name__, )
auth(app)

server = app.server  # Expose the server variable for deployments

# Standard Dash app code below
app.layout = html.Div(className='container',
                      children=[
                          Header('pyodbc Sample App'),
                          Row([
                              Column(width=4,
                                     children=[
                                         dcc.Dropdown(
                                             id='dropdown',
                                             options=[{
                                                 'label': i,
                                                 'value': i
                                             } for i in ['LA', 'NYC', 'MTL']],
                                             value='LA')
                                     ]),
                              Column(width=8, children=[dcc.Graph(id='graph')])
                          ])
                      ])
    header=None,
)

df2 = pd.read_csv("worldcities too full version without altitude.csv")
df3 = df.merge(df2, left_on="name", right_on="city_ascii",
               how="left").dropna(subset=["name"])
print(df3.head(10))
df = df3
df.population = df.population.fillna(1)

df.astype({"elevation": int})

app.layout = html.Div(
    className="container",
    children=[
        Header("Noah's Ark", app),
        html.Div(
            id="main_row",
            children=[
                html.Div(
                    id="controls",
                    className="card",
                    children=[
                        html.P(
                            id="rate_text",
                            className="control_label",
                            children="Rate of sea level rise",
                        ),
                        dcc.Slider(
                            id="rate_slider",
                            min=0.001,
Exemple #14
0
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from components import Column, Header, Row
from app import app
from layouts import main

layout = html.Div(children=[
    dcc.Location(id='url-frontier', refresh=False),
    html.Div(id='main-header', children=[Header('', app)]),
    html.Div(
        id='app-page-content',
        children=[html.Div(id='frontier-page-content', className='app-body')])
])


@app.callback(Output('frontier-page-content', 'children'),
              [Input('url-frontier', 'pathname')])
def display_page(pathname):
    if pathname == '/not-so-super/not-so-super':
        return main.layout
Exemple #15
0
for i in range(3):
    words.append(stack.pop())

app = dash.Dash(
    __name__,
    # Serve any files that are available in the `static` folder
    static_folder='static'
)
auth(app)

server = app.server  # Expose the server variable for deployments

# Standard Dash app code below
app.layout = html.Div(className='container', children=[

    Header(' '.join(words)),

    Row([
        Column(width=4, children=[
            dcc.Dropdown(
                id='dropdown',
                options=[{'label': i, 'value': i} for i in ['LA', 'NYC', 'MTL']],
                value='LA'
            )
        ]),
        Column(width=8, children=[
            dcc.Graph(id='graph')
        ])
    ]),
])
Exemple #16
0
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'))
Exemple #17
0
def RigdenLab(session_id, username):
    return html.Div(
        [Header(username),
         NavBar(UrlIndex.RIGDEN.value),
         Body(),
         Footer()])
Exemple #18
0
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from components import Column, Header, Row
from app import app
from layouts import main

layout = html.Div(children=[
    dcc.Location(id='url-aist', refresh=False),
    html.Div(id='main-header',
             children=[
                 Header('',
                        app,
                        bg_color="#fff",
                        font_color="#F3F6FA",
                        logo="aist.svg",
                        home_address="https://www.aist.asn.au/")
             ]),
    html.Div(id='app-page-content',
             children=[html.Div(id='aist-page-content', className='app-body')])
])


@app.callback(Output('aist-page-content', 'children'),
              [Input('url-aist', 'pathname')])
def display_page(pathname):
    if pathname == '/not-so-super/aist-not-so-super':
        return main.layout
Exemple #19
0
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 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'),
    ])
Exemple #21
0
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'))
  'Bookings - Last Year': 'Bookings - LY',
  'Revenue - This Year': 'Revenue - TY',
  'Revenue - Last Year': 'Revenue - LY',
  }, inplace=True)

######################## Home Page ########################
homePage = html.Div([
    ## CC Header
    html.P(["4Home Page"])
], className="no-page")

######################## START Birst Category Layout ########################
layout_birst_category =  html.Div([
    html.Div([
              ## CC Header
              Header()
             ], className="subpage")

    ], className="page")

######################## END Birst Category Layout ########################

######################## 404 Page ########################
noPage = html.Div([
    ## CC Header
    html.P(["404 Page not found"])
], className="no-page")

######################## START GA Category Layout ########################
layout_ga_category =  html.Div([
    html.Div([
Exemple #23
0
def UserStorage(username=None, current_session_pkid=None):
    return html.Div([
        Header(username),
        NavBar(),
        Body(username, current_session_pkid)
    ])
Exemple #24
0
specific_entities = pickle.load(
    open("./assets/data_specific_entities_by_tag.pkl", "rb"))
doc_similarities = pickle.load(open("./assets/data_doc_similarities.pkl",
                                    "rb"))
# Word
vocabulary = list(id_mapping.keys())[308:]
remaining_persons = pickle.load(
    open('./assets/data_remaining_persons.pkl', 'rb'))
remaining_places = pickle.load(open('./assets/data_remaining_places.pkl',
                                    'rb'))
cos_sim_matrix = pd.read_pickle("./assets/data_cosine_similarity_matrix.pkl")

overview = html.Div(
    id="body1",
    children=[
        Header("overview"),
        html.Div(id="ColumnBlockOverview",
                 children=[
                     Scatter(overview_tsne),
                     BarOverview(overview_persons),
                     html.Div(id="tableHeadline",
                              children=[html.H4(["Collection of Books"])]),
                     Table(author_data[["Title", "Author",
                                        "Publishing Date"]]),
                 ]),
        html.Div(id="MapBlock", children=[Map(overview_places)])
    ])

book = html.Div(
    id="body1",
    children=[
def PostgresConnectionError():
    return html.Div([
        Header(),
        NavBar(UrlIndex.SESSION_TIMEOUT.value),
        Body(),
    ])
Exemple #26
0
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html

from components import Column, Header, Row

app = dash.Dash(__name__)

server = app.server  # Expose the server variable for deployments

# Standard Dash app code below
app.layout = html.Div(className='container',
                      children=[
                          Header('Sample App'),
                          Row([
                              Column(width=4,
                                     children=[
                                         dcc.Dropdown(
                                             id='dropdown',
                                             options=[{
                                                 'label': i,
                                                 'value': i
                                             } for i in ['LA', 'NYC', 'MTL']],
                                             value='LA')
                                     ]),
                              Column(width=8, children=[dcc.Graph(id='graph')])
                          ])
                      ])

bartender_summary = ['PrinterName', 'Total', 'LastUsed']
bartender_summary2 = ['Name', 'Total', 'LastUsed']
bartender_table = [
    'PrinterName', 'Name', 'TotalLabels', 'Print Time', 'Server'
]

bt_df = bt_df.append(bt_df_controlled)

######################## START BarTender Category Layout ########################
layout_BarTender = html.Div(
    [
        html.Div(
            [
                # CC Header
                Header(),
                # Date Picker
                html.Div(children='''
    Pick a Start/End Date
    '''),
                html.Div([
                    dcc.DatePickerRange(
                        id='my-date-picker-range-bartender',
                        with_portal=True,
                        min_date_allowed=dt(2018, 1, 1),
                        max_date_allowed=bt_df['CreatedDateTime'].max().
                        to_pydatetime(),
                        initial_visible_month=dt(
                            bt_df['CreatedDateTime'].max().to_pydatetime().
                            year, bt_df['CreatedDateTime'].max().to_pydatetime(
                            ).month, 1),
Exemple #28
0

def get_top_topics(mixture, k=5):
    top_topics = mixture.argsort()[:-k - 1:-1]
    return list(top_topics), list(mixture[top_topics])


# Start layout
app = dash.Dash(__name__)
server = app.server  # Expose the server variable for deployments

# Standard Dash app code below
app.layout = html.Div(
    className='container',
    children=[
        Header('Arxiv Assistant', app),
        Row([
            dcc.Input(id='input-url',
                      placeholder='Enter URL...',
                      type='text',
                      value='',
                      style={
                          'width': '80%',
                          'margin-right': '20px'
                      }),
            html.Button('Submit', id='button-update')
        ]),
        Row([
            Column(width=6,
                   children=[
                       dcc.Markdown(id='markdown-article', style=card_style()),
Exemple #29
0
# print(df['date'])
current_year = df['date'].dt.year
df['month'] = df['date'].dt.month
# print(current_year)

dt_columns = ['Threads', 'Flow Name', 'Diag', 'Fail Count']

######################## START First Category Layout ########################
layout_conf_fail_category = html.Div(
    [

        #    print_button(),
        html.Div(
            [
                # CC Header
                Header(),
                # Drop Down menu
                # Date Picker
                html.Div(
                    [
                        html.Div(
                            [
                                dcc.Dropdown(
                                    id='my-project-picker-list',
                                    options=[{
                                        'label': proj,
                                        'value': proj
                                    } for proj in available_project],
                                    value='INSB',
                                    placeholder="Select a project"
                                    # value='TimbuktuMPNX',
Exemple #30
0
def dynamic_page():
    return html.Div(
        [
            Header(),
            html.Div(
                [
                    html.Div(
                        [
                            dcc.Dropdown(
                                id='uploaded-datasets',
                                options=[{
                                    'label': i,
                                    'value': i
                                } for i in get_csv_files(DATA_FOLDER)],
                                placeholder='Select a Dataset',
                            )
                        ],
                        style={
                            'width': '220px',
                            'display': 'inline-block',
                            'margin-left': '25px',
                        }),
                    html.Div([
                        dcc.Upload(
                            id='upload-data',
                            children=html.Div(
                                [
                                    html.Button(' Upload ',
                                                className='fa fa-upload')
                                ],
                                style={
                                    'backgroundColor': 'green',
                                    'color': 'white',
                                    'margin-left': '5px',
                                }),
                            multiple=False),
                    ]),
                    html.Div(
                        [
                            dcc.Input(placeholder='Enter the Min Support',
                                      type='text',
                                      value='',
                                      id='MSupport')
                        ],
                        style={
                            'width': '200',
                            'display': 'inline-block',
                            'margin-left': '5px',
                        }),
                    html.Div(
                        [
                            dcc.Input(
                                placeholder='Enter the Allowed Violations',
                                type='text',
                                value='',
                                id='Delta')
                        ],
                        style={
                            'width': '200',
                            'display': 'inline-block',
                            'margin-left': '5px',
                        }),
                    html.Div(
                        [
                            dcc.Input(placeholder='Enter the Min. Coverage',
                                      type='text',
                                      value='',
                                      id='Coverage')
                        ],
                        style={
                            'width': '200px',
                            'display': 'inline-block',
                            'margin-left': '5px',
                        }),
                    html.Button('PFD Discovery',
                                className='fa',
                                id='button',
                                style={
                                    'backgroundColor': 'green',
                                    'color': 'white',
                                    'width': '200',
                                    'flow': 'right',
                                    'margin-left': '15px',
                                }),
                ],
                className="row",
                style={
                    'width': '100%',
                    'height': '50px',
                    'borderWidth': '1px',
                    'borderRadius': '5px',
                    'textAlign': 'center',
                    'margin-left': '25px',
                    'margin-top': '10px',
                }),
            html.Div(id='output-data-upload'),
            html.Div(id='output-data-dropdown',
                     style={
                         'width': '100%',
                         'height': '440px',
                         'borderWidth': '1px',
                         'borderRadius': '5px',
                         'textAlign': 'center',
                         'margin-left': '50px',
                         'margin-right': '25px',
                         'overflowY': 'scroll',
                     }),
            html.Hr(),  # horizontal line
            html.Div(id='output-results',
                     style={
                         'width': '100%',
                         'height': '200px',
                         'borderWidth': '1px',
                         'borderRadius': '5px',
                         'textAlign': 'left',
                         'margin-left': '25px',
                         'margin-right': '25px',
                         'margin-top': '40px'
                     }),
            # Footer()
        ],
        className='body')