Exemple #1
0
navbar = dbc.NavbarSimple(
    brand="My Awesome Brand",
    brand_href='/',
    children=[
        dbc.NavItem(dcc.Link("Page 1", href="/page1", className="nav-link")),
        dbc.NavItem(dcc.Link("Page 2", href="/page2", className="nav-link")),
        dbc.NavItem(dcc.Link("Hollaback", href="/holla", className="nav-link"))
    ],
    sticky="top")

footer = dbc.Container(
    dbc.Row(
        dbc.Col(
            html.P([
                html.Span("I am awesome", className="mr-2 text-muted small"),
                html.A(html.I(className="fa-envelope mr-1"),
                       href="mailto:[email protected]"),
                html.A(html.I(className="fa-github mr-1"),
                       href="http://www.google.com"),
                html.A(html.I(className="fa-linkedin mr-1"),
                       href="http://www.google.com"),
                html.A(html.I(className="fa-twitter mr-1"),
                       href="http://www.google.com")
            ],
                   className="lead"))))

# Establish layout
app.layout = html.Div([
    dcc.Location(id='url', refresh=False), navbar,
    dbc.Container(id="page-content", className='mt-2'),
    html.Hr(), footer
])
                        )
                    ])
            ]),
        html.Div(id='my-footer',
                 style={
                     'marginLeft': '1.5%',
                     'marginRight': '1.5%'
                 },
                 children=[
                     html.P(style={
                         'textAlign': 'center',
                         'margin': 'auto'
                     },
                            children=[
                                " 🙏 God Bless the World 🙏 |", " Developed by ",
                                html.A('Jun', href='https://junye0798.com/'),
                                " with ❤️ in Sydney"
                            ])
                 ]),
    ])


@app.callback(Output('datatable-interact-map', 'figure'), [
    Input('datatable-interact-location', 'derived_virtual_selected_rows'),
    Input('datatable-interact-location', 'selected_row_ids')
])
def update_figures(derived_virtual_selected_rows, selected_row_ids):
    # When the table is first rendered, `derived_virtual_data` and
    # `derived_virtual_selected_rows` will be `None`. This is due to an
    # idiosyncracy in Dash (unsupplied properties are always None and Dash
    # calls the dependent callbacks when the component is first rendered).
def extract_entities_results_html(text, normalize):
    """
    Get an html block of the results for an entity extraction.

    Args:
        text (str): The abstract text to extract entities from.
        normalize (bool): Whether to normalize the entities or not.

    Returns:
        (dash_html_components.Div): The html block for the entity extraction
            results.
    """
    try:
        result = rester.get_ner_tags(text,
                                     concatenate=True,
                                     normalize=normalize)
    except MatScholarRestError:
        rester_error_txt = RESTER_ERROR_TEXT
        return common_rester_error_html(rester_error_txt)
    tagged_doc = result["tags"]
    relevance = result["relevance"]
    highlighted = highlight_entities_html(tagged_doc)

    # Add the warning
    if not relevance:
        warning_header_txt = "Warning! Abstract not relevant."
        warning_body_txt = (
            "Our classifier has flagged this document as not relevant to "
            "inorganic materials science. Expect lower than optimum "
            "performance.")
        warning = common_warning_html(warning_header_txt, warning_body_txt,
                                      "is-fullwidth")
    else:
        warning = html.Div("")

    # Update download link
    doc = {"sentences": []}
    for sent in tagged_doc:
        new_sent = []
        for token, tag in sent:
            new_sent.append({"token": token, "tag": tag})
        doc["sentences"].append(new_sent)
    json_string = json.dumps(doc)
    json_string = "data:text/csv;charset=utf-8," + urllib.parse.quote(
        json_string)
    download_link = html.A(
        "Download entities as json",
        id="entity-download-link",
        href=json_string,
        download="tagged_docs.json",
        target="_blank",
    )
    download_container = html.Div(
        download_link, className="has-text-size-4 has-margin-top 10")

    label = html.Label("Extracted Entity Tags:")
    label_container = html.Div(label, className="is-size-4 has-margin-top-30")

    highlighted_container = html.Div(highlighted)

    label_label = html.Label("Labels:")
    label_label_container = html.Div(label_label,
                                     className="is-size-4 has-margin-top-30")

    entity_colormap_key = copy.deepcopy(entity_color_map_extended)
    entities_keys = []
    for e, color in entity_colormap_key.items():
        # don't need the "other" label
        if e == "other":
            continue
        entity_key = html.Div(
            e,
            className=f"is-size-4 msweb-is-{color}-txt has-text-weight-bold")
        entity_key_container = html.Div(
            entity_key, className="flex-column is-narrow has-margin-5 box")
        entities_keys.append(entity_key_container)

    entity_key_container = html.Div(
        entities_keys, className="columns is-multiline has-margin-5")

    results = html.Div([
        warning,
        label_container,
        highlighted_container,
        label_label_container,
        entity_key_container,
        download_container,
    ])
    return results
Exemple #4
0
    block=True,
    id="button-adjust",
    size="lg",
)

logo_alliance = "http://alliancefrancophonepourlasantementaleperinatale.com/wp-content/uploads/2020/03/cropped-cropped-cropped-alliance-francaise-AFSMP-2-1-300x246.png"

navbar = dbc.Navbar(
    [
        html.A(
            dbc.Row(
                [
                    dbc.Col(html.Img(src=logo_alliance, height="70px")),
                    dbc.Col(dbc.NavbarBrand("Outil Psypérinathon")),
                ],
                align="center",
                no_gutters=False,
            ),
            href="http://alliance-psyperinat.org/",
            target="_blank",
            style={"float": "left"},
        ),
        html.A(
            "Alliance francophone pour la santé mentale périnatale",
            href="http://alliance-psyperinat.org/",
            target="_blank",
            style={
                "margin-left": "auto",
                "margin-right": "0",
                "color": "black"
            },
bathroom.layout = html.Div(
    style={
        "background-image": "url('assets/images/header.png')",
        "background-repeat": "no-repeat",
        "background-size": "100%"
    },
    children=[
        dcc.Interval(
            id="interval-component",
            interval=5 * 1000,
            n_intervals=0  # in milliseconds
        ),
        html.P(children=[
            html.Div(children=[
                html.A(children="Гостиная",
                       className="link",
                       href="http://127.0.0.1:8050/")
            ],
                     className="another_rooms first_room"),
            html.Div(children=[
                html.A(children="Спальня",
                       className="link",
                       href="http://127.0.0.2:8050/")
            ],
                     className="another_rooms"),
            html.Div(children=[
                html.A(children="Кухня",
                       className="link",
                       href="http://127.0.0.3:8050/")
            ],
                     className="another_rooms"),
Exemple #6
0
     html.Div(style={'width': '50em'}),
     html.H4('FINANCIAL IMPACT OF COVID-19',
             style={
                 'text-transform': 'uppercase',
                 'margin-top': '20px',
                 'letter-spacing': '3px',
                 'color': 'rgb(87, 88, 90)',
                 'font-weight': 'bolder'
             })
 ],
         style={'box-shadow': '0 5px 10px 0 rgba(50,50,50,.33)'}),
 dbc.Row([
     dbc.Col([
         dbc.Row([
             html.A([html.Div('CORONAVIRUS IMPACT')],
                    href='/finance',
                    className="sousOnglet"),
         ]),
         dbc.Row([
             html.A([
                 html.Div('RECESSIONS COMPARISON'),
                 html.Div(className='encoche',
                          style={
                              'top': '213px',
                              'margin-top': '0px'
                          })
             ],
                    href='/finance/compare',
                    className="sousOngletActived")
         ]),
     ],
Exemple #7
0
def inspector_line(study_agent, scenario):
    new_episode = make_episode(study_agent, scenario)
    cols, data = get_table(new_episode)
    figures_distribution = action_distrubtion(new_episode)

    return html.Div(
        className="lineBlock card ",
        children=[
            html.H4("Inspector For Study Agent",
                    style={'margin-left': '-50px'}),
            html.Div(
                className="card-body col row",
                children=[
                    html.Div(
                        className="col",
                        children=[
                            dt.DataTable(id="inspector_datable",
                                         columns=cols,
                                         data=data,
                                         filter_action="native",
                                         sort_action="native",
                                         sort_mode="multi",
                                         page_action="native",
                                         page_current=0,
                                         page_size=20,
                                         style_table={
                                             'overflow': 'auto',
                                             'width': '100%',
                                             'max-width': '100%',
                                             'height': '200px'
                                         }),
                            html.Label(children=[
                                'The documentation for the filtering syntax can be found ',
                                html.A(
                                    'here.',
                                    href=
                                    'https://dash.plot.ly/datatable/filtering',
                                    target="_blank")
                            ]),
                        ]),
                    html.Div(
                        className="col-12 row",
                        children=[
                            html.Div(
                                className="col",
                                children=[
                                    html.
                                    P(id="tooltip_table",
                                      className="more-info-table",
                                      children=[
                                          "Click on a row to have more info on the action"
                                      ])
                                ])
                        ]),
                    html.Div(
                        className="col-12 row",
                        children=[
                            html.Div(
                                className="col",
                                children=[
                                    html.H6(
                                        className="text-center",
                                        children=
                                        "Distribution of Substation action"),
                                    dcc.Graph(
                                        id=
                                        "distribution_substation_action_chart",
                                        figure=figures_distribution.on_subs)
                                ]),
                            html.Div(
                                className="col",
                                children=[
                                    html.
                                    H6(className="text-center",
                                       children="Distribution of line action"),
                                    dcc.Graph(
                                        id="distribution_line_action_chart",
                                        figure=figures_distribution.on_lines)
                                ]),
                        ]),
                ])
        ])
Exemple #8
0
import dash_html_components as html
import dash_bootstrap_components as dbc

layout = html.Div(
    className='d-flex flex-row align-items-center',
    style=dict(minHeight='88vh'),
    children=dbc.Container([
        dbc.Row(
            className='justify-content-center',
            children=dbc.Col(
                md=12,
                className='text-center',
                children=[
                    html.
                    I(className='fas fa-cog fa-9x text-logo animation-rotate'),
                    html.Div(className='mb-2 mt-3 display-5',
                             children='Página en construcción'),
                    html.A(href='/', children='Volver al inicio')
                ])),
    ]))
Exemple #9
0
    ],
             className='panel is-warning simPanel media-simPanel',
             id='similarPanel',
             style={'display': 'none'}),
    html.Div(id='hiddenParams', style={'display': 'none'}),
    dcc.Loading([],
                id='waitUserWC',
                type='cube',
                style={
                    'height': '60vh',
                    'marginTop': '10rem'
                }),
    info_analyse.layout,
    html.Div([
        '未查询到用户,请先进行',
        html.A('爬取', href='/crawling'),
    ],
             className='notification is-danger is-light nosearch',
             id='nosearch',
             style={'display': 'none'}),
    html.Div([
        html.Div(id='analyseResult1'),
        html.Div(id='analyseResult2'),
        html.Div(id='analyseResult3'),
        html.Div(id='analyseResult4'),
        html.Div(id='analyseResult5'),
    ],
             id='analyseResult'),
    visdcc.Run_js(id='similarScript'),
    visdcc.Run_js(id='addlistenScript'),
])
Exemple #10
0
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

from app import app
from apps import home, app1, app2, app3, app4

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    #head
    html.Div(
        className="bare-container top",
        children=[
            html.A(
                href="/",
                children=[
                    #html.Img(src = "./assets/logo.png")
                    html.H1("Keine Zeit", className="header")
                ]),
            dcc.Link("Worte", href="/worte"),
            "|",
            dcc.Link("Autoren", href="/autoren"),
            "|",
            dcc.Link("Karten", href="/karten"),
            "|",
            dcc.Link("Über", href="/about"),
            "|",
        ]),

    #content
    html.Div(id='page-content'),
Exemple #11
0
				html.H4('Untagged tweets'),

				html.Div([
				dt.DataTable(
					rows=untaggedTweets.to_dict('records'),
					# optional - sets the order of columns
					columns=untaggedTweets.columns,
					filterable=True,
					sortable=True,
					id='datatable'
			   )],style={"margin-top": "10px","margin-bottom": "10px"}),

				html.Div([
					html.Hr(),
					html.P("Savitr - Disaster Mapping using Twitter", style={'text-align':'center'}),
					html.A('Scroll to top', href='/#'),
					html.Div([
						html.A('Source code and documentation', target='_blank', href='https://github.com/AvijitGhosh82/Savitr-Python'),
					], style={"float": "right"}),
					html.Hr(),
                ]),

			], className="graph twelve coluns"),
		], style={'margin': 'auto auto'}),
	], className="graphSlider ten columns offset-by-one"),
], style={"padding-top": "20px"})


def getValue(value):
	val = {
		'Sept': 30,
Exemple #12
0
def update_layout():
    df_ind = get_df_ind()
    last_ddl_time = get_last_ddl_time()
    df_chart_createdbytype = get_df_chart_createdbytype(df_ind)
    df_chart_createdbytype_all = get_df_chart_createdbytype_all(df_ind)
    df_chart_jobtype = get_df_chart_jobtype(df_ind)
    df_chart_jobtype_all = get_df_chart_jobtype_all(df_ind)
    df_created_by_type = get_df_created_by_type(df_ind)
    df_job_type = get_df_job_type(df_ind)
    df_table = get_df_table(df_ind)
    df_table_2 = get_df_table_2(df_ind)
    df_table_3 = get_df_table_3(df_ind)

    return html.Div([
        html.H1('Submittal Type', style={'text-align': 'center'}),
        html.H2('(Business Licenses)',
                style={
                    'text-align': 'center',
                    'margin-bottom': '20px'
                }),
        html.P(f"Data last updated {last_ddl_time}",
               style={
                   'text-align': 'center',
                   'margin-bottom': '50px'
               }),
        html.Div([
            html.Div([
                dcc.Graph(
                    id='slide4BL-createdbytype-chart',
                    config={'displayModeBar': False},
                    figure=go.Figure(data=[
                        go.Scatter(
                            x=df_chart_createdbytype_all['ISSUEDATE'],
                            y=df_chart_createdbytype_all['JOBNUMBERCOUNT'],
                            name='All',
                            mode='lines',
                            text=df_chart_createdbytype_all['DateText'],
                            hoverinfo='y',
                            line=dict(shape='spline', color='#000000')),
                        go.Scatter(x=df_chart_createdbytype.loc[
                            df_chart_createdbytype['CREATEDBYTYPE'] ==
                            'Online']['ISSUEDATE'],
                                   y=df_chart_createdbytype.loc[
                                       df_chart_createdbytype['CREATEDBYTYPE']
                                       == 'Online']['JOBNUMBERCOUNT'],
                                   name='Online',
                                   mode='lines',
                                   text=df_chart_createdbytype.loc[
                                       df_chart_createdbytype['CREATEDBYTYPE']
                                       == 'Online']['DateText'],
                                   hoverinfo='y',
                                   line=dict(shape='spline', color='#399327')),
                        go.Scatter(x=df_chart_createdbytype.loc[
                            df_chart_createdbytype['CREATEDBYTYPE'] == 'Staff']
                                   ['ISSUEDATE'],
                                   y=df_chart_createdbytype.loc[
                                       df_chart_createdbytype['CREATEDBYTYPE']
                                       == 'Staff']['JOBNUMBERCOUNT'],
                                   name='Staff',
                                   mode='lines',
                                   text=df_chart_createdbytype.loc[
                                       df_chart_createdbytype['CREATEDBYTYPE']
                                       == 'Staff']['DateText'],
                                   hoverinfo='text+y',
                                   line=dict(shape='spline', color='#642692'))
                    ],
                                     layout=go.Layout(
                                         title=(
                                             'Jobs Completed by Submittal Type'
                                         ),
                                         yaxis=dict(title='Jobs Completed')))),
            ],
                     className='eight columns'),
            html.Div([
                dcc.Graph(
                    id='slide4BL-createdbytype-piechart',
                    figure=go.Figure(data=[
                        go.Pie(
                            labels=df_created_by_type.index,
                            values=df_created_by_type.values,
                            hoverinfo='label+value+percent',
                            hole=0.4,
                            textfont=dict(color='#FFFFFF'),
                            marker=dict(colors=['#399327', '#642692'],
                                        line=dict(color='#000000',
                                                  width=2)),
                        )
                    ],
                                     layout=go.Layout(title=(
                                         '2018 Submittal Type Breakdown'))))
            ],
                     className='four columns')
        ],
                 className='dashrow'),
        html.Div([
            html.Div([
                dcc.Graph(
                    id='slide4BL-jobtype-chart',
                    figure=go.Figure(data=[
                        go.Scatter(x=df_chart_jobtype_all['ISSUEDATE'],
                                   y=df_chart_jobtype_all['JOBNUMBERCOUNT'],
                                   name='All',
                                   mode='lines',
                                   text=df_chart_jobtype_all['DateText'],
                                   hoverinfo='y',
                                   line=dict(shape='spline', color='#000000')),
                        go.Scatter(
                            x=df_chart_jobtype.loc[df_chart_jobtype['JOBTYPE']
                                                   == 'Renewal']['ISSUEDATE'],
                            y=df_chart_jobtype.loc[df_chart_jobtype['JOBTYPE']
                                                   == 'Renewal']
                            ['JOBNUMBERCOUNT'],
                            name='Renewal',
                            mode='lines',
                            text=df_chart_jobtype.loc[
                                df_chart_jobtype['JOBTYPE'] ==
                                'Renewal']['DateText'],
                            hoverinfo='y',
                            line=dict(shape='spline', color='#4153f4')),
                        go.Scatter(x=df_chart_jobtype.loc[
                            df_chart_jobtype['JOBTYPE'] == 'Application']
                                   ['ISSUEDATE'],
                                   y=df_chart_jobtype.loc[
                                       df_chart_jobtype['JOBTYPE'] ==
                                       'Application']['JOBNUMBERCOUNT'],
                                   name='Application',
                                   mode='lines',
                                   text=df_chart_jobtype.loc[
                                       df_chart_jobtype['JOBTYPE'] ==
                                       'Application']['DateText'],
                                   hoverinfo='text+y',
                                   line=dict(shape='spline', color='#f4424b'))
                    ],
                                     layout=go.Layout(
                                         title=('Jobs Completed by Job Type'),
                                         yaxis=dict(title='Jobs Completed'))))
            ],
                     className='eight columns'),
            html.Div([
                dcc.Graph(id='slide4BL-jobtype-piechart',
                          figure=go.Figure(data=[
                              go.Pie(labels=df_job_type.index,
                                     values=df_job_type.values,
                                     hoverinfo='label+value+percent',
                                     hole=0.4,
                                     textfont=dict(color='#FFFFFF'),
                                     marker=dict(colors=['#f4424b', '#4153f4'],
                                                 line=dict(color='#000000',
                                                           width=2)))
                          ],
                                           layout=go.Layout(title=(
                                               '2018 Job Type Breakdown'))))
            ],
                     className='four columns')
        ],
                 className='dashrow'),
        html.Div(
            [
                html.H3('Jobs Completed from January to July',
                        style={'text-align': 'center'}),
                html.Div([
                    dt.DataTable(rows=df_table_3.to_dict('records'),
                                 columns=df_table_3.columns,
                                 editable=False,
                                 id='slide4-BL-table-3')
                ],
                         style={'text-align': 'center'})
            ],
            style={
                'width': '40%',
                'margin-left': 'auto',
                'margin-right': 'auto',
                'margin-top': '45px',
                'margin-bottom': '45px'
            }),
        html.Div(
            [
                html.
                H3('Percent of Online Transactions Which Were Renewals (2018)',
                   style={'text-align': 'center'}),
                html.Div([
                    dt.DataTable(rows=df_table_2.to_dict('records'),
                                 columns=df_table_2.columns,
                                 editable=False,
                                 id='slide4-BL-table-2')
                ],
                         style={'text-align': 'center'})
            ],
            style={
                'width': '40%',
                'margin-left': 'auto',
                'margin-right': 'auto',
                'margin-top': '45px',
                'margin-bottom': '45px'
            }),
        html.Div(
            [
                html.
                H3('Jobs Completed by Month, License Type, and Submittal Type',
                   style={'text-align': 'center'}),
                html.Div([
                    html.Div([
                        dt.DataTable(rows=df_table.to_dict('records'),
                                     columns=df_table.columns,
                                     filterable=True,
                                     sortable=True,
                                     editable=False,
                                     id='slide4-BL-table-1')
                    ],
                             style={'text-align': 'center'})
                ]),
                html.Div([
                    html.A(
                        'Download Data',
                        id='Slide4BL-download-link',
                        download='Slide4BL.csv',
                        href='',
                        target='_blank',
                    )
                ],
                         style={'text-align': 'right'}),
            ],
            style={
                'width': '65%',
                'margin-left': 'auto',
                'margin-right': 'auto',
                'margin-top': '45px',
                'margin-bottom': '45px'
            }),
        html.Details([
            html.Summary('Query Description'),
            html.Div([
                html.
                P('Approved business licenses issued since 2016 and how their amend/renew and application jobs were submitted (online, '
                  'revenue, or staff).'),
                html.
                P('We determine how a job was submitted (online, revenue, or staff) based on the username who created it:'
                  ),
                html.Ul(children=[
                    html.
                    Li('Online: If the username contains a number or equals "PPG User"'
                       ),
                    html.
                    Li('Revenue: If the username equals "POSSE system power user"'
                       ),
                    html.
                    Li('Staff: If the username doesn\'t meet one of the other two conditions'
                       )
                ])
            ])
        ])
    ])
Exemple #13
0
# VALID_USERNAME_PASSWORD_PAIRS = {
#     'hello': 'world'
# }
#
# auth = dash_auth.BasicAuth(
#     app,
#     VALID_USERNAME_PASSWORD_PAIRS
# )

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    html.Div(
        [
            html.Div([
                #html.Img(src='/assets/icons8-p-64.png'),
                html.A(html.H1('Proof-it'), href='/home')
            ]),
            html.Div([
                html.Ul([
                    html.Li(html.A('Sign Up', href='/signup',
                                   className='catA'),
                            className='cat'),
                    html.Li(html.A('Log In', href='/login', className='catA'),
                            className='cat'),
                ],
                        className='categories')
            ])
        ],
        className='banner'),
    html.Ul([
        html.Li(html.A('Trader', href='/trader', className='catA-2'),
Exemple #14
0
         className="simplesidebar"),
 dbc.Col([
     dbc.Row([
         html.Div([
             html.H2('Face Verification API',
                     style={"margin": 20}),
             html.Hr()
         ],
                  style={"text-align": "center"})
     ],
             justify="center"),
     dbc.Row([
         dcc.Upload(id="upload-data",
                    children=html.Div([
                        "Drag and Drop or ",
                        html.A("Select Files")
                    ]),
                    style={
                        'width': '100%',
                        'height': '60px',
                        'lineHeight': '60px',
                        'borderWidth': '1px',
                        'borderStyle': 'dashed',
                        'borderRadius': '5px',
                        'textAlign': 'center',
                        'margin-bottom': '20px'
                    }),
     ],
             justify="center"), images_component,
     images_component_cell,
     dbc.Card([
                         #html.Img(src="/assets/img/LogoM7.svg",className='img-fluid')
                         html.Img(src="/assets/img/MobilidataS2.png",
                                  className='img-fluid')
                     ]),
                 html.Div(
                     className="intro-info",
                     children=[
                         html.H2([
                             "We are",
                             html.Br(),
                             html.Span("MobiliData"),
                             html.Br(), "Team 80 DS4A v3"
                         ]),
                         html.Div(children=[
                             html.A(
                                 "Team Members",
                                 href="#team",
                                 className="btn-get-started scrollto")
                         ])
                     ])
             ])
     ]),
 html.Section(
     className="about",
     children=[
         html.Div(
             className="container",
             children=[
                 html.Header(
                     className="section-header",
                     children=[
                         #html.H3('Bogotá fluye inteligentemente'),
Exemple #16
0
def genResult(src, user, iframe, **kwargs):
    tabs = html.Div([
        html.Div('', className='tile is-3'),
        html.Div([
            html.Div([
                html.Ul([
                    html.Li(
                        [
                            html.A('视频词云'),
                        ],
                        className='is-active',
                        id='tabsCloud',
                    ),
                    html.Li([
                        html.A('短文本主题建模'),
                    ], id='tabsLDA'),
                    html.Li([
                        html.A('文章统计', ),
                    ], id='tabsOther'),
                ])
            ],
                     className='tabs is-centered is-medium',
                     style={'width': '100%'}),
        ],
                 className='tile is-6')
    ],
                    className='tile is-ancestor',
                    style={'marginBottom': '1rem'})
    # tabs = html.Div([
    #             html.Ul([
    #                 html.Li([
    #                     html.A('视频词云'),
    #                 ], className='is-active', id='tabsCloud', ),
    #                 html.Li([
    #                     html.A('LDA主题分析'),
    #                 ], id='tabsLDA'),
    #                 html.Li([
    #                     html.A('文章统计', ),
    #                 ],id='tabsOther'),
    #             ])
    #         ], className='tabs is-centered is-medium', style={'margin': '0 25% 2rem 25%'}),
    tabsColud = html.Div([
        html.Img(src=src,
                 className='',
                 style={
                     'max-width': '600px',
                     'min-width': '300px'
                 }),
    ],
                         className='wcImg',
                         id='userWC'),
    tabsLDA = html.Div([
        html.Iframe(src=iframe,
                    style={
                        'height': '130vh',
                        'width': '100%',
                        'overflow': 'hidden'
                    }),
    ],
                       className='wcImg',
                       id='userLDA',
                       style={'display': 'none'}),
    tabsOther = html.Div([
        html.Div(genTongji(**kwargs), style={'width': '100%'}),
    ],
                         className='',
                         id='userOther',
                         style={
                             'display': 'none',
                             'width': '100%'
                         }),
    userInfo = html.Div([
        html.Div('', className='tile is-3'),
        html.Div([
            html.Div([
                html.Article([
                    html.Figure([
                        html.P([html.Img(src=user.avatar)],
                               className='image is-64x64')
                    ],
                                className='media-left'),
                    html.Div([
                        html.Div([
                            html.P([
                                html.Strong(user.nickname,
                                            id='recordNickName'),
                                html.Small(' | ' + user.user_id,
                                           style={'whiteSpace': 'pre'}),
                                html.P(user.user_id,
                                       style={'display': 'none'},
                                       id='recordUserId'),
                                html.Br(),
                                html.Div(user.signature)
                            ])
                        ],
                                 className='content'),
                        html.Div([
                            html.Div([
                                html.Div([
                                    html.Span('作品: ',
                                              style={'whiteSpace': 'pre'}),
                                    html.Span(
                                        format(user.aweme_count, ',') if user.
                                        aweme_count else '未知'),
                                ],
                                         className='level-item'),
                                html.Div([
                                    html.Span('获赞: ',
                                              style={'whiteSpace': 'pre'}),
                                    html.Span(
                                        format(user.total_favorited, ',')
                                        if user.total_favorited else '未知'),
                                ],
                                         className='level-item'),
                                html.Div([
                                    html.Span('粉丝: ',
                                              style={'whiteSpace': 'pre'}),
                                    html.Span(
                                        format(user.aweme_fans, ',') if user.
                                        aweme_fans else '未知'),
                                ],
                                         className='level-item'),
                            ],
                                     className='level-left')
                        ],
                                 className='level is-mobile')
                    ],
                             className='media-content'),
                    html.Div([
                        html.Button(
                            '相似用户',
                            className='button is-primary is-outlined is-small',
                            id='searchSimalar')
                    ],
                             className='media-right')
                ],
                             className='media'),
            ],
                     className='box',
                     style={'width': '100%'}),
        ],
                 className='tile is-6 search_input')
    ],
                        className='tile is-ancestor',
                        style={'marginBottom': '1rem'}),

    fig = [userInfo, tabs, tabsColud, tabsLDA, tabsOther]
    return fig
Exemple #17
0
                 html.Div([
                     html.H3(
                         "Stad Antwerpen",
                         style={"margin-bottom": "0px"},
                     ),
                     html.H5("Fietsgebruik",
                             style={"margin-top": "0px"}),
                 ])
             ],
             className="one-half column",
             id="title",
         ),
         html.Div(
             [
                 html.A(
                     html.Button("Model", id="model-button"),
                     href="/model",
                 ),
                 html.A(
                     html.Button("Descriptive", id="desc-button"),
                     href="/descriptive",
                 )
             ],
             className="one-third column",
             id="button",
         ),
     ],
     id="header",
     className="row flex-display",
     style={"margin-bottom": "25px"},
 ),
 html.Div([], className="row flex-display", style={'float': 'right'}),
Exemple #18
0
header = dbc.Card([
    html.Div(id="header",
             children=[dbc.Row([
                 dbc.Col(title),
                 dbc.Col(dropdown),
             ])])
],
                  body=True)

# info about where the data came from
info = html.Div(
    id='info',
    children=[
        html.H5([
            'Data from ',
            html.A('John Hopkins University COVID-19 Repo',
                   href='https://github.com/CSSEGISandData/COVID-19')
        ],
                style={
                    'textAlign': 'Center',
                    'padding': '10px'
                })
    ])

# where the plot will land
plot = html.Div(id='plot')

################### UI LAYOUT ########################
# combine the components into our layout
app.layout = html.Div(children=[header, info, plot])

import dash_html_components as html
from dash.dependencies import Input, Output

# Connect to main app.py file
from app import app
from app import server

layout=html.Div([
        html.P( "L'impact négatif du covid sur l'économie est aujourd'hui un consensus parmi les experts."\
                " Si nous avons pu mesurer en partie son impact sur l'économie mondiale en 2020, "\
                "il est difficile aujourd'hui de faire des conjectures sur le futur."),
        html.P( "Ce projet a pour vocation de présenter les données de manière à évaluer "\
                "la situation actuelle de la manière la plus exhaustive et objective possible, "\
                "afin que chacun puisse en tirer ses propres conclusions."),
        html.P( ["Le jeu de donné utilisé dans cette étude a été collecté sur ",
                html.A("https://data.mendeley.com/datasets/b2wvnbnpj9/1", href="https://data.mendeley.com/datasets/b2wvnbnpj9/1"),". "\
                "Il présente pour 170 pays avec une granularité journalière l’impact de la maladie en 2020 (nombre de cas, nombre de décès), "\
                "ainsi qu’un l’indice de sévérité de réponse (STI : composition de 9 sous-indices parmi lesquels : fermeture des écoles, des bureaux, "\
                "restrictions de voyage, …). Nous mettrons ces mesures en relation avec les données économiques suivantes : "\
                "PIB par habitant, population et indice de développement humain (HDI)."]),
        html.P( "Les variables économiques présentées dans notre jeu de données ont été mesurées en 2019, "\
                "et les données 2020 n’ont pas encore été publiées par la WorldBank. "\
                "Il nous est donc impossible de chiffrer l’impact de la COVID sur ces indicateurs. "\
                "En revanche nous pouvons d’ores et déjà tirer les quelques conclusions basées sur notre perception de la situation, "\
                "ainsi que les chiffres du PIB en Europe publiés par Eurostat et présentant une récession de 6.1% en 2020."),
        html.P( "La COVID 19 a eu un impact négatif fort sur l’économie mondiale. Les restrictions mises en place ont impacté à la fois l’offre et la demande, "\
                "et auront nécessairement un impact à long terme dû aux effets secondaires profonds (santé, investissements publics, éducation, …). "\
                "La population et la santé des habitants des différents pays a également clairement été impactée. "\
                "Nous pouvons donc affirmer avec une raisonnable certitude que l’impact économique négatif du covid sera corrélés aux 3 variables "\
                "TC, TD, et STI, sans pour autant être capable d’évaluer cette corrélation. "\
                "Nous nous contenterons donc de présenter l’évolution de ces variables au cours du temps et d’étudier "\
# -*- coding: utf-8 -*-
"""
Team 53
Melbourne
@author: Sania Khan(1045290), Kanav Sood(1057606), Gaurang Sharma(1041953), Udit Goel(1042890), Jack Crellin(1168062)
"""

import dash_html_components as html
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import tabs


context = "This Application provides a series of visualisations that help encapsulate the relationship of Unemployment in Victoria and Twitter Sentiment within the context of Covid-19."
github = "The code for this assignment can be found at:"
link = html.A(href = "https://github.com/gaurang96/Cluster-and-Cloud-Project" , children = "https://github.com/gaurang96/Cluster-and-Cloud-Project", style = {'color': '#FFFFFF'})

def get_title():
	return dbc.Row(
            [
                dbc.Col(
                    children = 
                    [
                        # Title
                        html.H1(children="Cluster and Cloud Computing Assignment 2", style = {'color': '#55ACEE', 'font-weight' :'bold'}),
                        # Subtitle
                        html.H4(children= "Inferences Into Twitter Sentiment About Unemployment in relation to the Covid-19 Crisis", style = {'color': '#CCD6DD'})
                    ],
                    style = {'padding-top': '25px', 'padding-left' : '10px'}
                )
            ],
								You can find the manual for the control here: LTH_Neutimag\\hkromer\\Neutron_generator_documentation. ",
               style={"margin-left": "10%"},
               className='row'),
    ],
             className="one-third column"),
    html.Div([
        html.H3(
            "Navigation",
            style={
                "margin-bottom": "5%",
                "letter-spacing": "0.23rem"
            },
        ),
        html.Hr(),
        html.A('Go to Experiment editor',
               href='/apps/app_experiment',
               target="_blank",
               style={"font-size": "1.6em"}),
        html.Hr(),
        html.A('Go to Sensor readout',
               href='/apps/app_sensor_readout',
               target="_blank",
               style={"font-size": "1.6em"}),
        html.Br(),
        html.A('Go to Sensor control',
               href='/apps/app_sensor_control',
               target="_blank",
               style={"font-size": "1.6em"}),
        html.Hr(),
        html.A('Go to Arc control',
               href='/apps/app_arc_control',
               target="_blank",
Exemple #22
0
    ],
    style=SIDEBAR_STYLE,
)

# navbar
navbar = dbc.Navbar(
    dbc.Container([
        html.A(
            # Use row and col to control vertical alignment of logo / brand
            dbc.Row(
                [
                    dbc.Col(
                        html.H6(children='Last updated at ' +
                                str(df['Created'].iloc[-1].strftime(
                                    "%B %d, %H:%M, %Y")) + ' +03:00 (GMT)',
                                style={
                                    'color': 'orange',
                                    'margin-left': '56rem'
                                }), ),
                ],
                align="right",
                no_gutters=True,
            ),
            href="https://plot.ly",
        ),
    ]),
    color="dark",
    dark=True,
    className="mb-5",
)
"""
INDICATORS
                 html.Div([
                     html.H3(
                         "Ignite E-Health Initiative",
                         style={"margin-bottom": "0px"},
                     ),
                     html.H5(id="connection_status",
                             style={"margin-top": "0px"}),
                 ])
             ],
             className="one-half column",
             id="title",
         ),
         html.Div(
             [
                 html.A(
                     html.Button("Zurück", id="back-button"),
                     href="/profile",
                 )
             ],
             className="one-third column",
             id="button",
         ),
     ],
     id="header",
     className="row flex-display",
     style={"margin-bottom": "25px"},
 ),
 html.Div(
     [
         html.Div(
             [
                 html.P(
Exemple #24
0
def tab_data(data, all_data):
    return dcc.Tab(
        label="Data",
        value="data",
        className="",
        selected_className="",
        children=[
            html.Div(
                className="grid grid--two-columns",
                children=[
                    html.Div(
                        className="grid__all",
                        children=[
                            html.Div(
                                [
                                    html.H3(
                                        className="h3",
                                        children="Grants",
                                    ),
                                    html.Div(
                                        className="table table--zebra",
                                        id="data-table",
                                        children=[table(data["grants"])],
                                    ),
                                ]
                            )
                        ],
                    ),
                    html.Div(
                        className="grid__all",
                        children=[
                            dcc.Markdown(
                                """
        [GrantNav](https://grantnav.threesixtygiving.org/) is search-engine
        for grants data. Explore and download in detail on where and how much funding
        goes across billions of pounds of grants.
    """
                            ),
                            html.A(
                                className="button button--orange",
                                href="/data/grants.csv",
                                target="_blank",
                                children="Download all grants (CSV)",
                            ),
                            " ",
                            html.A(
                                className="button button--orange",
                                href="/data/grants.json",
                                target="_blank",
                                children="Download all grants (JSON)",
                            ),
                            " ",
                            html.A(
                                className="button button--orange",
                                href="/data/la.csv",
                                target="_blank",
                                children="Download Local Authority summaries (CSV)",
                            ),
                            " ",
                            html.A(
                                className="button button--orange",
                                href="https://grantnav.threesixtygiving.org/search?json_query=%7B%22query%22%3A+%7B%22bool%22%3A+%7B%22must%22%3A+%7B%22query_string%22%3A+%7B%22query%22%3A+%22coronavirus+OR+pandemic+OR+covid+OR+%5C%22covid19%5C%22%22%2C+%22default_field%22%3A+%22%2A%22%7D%7D%2C+%22filter%22%3A+%5B%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%2C+%22must%22%3A+%7B%7D%2C+%22minimum_should_match%22%3A+1%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%7B%22range%22%3A+%7B%22amountAwarded%22%3A+%7B%7D%7D%7D%2C+%22must%22%3A+%7B%7D%2C+%22minimum_should_match%22%3A+1%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%7B%22range%22%3A+%7B%22awardDate%22%3A+%7B%22format%22%3A+%22year%22%2C+%22gte%22%3A+%222020%7C%7C%2Fy%22%2C+%22lte%22%3A+%222020%7C%7C%2Fy%22%7D%7D%7D%5D%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%7D%7D%2C+%7B%22bool%22%3A+%7B%22should%22%3A+%5B%5D%7D%7D%5D%7D%7D%2C+%22sort%22%3A+%7B%22_score%22%3A+%7B%22order%22%3A+%22desc%22%7D%7D%2C+%22aggs%22%3A+%7B%22fundingOrganization%22%3A+%7B%22terms%22%3A+%7B%22field%22%3A+%22fundingOrganization.id_and_name%22%2C+%22size%22%3A+50%7D%7D%2C+%22recipientOrganization%22%3A+%7B%22terms%22%3A+%7B%22field%22%3A+%22recipientOrganization.id_and_name%22%2C+%22size%22%3A+3%7D%7D%2C+%22recipientRegionName%22%3A+%7B%22terms%22%3A+%7B%22field%22%3A+%22recipientRegionName%22%2C+%22size%22%3A+3%7D%7D%2C+%22recipientDistrictName%22%3A+%7B%22terms%22%3A+%7B%22field%22%3A+%22recipientDistrictName%22%2C+%22size%22%3A+3%7D%7D%2C+%22currency%22%3A+%7B%22terms%22%3A+%7B%22field%22%3A+%22currency%22%2C+%22size%22%3A+3%7D%7D%7D%2C+%22extra_context%22%3A+%7B%22awardYear_facet_size%22%3A+3%2C+%22amountAwardedFixed_facet_size%22%3A+3%7D%7D",
                                target="_blank",
                                children="Search on GrantNav",
                            ),
                            html.Div(className="spacer-3"),
                            html.P(
                                html.Small(
                                    html.Em(
                                        id="last-updated",
                                        children=[
                                            "Last updated ",
                                            "{:%Y-%m-%d %H:%M}".format(
                                                data["last_updated"]
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                            html.H3(
                                className="h3",
                                children="Data Sources",
                            ),
                            html.Div(
                                className="table table--zebra",
                                id="data-sources",
                                children=[datasources(data["grants"])],
                            ),
                        ],
                    ),
                ],
            ),
        ],
    )
Exemple #25
0
def get_pitch():

    lien_article_site = (
        "http://alliance-psyperinat.org/2020/04/28/rapport-da-bauer-lse/")
    lien_nhs = (
        "https://www.england.nhs.uk/2018/02/funding-boost-for-new-mums-mental-health/"
    )
    lien_nhs_2 = "https://www.england.nhs.uk/2016/02/fyfv-mh/"
    lien_nhs_3 = "https://www.england.nhs.uk/wp-content/uploads/2016/02/Mental-Health-Taskforce-FYFV-final.pdf"
    lien_govuk = "https://www.gov.uk/government/news/prime-minister-pledges-a-revolution-in-mental-health-treatment"

    pitch = html.Div(
        [
            html.Div(
                [
                    html.Span(
                        "Le Royaume-Uni a compris dès 2014 l’importance d’investir sur les générations futures en finançant massivement la santé mentale périnatale. "
                    ),
                    html.Span(
                        "C’est notamment sous l’impulsion de l’article "),
                    html.A(
                        html.Span(
                            "The costs of perinatal mental health problems",
                            style={"font-style": "italic"},
                        ),
                        href=lien_article_site,
                        target="_blank",
                    ),
                    html.Span(
                        ", écrit par des chercheurs de la London School of Economics, que le gouvernement Cameron a investi plus de 300 millions de livres "
                    ),
                    html.A(
                        html.Span("[1]", style={"color": "black"}),
                        href=lien_govuk,
                        target="_blank",
                    ),
                    html.A(
                        html.Span("[2]", style={"color": "black"}),
                        href=lien_nhs,
                        target="_blank",
                    ),
                    html.Span(
                        ". Pour mieux comprendre la nécessité de prendre en compte cet aspect de nos politiques de santé, en particulier dans une perspective d’investissement social, l’Alliance Francophone pour la Santé Mentale Périnatale a créé ce "
                    ),
                    html.Span("simulateur", style={"font-weight": "bold"}),
                    html.Span(
                        " qui réplique le modèle médico-économique de l’article Bauer, "
                    ),
                    html.Span(
                        "afin d’estimer le coût des maladies psychiatriques périnatales à toutes les échelles en France. "
                    ),
                    html.Span(
                        "Une partie significative de ces coûts peut être économisée par une politique ambitieuse de prévention."
                    ),
                ],
                style={
                    "text-align": "justify",
                    "font-size": "1.2em"
                },
            ),
        ],
        style={
            "border": "1px solid black",
            "padding": "1.5em 1.5em 1.5em 1.5em",
            "border-radius": "3px",
        },
    )
    return pitch
Exemple #26
0
color1 = 'red'
color2 = 'black'

bitterness = go.Bar(x=beers,
                    y=ibu_values,
                    name='IBU',
                    marker={'color': color1})
alcohol = go.Bar(x=beers, y=abv_values, name='ABV', marker={'color': color2})

beer_data = [bitterness, alcohol]
beer_layout = go.Layout(barmode='group', title='Beer Comparison')

beer_fig = go.Figure(data=beer_data, layout=beer_layout)

########### Display the chart

app = dash.Dash()
server = app.server

app.layout = html.Div(children=[
    html.H1('Flying Dog Beers'),
    dcc.Graph(id='flyingdog', figure=beer_fig),
    html.A('Code on Github',
           href='https://github.com/austinlasseter/flying-dog-beers'),
    html.Br(),
    html.A('Data Source', href='https://www.flyingdog.com/beers/'),
])

if __name__ == '__main__':
    app.run_server()
Exemple #27
0
 html.H4(
     "After upploading your data you can head to the dashboard and recommendation tabs, where the "
     "information is now updated",
     style={
         'text-align': 'Justify',
         "color": "white",
         "font-family": "Montserrat"
     }),
 html.Br(),
 html.Br(),
 dcc.Upload(
     id='upload-data',
     children=html.Div(
         [
             'Drag and Drop or ',
             html.A('Select Files')
         ],
         style={"color": "white"}),
     style={
         'width': '80%',
         'height': '60px',
         'lineHeight': '60px',
         'borderWidth': '1px',
         'borderColor': 'white',
         "font-family": "Montserrat",
         'borderStyle': 'dashed',
         'borderRadius': '5px',
         'textAlign': 'center',
         "margin-left": "10%",
         # 'margin': '20px'
     },
Exemple #28
0
        html.H5('・テーブルデータの二値分類タスクについて、ロジスティック回帰によるベースラインモデルを作成することができます。'),
        html.H5('・欠損値がある場合は、Step4で欠損値補完処理を行ってください。'),
        html.
        H5('・文字列データを含む場合は、Step4でOne-Hotエンコーディング処理を行ってください(欠損値はそのまま処理することができます)。'
           ),
        html.H5('・操作を途中からやり直す場合、それ以降の処理はリセットされます。再度各処理の実行ボタンを押してください。')
    ]),
    html.Div(
        children=[
            html.H3('Step1: データのアップロード'),

            # ファイルアップロード
            dcc.Upload(id='upload-data',
                       children=html.Div([
                           'csvファイル、xlsファイルをdrag and drop',
                           html.A('(または選択)'), 'してアップロード'
                       ]),
                       style=upload_style,
                       multiple=True),
            html.Br(),

            # アップロードしたデータの表示
            html.Div(id='output-data-upload_1')
        ],
        style={
            'background': '#EAD9FF',
            'height': '450px',
            'width': '1400px'
        }),
    html.Div(
        [
Exemple #29
0
def init_attacker(server):
    app = dash.Dash(
        server=server,
        url_base_pathname=URL_BASE,
        suppress_callback_exceptions=True,
    )

    app.layout = html.Div(children = [
        html.H1(
            children = 'Fantasy Premier League Attack/Midfield Dashboard',
            style = {
                'textAlign':'center',
                'color':'#28D0B4',
            }
        ),
        html.Div(
            children = 'This interactive web app can be a toolkit for you to select and optimise your player selection based on their previous year\'s performances',
            style = {
                'color':'#28D0B4',
            }
        ),

        html.Div(
            id = 'stats-menu',
            className = 'dropdowns',
            children = [
                dcc.Dropdown(
                    id = 'yaxis',
                    className = 'ydropdown',
                    options = [
                        {'label':'Players','value':'player'},
                        {'label':'Games','value':'games'},
                        {'label':'Minutes','value':'minutes'},
                        {'label':'Total 90s','value':'minutes_90s'},
                        {'label':'Goals per90','value':'goals_per90'},
                        {'label':'Assists per90','value':'assists_per90'},
                        {'label':'Penalties Attempted','value':'pens_att'},
                        {'label':'Penalty Conversion %','value':'pen_conv'},
                        {'label':'Yellow Cards','value':'cards_yellow'},
                        {'label':'Red Cards','value':'cards_red'},
                        {'label':'Goals & Assists per90','value':'goals_assists_per90'},
                        {'label':'Goals + Assists - Penalties per90','value':'goals_assists_pen_per90'},
                        {'label':'Expected Goals per90','value':'xg_per90'},
                        {'label':'Expected Assists per90','value':'xa_per90'},
                        {'label':'xG & xA per90','value':'xg_xa_per90'},
                        {'label':'Non-Penalty Expected goals per90','value':'npxg_per90'},
                        {'label':'npxG + xA per90','value':'npxg_xa_per90'},
                        {'label':'xG_net','value':'xg_net'},
                        {'label':'Cost','value':'cost'},
                        {'label':'Points earned','value':'points'},
                        {'label':'Points per game','value':'ppg'},
                        {'label':'Points per cost','value':'ppc'}
                    ],
                    placeholder = 'Choose statistics for Y axis',
                    searchable = True,
                    value = 'points'
                ),
                dcc.Dropdown(
                    id = 'xaxis',
                    className = 'xdropdown',
                    options = [
                        {'label':'Players','value':'player'},
                        {'label':'Games','value':'games'},
                        {'label':'Minutes','value':'minutes'},
                        {'label':'Total 90s','value':'minutes_90s'},
                        {'label':'Goals per90','value':'goals_per90'},
                        {'label':'Assists per90','value':'assists_per90'},
                        {'label':'Penalties Attempted','value':'pens_att'},
                        {'label':'Penalty Conversion %','value':'pen_conv'},
                        {'label':'Yellow Cards','value':'cards_yellow'},
                        {'label':'Red Cards','value':'cards_red'},
                        {'label':'Goals & Assists per90','value':'goals_assists_per90'},
                        {'label':'Goals + Assists - Penalties per90','value':'goals_assists_pen_per90'},
                        {'label':'Expected Goals per90','value':'xg_per90'},
                        {'label':'Expected Assists per90','value':'xa_per90'},
                        {'label':'xG & xA per90','value':'xg_xa_per90'},
                        {'label':'Non-Penalty Expected goals per90','value':'npxg_per90'},
                        {'label':'npxG + xA per90','value':'npxg_xa_per90'},
                        {'label':'xG_net','value':'xg_net'},
                        {'label':'Cost','value':'cost'},
                        {'label':'Points earned','value':'points'},
                        {'label':'Points per game','value':'ppg'},
                        {'label':'Points per cost','value':'ppc'}
                    ],
                    placeholder = 'Choose statistics for X axis',
                    searchable = True,
                    value= 'player'
                ),
                dcc.RadioItems(
                    id='plot',
                    className = 'plot-select',
                    options=[{'label': 'Bar Plot', 'value': 'bar'},
                            {'label': 'Scatter Plot', 'value': 'scatter'},
                    ],
                    value='scatter'
                ),
            ]
        ),

        dcc.Graph(
            id='stats-graph',
            className = 'graph',
            style = {
                'marginTop':40,
            }
        ),

        html.Div(className = 'info-panel',children=[
            html.H5(children = 'Some of the stats used',style ={'marginBottom':-2}),
            dcc.Markdown('''
            '''
            ),
            html.A(' - Statisfy -  A collections of Basic Football Analytics',href='https://github.com/sidthakur08/statisfy'),
            html.Br(),
            html.A(' - Contact me on Twitter :)',href = 'https://twitter.com/sidtweetsnow',target='_blank'),
            html.Br(),
        ]),

        html.Div(className = 'link-name', children = [
            html.A('Link to the github repository',href = "https://github.com/sidthakur08/fpl_explore",target='_blank')
        ]),
        html.Br(),
        html.Br(),
        html.Br(),
    ])

    init_attacker_callbacks(app)

    return app.server
 def generate_page_logout():
     return html.Div(className="logout-screen",
                     children=[
                         html.Div('Succesfully Logged Out'),
                         html.Div(children=[html.A('Login Back', href='/')])
                     ])