Esempio n. 1
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Data analysis report"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    In this section is presented some important characteristics that describe the data",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                                id='buffer1',
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Important-data"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="seven columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    html.Div([
                        html.H6(
                            "Graph of number of employees per company",
                            className="subtitle padded",
                        ),
                        dcc.Graph(id="graph-1", ),
                    ], ),
                    html.Div([
                        html.H6(
                            "Number of employees versus Response",
                            className="subtitle padded",
                        ),
                        dcc.Graph(id="graph-1-1", ),
                    ], ),
                    # Row 5
                    html.Div(
                        [
                            html.Div([
                                html.H6(
                                    "BOX PLOT responses PART 1: INNOVATION STRATEGY 4, ORGANIZATION 12, INNOVATION PROJECT 16, VALUE NETWORK 16 and RESULTS-27",
                                    className="subtitle padded",
                                ),
                                dcc.Graph(id="graph-2", ),
                            ],
                                     # className="six columns",
                                     ),
                            html.Div([
                                html.
                                H6("BOX PLOT PART2:29: Which areas are you most eager to strengthen in order to reach your future ambition within 3 years:",
                                   className="subtitle padded"),
                                dcc.Graph(id="graph-3", ),
                            ],
                                     #className="six columns",
                                     ),
                            html.Div([
                                html.
                                H6("BOX PLOT PART3:28: Where do you see your authority:",
                                   className="subtitle padded"),
                                dcc.Graph(id="graph-4A", ),
                            ],
                                     #className="six columns",
                                     ),
                            html.Div([
                                html.
                                H6("BOX PLOT NEW-RESULT-EXTERNAL: 25: In our innovation work with a focus on external results (eg new products, services and forms of collaboration), we as a whole succeed in meeting new challenges / opportunities by:",
                                   className="subtitle padded"),
                                dcc.Graph(id="graph-5", ),
                            ],
                                     #className="six columns",
                                     ),
                        ],
                        # className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 2
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("မြန်မာ့နိုင်ငံတော် သမ္မတများ"),
                                    html.Br([]),
                                    html.P(
                                        "မြန်မာနိုင်ငံ လွတ်လပ်ရေးရပြီးသည်မှ စ၍ နိုင်ငံတော်၏အကြီးအမှူးအဖြစ် \
                                        ပါလီမန်ဒီမိုကရေစီ၊ ဆိုရှယ်လစ်စနစ်နှင့် ပါတီစုံဒီမိုကရေစီ အထိ \
                                        ခေတ်အဆက်ဆက် တာဝန်ထမ်းဆောင်ခဲ့ကြသည့်သမ္မတများ",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["သမ္မတတာဝန်ထမ်းဆောင်ချိန်"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_president_tenure)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["သမ္မတ၏နောက်ခံပါတီ"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_president_data)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 3
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 5
            html.Div(
                [
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Distribuciones"],
                                            className="subtitle padded"),
                                    html.P(
                                        [
                                            "Distributions for this fund are scheduled quaterly"
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.H6(
                                        ["Retorno inversiones en Educación"],
                                        className="subtitle tiny-header padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_dividend),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Compras realizadas/no realizadas 01/31/2018"
                                        ],
                                        className="subtitle tiny-header padded",
                                    )
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [html.Table(make_dash_table(df_realized))],
                                className="six columns",
                            ),
                            html.Div(
                                [html.Table(make_dash_table(df_unrealized))],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Algorithm Summary"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    Currently, only deep Q learning algorithm has been implemented with many bugs. We will lose millions of money if we use this stupid trading algorithm. As such, being philanthropists instead of traders is our new goal.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Fund Facts"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Average annual performance",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        "1 Year",
                                                        "3 Year",
                                                        "5 Year",
                                                        "10 Year",
                                                        "41 Year",
                                                    ],
                                                    y=[
                                                        "21.67",
                                                        "11.26",
                                                        "15.62",
                                                        "8.37",
                                                        "11.11",
                                                    ],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color": "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="DQN",
                                                ),
                                                go.Bar(
                                                    x=[
                                                        "1 Year",
                                                        "3 Year",
                                                        "5 Year",
                                                        "10 Year",
                                                        "41 Year",
                                                    ],
                                                    y=[
                                                        "21.83",
                                                        "11.41",
                                                        "15.79",
                                                        "8.50",
                                                    ],
                                                    marker={
                                                        "color": "#dddddd",
                                                        "line": {
                                                            "color": "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="S&P 500 Index",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={"family": "Raleway", "size": 10},
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range": [0, 22.9789473684],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Hypothetical growth of $10,000",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=[
                                                        "2008",
                                                        "2009",
                                                        "2010",
                                                        "2011",
                                                        "2012",
                                                        "2013",
                                                        "2014",
                                                        "2015",
                                                        "2016",
                                                        "2017",
                                                        "2018",
                                                    ],
                                                    y=[
                                                        "10000",
                                                        "7500",
                                                        "9000",
                                                        "10000",
                                                        "10500",
                                                        "11000",
                                                        "14000",
                                                        "18000",
                                                        "19000",
                                                        "20500",
                                                        "24000",
                                                    ],
                                                    line={"color": "#97151c"},
                                                    mode="lines",
                                                    name="DQN",
                                                )
                                            ],
                                            "layout": go.Layout(
                                                autosize=True,
                                                title="",
                                                font={"family": "Raleway", "size": 10},
                                                height=200,
                                                width=340,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0277108433735,
                                                    "y": -0.142606516291,
                                                    "orientation": "h",
                                                },
                                                margin={
                                                    "r": 20,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor": "rgb(0, 0, 0)",
                                                    "linewidth": 1,
                                                    "range": [2008, 2018],
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor": "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, 30000],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "$",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Price & Performance (%)",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(df_price_perf)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Risk Potential", className="subtitle padded"
                                    ),
                                    html.Img(
                                        src=app.get_asset_url("risk_reward.png"),
                                        className="risk-reward",
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 5
            html.Div(
                [
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["DATASE TO THE ANALYSIS"],
                                            className="subtitle padded"),
                                    html.P(
                                        ["Dataset organized"],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.H6(
                                        [
                                            "Authority,Number of employees,A,B,C,D,E"
                                        ],
                                        className="subtitle tiny-header padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_graph),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={
                                            "overflow-x": "auto",
                                            'height': '350px',
                                            'overflow': 'scroll',
                                        },
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div([html.H6(["Data saved"])])
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 6
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Analysis Summary"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    The University of Virginia has laid out an ambitious 10-year plan to accelerate the University’s sustainability goals across operations, research, curriculum, accountability and engagement – a framework of stewardship and discovery. The 2020-30 UVA Sustainability Plan includes six goals that UVA’s Board of Visitors approved in December, when the University committed to pursuing carbon neutrality by 2030 in partnership with the College of William & Mary. The full 2030 Plan also outlines strategic actions for success and adds four new goals.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Quick Facts"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_waste)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Bar Graph",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        "Factor 1",
                                                        "Factor 2",
                                                        "Factor 3",
                                                        "Factor 4",
                                                        "Factor 5",
                                                    ],
                                                    y=[
                                                        "21.67",
                                                        "11.26",
                                                        "15.62",
                                                        "8.37",
                                                        "11.11",
                                                    ],
                                                    marker={
                                                        "color": "#141E3C",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Group 1",
                                                ),
                                                go.Bar(
                                                    x=[
                                                        "Factor 1",
                                                        "Factor 2",
                                                        "Factor 3",
                                                        "Factor 4",
                                                        "Factor 5",
                                                    ],
                                                    y=[
                                                        "21.83",
                                                        "11.41",
                                                        "15.79",
                                                        "8.50",
                                                    ],
                                                    marker={
                                                        "color": "#dddddd",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Group 2",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range":
                                                    [0, 22.9789473684],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 7
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.
                                    H5("Extractive Summary - Supervisor-centred automation"
                                       ),
                                    html.Br([]),
                                    html.P(
                                        "At the extreme, there is the “pull” model of data collection, implicitly described in the example I used in the introduction to these remarks - in which regulators would be able to pull data, at any level of granularity, directly from firms’ systems in real time, with no intervention on the part of firms. A more strategic approach, however, is likely to prove necessary to make a reality of a longer-term goal of embedding technology at the heart of how prudential risks are supervised – that is, not simply identifying applications in supervision that would benefit from technology, but fundamentally re-engineering the way we work. Providing answers to the questions I have outlined in the preceding remarks will help us to know how far we might, in time, go in introducing technology into supervision, and provide a road map for the future of how prudential supervision could be done. For example, by more consistently applying meta-data and tabs to not just the rule book, but also the related library of supervisory expectations, it would become easier and quicker for a more or less intelligent search engine to find and collect together all the relevant and related pieces of regulatory and supervisory text. Gradually over time, advances in technology and modelling techniques should – I believe – make more possible the type of flexible desk-top simulations of banks’ balance sheets imagined in my example - just as an earlier generation of technology enabled, some  years ago, quick-fire desk-top simulations of the effect of shocks on the macro economy: but there remain significant technical and practical challenges to overcome.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Bigrams & Trigrams"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(df_bi_tr_grams)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Key words",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        15,
                                                        17,
                                                        22,
                                                        24,
                                                        28,
                                                    ],
                                                    y=[
                                                        'way',
                                                        'supervision',
                                                        'firms',
                                                        'technology',
                                                        "data",
                                                    ],
                                                    orientation='h',
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Word frequency",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 0,
                                                    "b": 10,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Lexical Dispersion",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=lexical_disp['position'],
                                                    y=lexical_disp['word'],
                                                    line={"color": "#97151c"},
                                                    mode="markers",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                title="",
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=160,
                                                width=340,
                                                hovermode="closest",
                                                margin={
                                                    "r": 20,
                                                    "t": 0,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor":
                                                    "rgb(0, 0, 0)",
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "Word Offset",
                                                    "type": "linear",
                                                    'automargin': True,
                                                },
                                                yaxis={
                                                    "autorange":
                                                    True,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "showgrid":
                                                    True,
                                                    "type":
                                                    "category",
                                                    'categoryorder':
                                                    'array',
                                                    'categoryarray': [
                                                        'way', 'supervision',
                                                        'firms', 'technology',
                                                        'data'
                                                    ],
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Entity Recognition",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(entity_rec)),
                                ],
                                className="six columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 8
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    html.Div(
                        [
                            html.H5("Investment Objective"),
                            html.P(
                                "\
                The multi-asset portfolio is to combine capital growth and modest income potential for medium term through an equal contribution\
                 to risk approach. The portfolio invests in diversified ETF instruments with global exposures by avoiding concentration of\
                 risk through the construction of a risk balanced portfolio. We manage risk and take advantage of traditional asset classes in a non-traditional way.",
                                style={"color": "#ffffff"},
                                className="row",
                            ),
                        ],
                        className="product",
                    ),
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Reasons for Investing"],
                                            className="subtitle padded"),
                                    html.
                                    P("• Invests in a mix of ETF diversified by asset\
                                            class, geographic region, economic sector and\
                                            investment style, aiming to maximize returns while\
                                            managing risk."),
                                    html.
                                    P("• Rigorous portfolio construction using 60/40 strategy to provide reasonable reuturns with bond like volatility, which lead to a high risk-adjusted return."
                                      ),
                                    html.
                                    P("• Traditional asset class allocations combined with equal risk to contribution strategy gives a competitive and robust portfolio."
                                      ),
                                ],
                                className="six columns",
                                style={"color": "#696969"},
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Average Annual Performance",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=df_performance["Date"],
                                                    y=df_performance[
                                                        "Portfolio"],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name=
                                                    "All-weather Portfolio",
                                                ),
                                                go.Bar(
                                                    x=df_performance["Date"],
                                                    y=df_performance[
                                                        "Benchmark"],
                                                    marker={
                                                        "color": "#dddddd",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name=
                                                    "S&P Risk Parity Benchmark",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 30,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range":
                                                    [0, 22.9789473684],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6("Risk Potential",
                                            className="subtitle padded"),
                                    html.Img(
                                        src=app.get_asset_url(
                                            "risk_reward.png"),
                                        className="risk-reward",
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Fund Essentials",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(df_essentials)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Allocations (%)"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(df_allocations)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        ["Composition"],
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        figure={
                                            'data': [{
                                                'labels':
                                                df_composition['Class'],
                                                'values':
                                                df_composition['Portfolio'],
                                                'marker': {
                                                    'colors': [
                                                        '#97140c',
                                                        '#ff9900',
                                                        '#f8e0b0',
                                                        '#93b5cf',
                                                        '#1ba784',
                                                        '#ad6598',
                                                        '#696969',
                                                    ]
                                                },
                                                'hole':
                                                .3,
                                                'type':
                                                'pie',
                                                'name':
                                                "Portfolio",
                                                'hoverinfo':
                                                'label+percent+name',
                                                # 'sort': false,
                                            }],
                                            'layout': {
                                                'autosize': True,
                                                'width': 350,
                                                'height': 200,
                                                'font': {
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                'margin': {
                                                    "r": 0,
                                                    "t": 50,
                                                    "b": 0,
                                                    "l": 10,
                                                },
                                            }
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "15px"},
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6("Growth of $100K",
                                            className="subtitle padded"),
                                    dcc.Graph(
                                        id="graph-4",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=df_port["Date"],
                                                    y=df_port["accountCAD"],
                                                    line={"color": "#ff9900"},
                                                    mode="lines",
                                                    name="CAD Account",
                                                ),
                                                go.Scatter(
                                                    x=df_port["Date"],
                                                    y=df_port["accountUSD"],
                                                    line={"color": "#f8e0b0"},
                                                    mode="lines",
                                                    name="USD Account",
                                                ),
                                                go.Scatter(
                                                    x=df_port["Date"],
                                                    y=df_port["portfolio"],
                                                    line={"color": "#97140c"},
                                                    mode="lines",
                                                    name=
                                                    "All-weather Portfolio",
                                                ),
                                                go.Scatter(
                                                    x=df_benchmark["Date"],
                                                    y=df_benchmark["Benchmark"],
                                                    line={"color": "#b5b5b5"},
                                                    mode="lines",
                                                    name=
                                                    "S&P Risk Parity Benchmark",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                width=700,
                                                height=200,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                margin={
                                                    "r": 30,
                                                    "t": 30,
                                                    "b": 30,
                                                    "l": 30,
                                                },
                                                showlegend=True,
                                                titlefont={
                                                    "family": "Raleway",
                                                    "size": 10,
                                                },
                                                xaxis={
                                                    "autorange":
                                                    True,
                                                    "range": [
                                                        "2007-12-31",
                                                        "2018-03-06",
                                                    ],
                                                    "rangeselector": {
                                                        "buttons": [
                                                            {
                                                                "count":
                                                                1,
                                                                "label":
                                                                "1Y",
                                                                "step":
                                                                "year",
                                                                "stepmode":
                                                                "backward",
                                                            },
                                                            {
                                                                "count":
                                                                3,
                                                                "label":
                                                                "3Y",
                                                                "step":
                                                                "year",
                                                                "stepmode":
                                                                "backward",
                                                            },
                                                            {
                                                                "count": 5,
                                                                "label": "5Y",
                                                                "step": "year",
                                                            },
                                                            {
                                                                "label": "All",
                                                                "step": "all",
                                                            },
                                                        ]
                                                    },
                                                    "showline":
                                                    True,
                                                    "type":
                                                    "date",
                                                    "zeroline":
                                                    False,
                                                },
                                                yaxis={
                                                    "autorange":
                                                    True,
                                                    "range": [
                                                        18.6880162434,
                                                        278.431996757,
                                                    ],
                                                    "showline":
                                                    True,
                                                    "type":
                                                    "linear",
                                                    "zeroline":
                                                    False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Portfolio Holdings"],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_holdings),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 9
0
def create_layout(app, df_head, df_target_count):

    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Basic KPIs"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    This section provides basic information about the dataset provided.\
                                    The rest of the analysis is available by clicking on the next tabs.\
                                    Note that it's possible to have a look at the entire analysis by clicking\
                                    on the Full View tab.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div([
                                html.H6(["DataFrame Overview"],
                                        className="subtitle padded"),
                                html.Table(make_dash_table(df_head)),
                            ],
                                     #className="six columns",
                                     ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Hypothetical growth of $10,000",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=[
                                                        "2008",
                                                        "2009",
                                                        "2010",
                                                        "2011",
                                                        "2012",
                                                        "2013",
                                                        "2014",
                                                        "2015",
                                                        "2016",
                                                        "2017",
                                                        "2018",
                                                    ],
                                                    y=[
                                                        "10000",
                                                        "7500",
                                                        "9000",
                                                        "10000",
                                                        "10500",
                                                        "11000",
                                                        "14000",
                                                        "18000",
                                                        "19000",
                                                        "20500",
                                                        "24000",
                                                    ],
                                                    line={"color": "#97151c"},
                                                    mode="lines",
                                                    name=
                                                    "Calibre Index Fund Inv",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                title="",
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                width=340,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0277108433735,
                                                    "y": -0.142606516291,
                                                    "orientation": "h",
                                                },
                                                margin={
                                                    "r": 20,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor":
                                                    "rgb(0, 0, 0)",
                                                    "linewidth": 1,
                                                    "range": [2008, 2018],
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, 30000],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "$",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 10
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Project summary"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    Using a mix of quantitative and qualitative methods we are examining the ways \
                                    in which the transport sector can drastically reduce its greenhouse gas \
                                    emissions by 2050. Initially, we will collect data from previous research \
                                    and from discussions with various experts during workshops to look for options \
                                    and measures for reducing greenhouse gases in the transport sector. We will \
                                    then develop a range of scenarios for successfully reducing emissions in the \
                                    transport sector by 2050, and calculate the economic effects for Switzerland \
                                    (change in employment, GDP) with an economic equilibrium model. From these \
                                    results and in dialogue with experts and based on an optimisation concept \
                                    we will create a path that will show over time how a new approach to \
                                    mobility can be economically viable.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Macroeconomic and energy indicators"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(id="graph-2", figure=fig2),
                                    dcc.Dropdown(id='yaxis-column',
                                                 options=[{
                                                     'label': ind,
                                                     'value': ind
                                                 } for ind in indicators],
                                                 value='Consumption (nv)')
                                ],
                                style={
                                    "width": "50%",
                                    "float": "left"
                                },
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Private car stock",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(id="graph-1", figure=fig),
                                ],
                                style={
                                    "width": "50%",
                                    "float": "left"
                                },
                                className="six columns",  # px
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Scenarios analyzed"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 11
0
            ],
            className="product",
        )
    ],
    className="row",
)

layout_graphs = html.Div(
    [
        html.H5(
            ["Yearly Revenue (w/ YoY % change)"],
            className="subtitle padded",
        ),
        html.Div(
            [
                html.Table(make_dash_table(df_yearly_revenue)),
            ],
            className="row",
        ),
        dcc.Graph(
            id="graph-yearly-performance",
            figure=px.bar(
                df_yearly_performance,
                x="Year",
                y="value",
                color="variable",
                barmode="group",
                title="Yearly Revenue and Gross Profit",
                labels={"value": "$"},
            ).update_yaxes(tickprefix="$"),
        ),
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Executive Summary"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    Over the course of 2019, the Bakar Fitness Center's Indoor Pool was patronized at least 43,067 times over \
                                    324 days; on average, the pool was patronized 133 times per day. \
                                    Lifeguards, who are tasked with tallying pool attendance every 30 minutes on the \
                                    15-minute mark, recorded collectively 5,581 tallies, totaling 167,430 minutes worth \
                                    of data, or an average of 9 operational pool hours per day (out of an estimated maximum of \
                                    12 hours on most days). While Lap Swim is the pool activity which saw the most cumulative \
                                    annual patronage (accounting for nearly a third of all patrons), the busiest days occured during Family Swim \
                                    programming on weekends. The busiest months were January and September respectively, a trend that can \
                                    be reasonably correlated to the start of the University's academic calendar for the Fall & \
                                    Winter Quarters. Included in this report are two analytical case studies: 1) a comparison of \
                                    attendance between weekends with scheduled lessons and those with none, and 2) change in patronage \
                                    during early morning Lap Swim programming on weekdays.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                    html.Hr([]),
                                    html.P(
                                        "\
                                    Throughout the report, the term “patronage“ refers to \
                                    the usage of the facility by undefined individuals. That is, we cannot assess whether these \
                                    are unique or reoccuring patrons for any given time.",
                                    ),
                                    html.P(
                                        "\
                                    Water Exercise includes tallies for Water Walking and Aqua Fit.",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Fast Facts"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(df_tally2019_facts)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "2019 Total Patronage per Activities",
                                        className="subtitle padded",
                                    ),
                                    html.Iframe(
                                        src="//plotly.com/~HP-Nunes/243.embed",
                                        width="350",
                                        height="500"),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "10px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.H5("Recommendations"),
                            html.Br([]),
                            html.P(
                                "\
                                    The following are a set of recommendations in order to ensure \
                                    that future tallying records improve in accuracy, fidelity, \
                                    and completedness, with the intent to generate greater patronage insights:",
                                style={"color": "black"},
                                className="row",
                            ),
                            html.Li(
                                "\
                                    A Well-Defined and Consistent Data-Entry Protocol: Consistently digitizing \
                                    the records on a regular basis (weekly preferrably) would allow to identify \
                                    tallying errors or incoherences between programming and attendance. It would \
                                    also decrease the risk of data-entry errors, or data loss (as shown with the \
                                    four weeks' worth of missing tallies in the Fall).",
                            ),
                            html.Li(
                                "\
                                    Tally Annotations: Perhaps adding a section on the Tally Sheets to make note of \
                                    'irregularities' either in scheduling or activity would allow for higher accuracy \
                                     during data-entry.", ),
                            html.Li(
                                "\
                                     Tallying Accountability: Although tallying is not the most important or \
                                     pressing of tasks, lifeguards are nonetheless liable to tally and should be able \
                                     to do so consistently. Thus, a tally completedness score per scheduling \
                                     cycles would permit to evaluate overall staff performance on the matter, but also ensure that \
                                     enough tallies are collected on a daily basis so that meaningful inferences about \
                                     long-term trends can be made.", ),
                            html.Li(
                                "\
                                     Normalizing Patronage to Unique Patrons: either through the use of selective sampling \
                                     or a survey, normalize patronage down to unique patrons. This would allow to derive \
                                     a supplementary and meaningful metric for analysis.",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 13
0
def create_layout(app):
    return html.Div(
        [
            #header(app),
            html.Div(
                [
                    "证券研究报告"
                ],
                className = "header",
            ),
    
            html.Div(
                [
                    html.Div(
                        [
                            html.Div(["公司研究/公告点评"], id = "title_part1",),
                            html.Div(["2020年06月07日"], id = "title_part2",),
                        ],
                        id = "title_left",
                    ),
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Div(["交运设备/汽车整车 II"], id = "title_part3",),
                                ],
                                id = "category",
                            ),
                        ],
                        id = "title_right",
                    ),
                ],
                className = "title",
            ),
            html.Div(
                [
                    html.Div(
                        [
                            html.Div(
                                [
                                   
                                    html.Div(
                                        [
                                           "投资评级:买入(维持评级)"
                                        ],
                                        className = "section_title",
                                    ),
                                    html.Div(
                                        [
                                        
                                            html.Div(
                                                [
                                                    html.P(["当前价格(元):"]),
                                                    html.P(["合理价格区间(元): "]),
                                                ],
                                                id = "subsect1_left",
                                            ),
                                            html.Div(
                                                [
                                                    html.P(["18.23"]),
                                                    html.P(["24.64~26.40"]),
                                                ],
                                                id = "subsect1_right",
                                            ),
                                            html.Div([], id = "border_bot"),
                                            html.Div(
                                                [
                                                    html.Div(["林志轩"], className = "staff_name"),
                                                    html.Div(["研究员"], className = "staff_position"),
                                                    html.Div(["刘千琳"], className = "staff_name"),
                                                    html.Div(["研究员"], className = "staff_position"),
                                                    html.Div(["王涛"], className = "staff_name"),
                                                    html.Div(["研究员"], className = "staff_position"),
                                                    html.Div(["邢重阳"], className = "staff_name"),
                                                    html.Div(["联系人"], className = "staff_position"),
                                                ],
                                                id = "staff_info",
                                            ),
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            "执业证书编号:S0570519060005", 
                                                            html.Br(),
                                                            "021-28972090 ",
                                                            html.Br(),
                                                            "*****@*****.**",
                                                        ], 
                                                        className = "contact_info",
                                                    ),
                                                    html.Div(
                                                        [
                                                            "执业证书编号:S0570518060004",
                                                            html.Br(),
                                                            "021-28972076",
                                                            html.Br(),
                                                            "*****@*****.**",
                                                        ], 
                                                        className = "contact_info",
                                                    ),
                                                    html.Div(
                                                        [
                                                            "执业证书编号:S0570519110001",
                                                            html.Br(),
                                                            "021-28972053",
                                                            html.Br(),
                                                            "*****@*****.**",
                                                        ], 
                                                        className = "contact_info",
                                                    ),
                                                    html.Div(
                                                        [
                                                            "021-38476205 ",
                                                            html.Br(),
                                                            "*****@*****.**"
                                                        ], 
                                                        className = "contact_info",
                                                    ),
                                                ],
                                                id = "staff_contact",
                                            ),
                                        ],
                                        id = "subsect1",
                                    ),
                                ],
                                className = "block1",
                            ),
                           
                            html.Div(
                                [
                                    html.Div(
                                        [
                                            "相关研究"
                                        ],
                                        className = "section_title",
                                    ),
                                    html.Div(
                                        [
                                            "1《上汽集团(600104 SH,买入): 19 盈利下滑 29%,龙头整装再出发》2020.01"
                                        ],
                                        className = "study_details",
                                    ),
                                    html.Div(
                                        [
                                            "2《上汽集团(600104 SH,买入): 产量同比提 升,批发销量跌幅收窄》2019.09"
                                        ],
                                        className = "study_details",
                                    ),
                                    html.Div(
                                        [
                                            "3《上汽集团(600104 SH,买入): Q2 终端折扣 大,业绩略低于预期》2019.08"
                                        ],
                                        className = "study_details",
                                    ),
                                ],
                                className = "block2",
                            ),
                            html.Div(
                                [
                                    html.Div(
                                        [
                                            "一年股价走势图"
                                        ],
                                        className = "section_title",
                                    ),
                                    
                                    html.Div(
                                        [
                                            html.Img(src=app.get_asset_url('stocks.png')),
                                        ],
                                        className = "stocks_graph",
                                    ),
                                ],
                                className = "block3",
                            ),
                        ],
                        className = "col_left",
                    ),
                    html.Div(
                        [
                            html.Div(
                                [
                                "5月国内销量转正,上汽大众待改善"
                                   
                                ],
                                className = "cr_title",
                            ),
                            html.Div(
                                [
                                    "上汽集团(600104)"
                                ],
                                className = "cr_title2",
                            ),
                            html.Div(
                                [
                                    "5月国内销量增速转正,批发销量增速或弱于行业"
                                ],
                                className = "para_title",
                            ),
                            html.Div(
                                [
                                    "6月5日,公司发布5月销量情况。5月公司实现批发销量47.3万台,同比-1.6%,其中国内销量45.6万台,同比+0.3%。根据中汽协预测,5月汽车 销量同比+11%,上汽销量增速弱于行业,主要原因是受海外疫情影响,出口销量大幅下滑,同时上汽大众销量下滑。我们认为随着疫情结束,汽车需 求有望逐步恢复,Q2 汽车行业批发销量有望转正。随着行业恢复和公司战 略调整进一步深入,公司销量和归母净利润有望逐季恢复,预计 20-22 年 EPS 分别为 1.76、1.98、2.17 元,维持“买入”评级。"
                                ],
                                className = "para_body",
                            ),
                            html.P(),
                            html.Div(
                                [
                                    "上汽通用五菱销量改善明显,上汽通用、自主跌幅收窄"
                                ],
                                className = "para_title",
                            ),
                            html.Div(
                                [
                                    "5 月,上汽大众批发销量 13 万台,同比-15%,上汽通用批发销量 13.6 万 台,同比-3.6%,上汽自主批发销量 5.2 万台,同比-5%,上汽通用五菱批 发销量 12 万台,同比+11%;上汽大通销量 1.6 万台,同比+61%;上汽红 岩销量 10109 台,同比+110%。上汽集团开展了“五五”购物节促销活动, 商用车销量增长迅速,国内批发销量转正。上汽通用五菱战略转型后推出 了较多新车型,销量情况有明显改善。上汽通用三缸机车型逐步转回四缸 机,销量跌幅收窄。上汽自主新车 RX5 Plus 新车上市,销量跌幅收窄。细 分市场竞争激烈,上汽大众销量仍有下滑。"
                                ],
                                className = "para_body",
                            ),
                            html.P(),
                            html.Div(
                                [
                                    "上汽通用三缸机逐步转回四缸机,上汽自主 RX5 Plus 开启预售"
                                ],
                                className = "para_title",
                            ),
                            html.Div(
                                [
                                    "2019 年上汽通用批发销量同比-19%,其中一个原因是三缸机车型不受国 内消费者欢迎,上汽通用英朗、威朗等 13 个车型有三缸机版本。从 2020 年 4 月开始,上汽通用逐步将三缸机车型转回四缸,英朗和科鲁泽已经转 为四缸车型。5 月 4 日,RX5 Plus 开启预售,该车型是上汽自主主力车型 rx5 中期改款,新车共推出三个版本,官方预售价 12.28~13.98 万元。我 们认为新车在前脸设计、内饰设计和智能网联配置上有较大改善,RX5 Plus 有望帮助上汽自主提升 10~15 万紧凑型 SUV 细分领域市占率,上汽自主 销量有望逐季改善。"
                                ],
                                className = "para_body",
                            ),
                            html.P(),
                            html.Div(
                                [
                                    "销量和利润有望逐季改善,维持“买入”评级"
                                ],
                                className = "para_title",
                            ),
                            html.Div(
                                [
                                    "上汽通用和上汽通用五菱销量情况正在逐步改善。2020 年 Q4 上汽大众 MEB 工厂有望投产,上汽大众有望在新能源汽车领域取得突破。2021 年 上汽奥迪投产在望,公司进一步布局豪华车领域,未来发展值得期待。我 们预计公司 2020-22 年分别实现归母净利 205、231、254 亿元,EPS 分 别为 1.76、1.98、2.17 元,同行业可比公司 20 年平均估值 16.8XPE, 考虑到公司业绩弹性略弱于可比公司,维持公司 20 年 14~15XPE 估值, 维持目标价 24.64~26.4 元,维持“买入”评级。 "
                                ],
                                className = "para_body",
                            ),
                            html.P(),
                            html.Div(
                                [
                                    "风险提示:我国汽车销量增速不及预期,公司海外市场拓展不及预期。"
                                ],
                                className = "para_body",
                            ),
                        ],
                        className = "col_right",
                    ),
                    html.Div(
                        [
                            
                            html.Div(
                                [   
                                    html.Div(
                                        [
                                            "公司基本资料"
                                        ],
                                        className = "section_title",
                                    ),
                                    
                                    html.Div(
                                        [
                                            html.Table(make_dash_table(stocks_asset)),
                                        ],
                                        id = "table1",
                                    ),
                                ],
                                id = "block4",
                            ),
                            
                            html.Div(
                                [
                                    html.Div(
                                        [
                                            "经营预测指标与估值"
                                        ],
                                        className = "section_title",
                                    ),
                                    html.Table(make_dash_table(accounting)),
                                ],
                                id = "block5",
                            ),
                        ],
                        className = "col_bot",
                    ),
                ],
                className = "body",
            ),
        ],
        className = "page",
    )
Esempio n. 14
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.
                                    H5("Extractive Summary - Cyborg Supervision"
                                       ),
                                    html.Br([]),
                                    html.P(
                                        "So – along the same lines pursued by law firms for example – one big win is the ability to produce structured data from a range of sources, the analysis of which traditionally required significant manual effort. For example, while ML models could alter banks’ trading and retail businesses – enabling them to make better decisions more quickly – the opacity, however, of these models may also make them more difficult for humans to understand. At the macroeconomic level, changes in technology, including AI, could, over time, profoundly affect the nature of the financial services consumed and may result inchanges to the structure of the financial services industry. A typical problem faced by supervisors, for example, is the ‘needle-in-a-haystack’ problem: if something is going wrong in a firm, it can be necessary to find out who in the firm made relevant decisions, based on what information, and why the checks and balances of the firm – the board, and second and third lines of defence – did not work. To achieve complex supervisory outcomes – which often require significant, multi-year remediation by firms – boards and senior management of firms have to understand the context and rationale for what we are trying to achieve, as well as what we would deem to be a successful outcome.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Bigrams & Trigrams"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(df_bi_tr_grams)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Key words",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        11,
                                                        12,
                                                        12,
                                                        20,
                                                        27,
                                                    ],
                                                    y=[
                                                        'supervisory',
                                                        'ML',
                                                        'machine',
                                                        'firms',
                                                        "data",
                                                    ],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Word frequency",
                                                    orientation='h',
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 0,
                                                    "b": 10,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Lexical Dispersion",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=lexical_disp['position'],
                                                    y=lexical_disp['word'],
                                                    line={"color": "#97151c"},
                                                    mode="markers",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                title="",
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=160,
                                                width=340,
                                                hovermode="closest",
                                                margin={
                                                    "r": 20,
                                                    "t": 0,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor":
                                                    "rgb(0, 0, 0)",
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "Word Offset",
                                                    "type": "linear",
                                                    'automargin': True,
                                                },
                                                yaxis={
                                                    "autorange":
                                                    True,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "showgrid":
                                                    True,
                                                    "type":
                                                    "category",
                                                    'categoryorder':
                                                    'array',
                                                    'categoryarray': [
                                                        'supervisory', 'ML',
                                                        'machine', 'firms',
                                                        'data'
                                                    ]
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Entity Recognition",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(entity_rec)),
                                ],
                                className="six columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 15
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Kim's Corner"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit, \
                                            sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\
                                            Facilisis sed odio morbi quis commodo odio. Ac turpis egestas integer\
                                            eget aliquet nibh praesent tristique. Quam vulputate dignissim suspendisse \
                                            in est ante in nibh mauris. Volutpat sed cras ornare arcu dui vivamus arcu.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Operations Highlights"],
                                            className="subtitle"),
                                    html.Br([]),
                                    html.Div(
                                        [
                                            html.Div(
                                                [
                                                    html.Br([]),
                                                    html.Strong(
                                                        [
                                                            "Employee Engagement Index"
                                                        ],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    )
                                                ],
                                                className=
                                                "three columns right-aligned",
                                            ),
                                            html.Div(
                                                [
                                                    html.Br([]),
                                                    html.Strong(
                                                        [
                                                            "Highlighting the results:"
                                                        ],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "EEI scores saw year over-year boosts from 62% to 69% in engagement and 53% to 77% in participation. \
                                                    Notable improvements: 13% in the belief that your job offers development opportunities, 12% in your \
                                                    manager communicates their expectations and, 10% in regularly receiving performance feedback."
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        [
                                                            "Several areas we are focused on improving:"
                                                        ],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "\
                                                    • The rationale behind business decisions is clear to me (50%) \
                                                    "
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "\
                                                    • Lumen makes it easy for me to deliver the desired customer experience (59%) \
                                                    "
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "\
                                                    • My job offers development opportunities (56%) \
                                                    "
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        ["We're Listening:"],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "\
                                                    My leadership team and I continue our commitment to you as we head towards 2021, \
                                                    seeking to identify opportunities and take action to make further improvements in \
                                                    all areas."
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                ],
                                                className="nine columns",
                                            ),
                                        ],
                                        className="row",
                                        style={
                                            "background-color": "#f9f9f9",
                                            "padding-bottom": "30px",
                                        },
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        style={"margin-bottom": "35px"},
                        className="row",
                    ),
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Happy Thanksgiving!"],
                                            className="subtitle"),
                                    html.Br([]),
                                    html.Div(
                                        [
                                            html.Div(
                                                [
                                                    html.Br([]),
                                                    html.Strong(
                                                        ["From Our Team"],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    )
                                                ],
                                                className=
                                                "three columns right-aligned",
                                            ),
                                            html.Div(
                                                [
                                                    html.Br([]),
                                                    html.Strong(
                                                        [
                                                            "If Lumen was a pie, then we are all the ingredients to making it Amazing!"
                                                        ],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    ),
                                                    html.Br([]),
                                                    html.Br([]),
                                                    html.P(
                                                        [
                                                            "Thanksgiving is a time to remember that “now is no time to think of what you do not have. Think of what you can do with what there is.” – Ernest Hemingway"
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        [
                                                            "'No Bake' Pumpkin Cheesecake"
                                                        ],
                                                        style={
                                                            "color": "#515151"
                                                        },
                                                    ),
                                                    html.P(
                                                        [
                                                            "We've included a recipe from one of our team members below....."
                                                        ],
                                                        style={
                                                            "color": "#7a7a7a"
                                                        },
                                                    ),
                                                    html.Br([]),
                                                    html.Img(
                                                        src=
                                                        'https://i.ibb.co/TBzt0Sm/Picture1.jpg'
                                                    )
                                                ],
                                                className="nine columns",
                                            ),
                                        ],
                                        className="row",
                                        style={
                                            "background-color": "#f9f9f9",
                                            "padding-bottom": "30px",
                                        },
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Ingredients"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(["Instructions"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_price_perf)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 16
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 2
            html.Div(
                [
                    # Row
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6("Data Cleaning and Manipulation",
                                            className="subtitle padded"),
                                    #                                     html.Br([]),
                                    html.Div(
                                        [
                                            html.
                                            P("I filtered the original dataset based on the following criteria:"
                                              ),
                                            html.
                                            Li("I only retained tallies for 2019 (January 1st - December 31st);"
                                               ),
                                            html.
                                            Li("I excluded days with noted pool closures on: January, Thursday 17th \
                                                (from 5:45 am to 8:15 am); February, Sunday 10th to Thursday 14th (door-breaking incident), \
                                                and May, Sunday 26th at 10:45 am; "
                                               ),
                                            html.
                                            Li("I dropped rows if no tallies were taken for any Aquatic Activity \
                                                (i.e. Family Swim, Lap Swim, Water Excercise, and Aquatic Programs), i.e. if \
                                                the row only had NULL for any tally. You can think of those as missing tallies;"
                                               ),
                                            html.
                                            Li("IMPORTANT: The tally sheets for the period spanning October 21st to November 24th \
                                                were missing, which are equivalent to four weeks worth of tallies. Thus there is a \
                                                significant gap in the dataset for the Fall period. "
                                               ),
                                            html.
                                            P("As a result, approximately 45 % of all rows were retained from the original raw \
                                                dataset, with a count breakdown per Aquatic Activity summarized in the table below:"
                                              ),
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            html.Table(
                                                                make_dash_table(
                                                                    SampleSizeoftheFiltered30minIncrementalDataset
                                                                ),
                                                                className=
                                                                "tiny-header",
                                                            )
                                                        ],
                                                        style={
                                                            "overflow-x":
                                                            "auto"
                                                        },
                                                    ),
                                                ],
                                                className="twelve columns",
                                            ),
                                            html.Div([
                                                html.Div([
                                                    html.
                                                    P("The filtered dataset represents a total of 167,430 minutes, or approximately \
                                                over 116 days, for which tallies were recorded. There were 241 recorded instances \
                                                of 0 swimmers, equivalent to 7,230 minutes or approximately 5 days. \
                                                Do note however that, once the dataset is grouped by the day, these 167,430 minutes \
                                                of collected tallies are spread over 314 days, roughly equivalent of 9 hours worth of \
                                                collected tallies per day on average. For added context, if we assume on most weekdays \
                                                that the pool is operational from 5:30 am to 9:30 pm, and closed from 12:00 pm to 4 pm, \
                                                usual operational hours at the Indoor Pool should be amounting close to 12 hours. \
                                                Holidays were defined by the Fitness Facility’s Holiday Schedules, transposed for 2019."
                                                      ),
                                                ], ),
                                            ], ),
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="row",
                            ),
                            html.Div([
                                html.Br([]),
                                html.H6(
                                    "Data Table: Patronage per Day",
                                    className="subtitle padded",
                                ),
                                html.Iframe(
                                    src="//plotly.com/~HP-Nunes/241.embed",
                                    width="100%",
                                    height="400")
                            ]),
                            html.Div([
                                html.Br([]),
                                html.H6(
                                    "Daily Patronage Timeseries",
                                    className="subtitle padded",
                                ),
                                html.Iframe(
                                    src="//plotly.com/~HP-Nunes/250.embed",
                                    width="100%",
                                    height="600"),
                            ]),
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.
                                    H6("Descriptive Statistics of Daily Patronage",
                                       className="subtitle padded"),
                                    #                                     html.Br([]),
                                    html.Div(
                                        [
                                            html.
                                            P("I dropped rows where the number of tallies grouped by the day where below \
                                                two standard deviation from the mean. In other words, from a maximum of 32 tallies \
                                                that can be taken per day, I dropped those which had fewer than 7 entries (given the \
                                                average was close to 18 tallies/days)."
                                              ),
                                            html.
                                            P("I ended-up removing about 10 entries (or days) down to a total of 314 days. I deemed \
                                                this to be a necessary step in order to remove tallies with–for the most part–deflated \
                                                values, thereby filtering out outlier values from the dataset."
                                              ),
                                            html.Br([]),
                                            html.
                                            P("Statistical Summary of Daily Patronage for 2019:"
                                              ),
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            html.Table(
                                                                make_dash_table(
                                                                    StatisticalSummaryofDailyPatronageofBakarIndoorPoolfor2019
                                                                ),
                                                                className=
                                                                "tiny-header",
                                                            )
                                                        ],
                                                        style={
                                                            "overflow-x":
                                                            "auto"
                                                        },
                                                    ),
                                                ],
                                                className="twelve columns",
                                            ),
                                            html.Div([
                                                html.Div([
                                                    html.
                                                    P("The distribution of total daily patronage follows a normal distribution \
                                                skewing to the right, with a daily average of 136 patrons. The right-skewing in \
                                                the histogram can be explained by a many handful of outliers where attendance was \
                                                very high (with a recorded maximum of 679 daily patrons)."
                                                      ),
                                                    html.Img(
                                                        src=app.get_asset_url(
                                                            "boxplot1.png"),
                                                        className="plot",
                                                    ),
                                                    html.
                                                    P("From the boxplot above, note that the median is equal to 106 daily patrons, a useful comparative statistic to the mean (shown as the green triangle), as the median is less suceptible to outlier values. That being said, since the distribution is approximately Gaussian (bell-curved), the mean should be approximate to the “real mean” of the population; i.e. the average daily patronage if we had 100% of all tallies recorded."
                                                      ),
                                                ], ),
                                            ], ),
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="row",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 17
0
def create_layout(app, ExpID, projectname=projectname):
    ### Read experiment specific learnings

    try:
        aim = dfrunmaster[dfrunmaster.ExpID == ExpID]['Description'].values[0]
        param = dfrunmaster[dfrunmaster.ExpID == ExpID]['Params'].values[0]
        param = ast.literal_eval(param)

        exppath = param['Artefacts']
        dffeatobs = pd.read_csv(f"{exppath}/observations.csv")

        if os.path.exists(f"{exppath}/importance.csv"):
            imp = pd.read_csv(f"{exppath}/importance.csv")
            imp.columns = [i.lower() for i in imp.columns]
            imp = imp.groupby('feature',
                              as_index=False).agg({'importance': 'sum'})
            imp['importance'] = imp['importance'] / sum(imp['importance'])

            topfeatures = imp.sort_values(by='importance',
                                          ascending=False).head(10)
            topfeatures.sort_values(by='importance',
                                    ascending=True,
                                    inplace=True)
    except:
        return html.Div()

    return html.Div(
        [
            html.Div([Header(app, projectname)]),
            html.Div(
                [
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(f"Experiment{ExpID} : {aim}"),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        f"Top 10 Features",
                                        className="subtitle padded",
                                    ),
                                    create_feature_imp_plot(
                                        topfeatures, "graph-4",
                                        topfeatures['importance'],
                                        "<b>Importance : %{x:.02f}")
                                ],
                                className="seven columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Observations from Features",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(dffeatobs)),
                                ],
                                className="five columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 18
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 5
            html.Div(
                [
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["DATASE CAD/USD"],
                                            className="subtitle padded"),
                                    html.P(
                                        [
                                            "Datasate available in Yahoo FInance"
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.H6(
                                        ["Date,value, Open"],
                                        className="subtitle tiny-header padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_graph),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={
                                            "overflow-x": "auto",
                                            'height': '350px',
                                            'overflow': 'scroll',
                                        },
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div([html.H6(["Data saved"])])
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 19
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 1 - Texto
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Resumo do App"),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    Por meio dos dados abertos é disponibilizado pelo IBAMA uma base de registros de comunicação de acidentes ambientais. Aqui temos uma análise desses dados afim de encontrar informações relevantes e insights importantes sobre acidentes ambientais no Brasil.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 2 - Resumo e Tipos Eventos
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Resumo dos Acidentes"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_resumo)),
									html.P(
                                        [
                                            "Um resumo geral de algumas informações que chamam atenção e podem ser relavantes. Podemos identificar o periodo dos registros, o total de registros, o estado com maior número de acidentes dentre outras informações."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Top 5 Tipos de Eventos",
                                        className="subtitle padded",
                                    ),
									dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    y=df_tipo_evento['Quantidade'],
                                                    x=df_tipo_evento['Tipo Evento'],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color": "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Eventos",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                autosize=False,
                                                bargap=0.4,
                                                font={"family": "Raleway", "size": 10},
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    #"range": [-0.5, 2000],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor": "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, tipo_evento_max],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
									html.P(
                                        [
                                            "Informações de quais são os tipos de acidentes mais comuns. Aqui já podemos ver que o tipo mais comum, não podemos identificar e ele corresponde a mais de 50% dos acidentes."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 3 - Instituições e Origens
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Top 5 Origens Acidentes",
                                        className="subtitle padded",
                                    ),
									dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=df_origem['Origem'],
                                                    y=df_origem['Quantidade'],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color": "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Origens",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                autosize=False,
                                                bargap=0.4,
                                                font={"family": "Raleway", "size": 10},
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    #"range": [-0.5, 2000],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor": "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, origem_max],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
									html.P(
                                        [
                                            "Na origem dos acidentes, o notável é que são as rodovias a mais comum das origens, revelando outros problemas do Brasil. Problemas de educação no trânsito, problemas nas estradas que são problemas não só para acidentes ambientais."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        ["Porcentagem Atuação das Principais Instituições"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_institiuicoes_atuando)),
									html.P(
                                        [
                                            "Nas instituições fica um pensamento, por que em mais de 50% dos acidentes ambientais, não tem atuação de orgão oficiais do governo? Logo pensamos, será que a maioria dos acidentes ambientais os culpados não são punidos?"
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 20
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 2
            html.Div(
                [
                    # Row
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Precios actuales"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_current_prices)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        ["Precios históricos"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(df_hist_prices)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6("Comportamiento", className="subtitle padded"),
                                    dcc.Graph(
                                        id="graph-4",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=df_graph["Date"],
                                                    y=df_graph["Calibre Index Fund"],
                                                    line={"color": "#97151c"},
                                                    mode="lines",
                                                    name="Calibre Index Fund",
                                                ),
                                                go.Scatter(
                                                    x=df_graph["Date"],
                                                    y=df_graph[
                                                        "MSCI EAFE Index Fund (ETF)"
                                                    ],
                                                    line={"color": "#b5b5b5"},
                                                    mode="lines",
                                                    name="MSCI EAFE Index Fund (ETF)",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                autosize=True,
                                                width=700,
                                                height=200,
                                                font={"family": "Raleway", "size": 10},
                                                margin={
                                                    "r": 30,
                                                    "t": 30,
                                                    "b": 30,
                                                    "l": 30,
                                                },
                                                showlegend=True,
                                                titlefont={
                                                    "family": "Raleway",
                                                    "size": 10,
                                                },
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        "2007-12-31",
                                                        "2018-03-06",
                                                    ],
                                                    "rangeselector": {
                                                        "buttons": [
                                                            {
                                                                "count": 1,
                                                                "label": "1Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "count": 3,
                                                                "label": "3Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "count": 5,
                                                                "label": "5Y",
                                                                "step": "year",
                                                            },
                                                            {
                                                                "count": 10,
                                                                "label": "10Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "label": "All",
                                                                "step": "all",
                                                            },
                                                        ]
                                                    },
                                                    "showline": True,
                                                    "type": "date",
                                                    "zeroline": False,
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        18.6880162434,
                                                        278.431996757,
                                                    ],
                                                    "showline": True,
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Retorno promedio anual--actualizado mensualmente al 02/28/2018"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_avg_returns),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Retorno después de impuestos--actualizado trimestral al 12/31/2017"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_after_tax),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Retorno de inversiones recientes"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(
                                        make_dash_table(df_recent_returns),
                                        className="tiny-header",
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
def create_layout(app):
    fig_battery = []
    fig_location = []
    fig_device_trans = []

    df = pd.read_csv(csv_files[0])
    df_fund_facts = pd.DataFrame()
    df_fund_facts["label"] = df.columns
    df_fund_facts["value"] = df.iloc[1, :].values.tolist()
    # fig = get_dataframe_for_plotting_transmission()
    selected_device_trans = [0, 1, 2]
    for each_fig in selected_device_trans:
        df_date = get_dataframe_for_plotting_transmission(each_fig)
        device1 = plot_function_bar(df_date, each_fig)
        fig_device_trans.append(device1)
    selected_battery = [0]
    for each_fig in selected_battery:
        df_date = get_dataframe_for_plotting_transmission(each_fig)
        device1 = plot_function(df_date)
        # fig_battery = device1
        fig_battery.append(device1)
    selected_location = [0]
    # for each_fig in selected_location:
    fig_location = get_figure(selected_location)
    data_location = fig_location['data']

    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H5("Product Summary"),
                                    html.Br([]),
                                    html.P(
                                        "Wildly Listen Product Specifications and Operations in detail",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Device Details"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Transmission Performance",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data":
                                            fig_device_trans,
                                            "layout":
                                            dict(
                                                autosize=False,
                                                bargap=0.4,
                                                font={
                                                    "family":
                                                    "Courier New, monospace",
                                                    "size": 10
                                                },
                                                height=500,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 10,
                                                    "t": 40,
                                                    # "b": 35,
                                                    # "l": 45,
                                                },
                                                showlegend=False,
                                                # title="Transmission",
                                                width=350,
                                                xaxis={
                                                    'title': 'Device ID',
                                                    'titlefont': {
                                                        'family':
                                                        'Courier New, monospace',
                                                        'size': 16,
                                                        'color': 'black'
                                                    }
                                                },
                                                yaxis={
                                                    'title': 'No. Files',
                                                    'titlefont': {
                                                        'family':
                                                        'Courier New, monospace',
                                                        'size': 16,
                                                        'color': 'black'
                                                    }
                                                })
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Battery Performance",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data":
                                            fig_battery,
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                font={
                                                    "family":
                                                    'Courier New, monospace',
                                                    "size": 8
                                                },
                                                height=400,
                                                width=350,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0277108433735,
                                                    "y": -0.142606516291,
                                                    "orientation": "h",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 0,
                                                    "b": 35,
                                                    "l": 45,
                                                },
                                                showlegend=False,
                                                xaxis={
                                                    'title': 'Time (Seconds) ',
                                                    'titlefont': {
                                                        'family':
                                                        'Courier New, monospace',
                                                        'size': 16,
                                                        'color': 'black'
                                                    }
                                                },
                                                yaxis={
                                                    'title':
                                                    'Battey Level (Percentage) ',
                                                    'titlefont': {
                                                        'family':
                                                        'Courier New, monospace',
                                                        'size': 16,
                                                        'color': 'black'
                                                    }
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                        style={"margin-bottom": "10px"}),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Location",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-3",
                                        figure={
                                            "data": data_location,
                                            "layout": fig_location["layout"]
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                style={
                                    "margin-right": "-20%",
                                    "margin-bottom": "10px"
                                },
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6("Device Health Status",
                                            className="subtitle padded"),
                                    html.Img(
                                        src=app.get_asset_url(
                                            "risk_reward.png"),
                                        className="risk-reward",
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Quick Facts"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_waste)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Bar Graph",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        "Factor 1",
                                                        "Factor 2",
                                                        "Factor 3",
                                                        "Factor 4",
                                                        "Factor 5",
                                                    ],
                                                    y=[
                                                        "21.67",
                                                        "11.26",
                                                        "15.62",
                                                        "8.37",
                                                        "11.11",
                                                    ],
                                                    marker={
                                                        "color": "#141E3C",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Group 1",
                                                ),
                                                go.Bar(
                                                    x=[
                                                        "Factor 1",
                                                        "Factor 2",
                                                        "Factor 3",
                                                        "Factor 4",
                                                        "Factor 5",
                                                    ],
                                                    y=[
                                                        "21.83",
                                                        "11.41",
                                                        "15.79",
                                                        "8.50",
                                                    ],
                                                    marker={
                                                        "color": "#dddddd",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Group 2",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range":
                                                    [0, 22.9789473684],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Line Graph",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=[
                                                        "2008",
                                                        "2009",
                                                        "2010",
                                                        "2011",
                                                        "2012",
                                                        "2013",
                                                        "2014",
                                                        "2015",
                                                        "2016",
                                                        "2017",
                                                        "2018",
                                                    ],
                                                    y=[
                                                        "10000",
                                                        "7500",
                                                        "9000",
                                                        "10000",
                                                        "10500",
                                                        "11000",
                                                        "14000",
                                                        "18000",
                                                        "19000",
                                                        "20500",
                                                        "24000",
                                                    ],
                                                    line={"color": "#E57200"},
                                                    mode="lines",
                                                    name="Factor 1",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                title="",
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                width=340,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0277108433735,
                                                    "y": -0.142606516291,
                                                    "orientation": "h",
                                                },
                                                margin={
                                                    "r": 20,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor":
                                                    "rgb(0, 0, 0)",
                                                    "linewidth": 1,
                                                    "range": [2008, 2018],
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, 30000],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "$",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6("Image",
                                            className="subtitle padded"),
                                    html.Img(
                                        src=app.get_asset_url(
                                            "landfill_waste.jpeg"),
                                        className="diagram",
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 23
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 3
            html.Div(
                [
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [html.H6(["Portfolio"], className="subtitle padded")],
                                className="twelve columns",
                            )
                        ],
                        className="rows",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.P(["Stock style"], style={"color": "#7a7a7a"}),
                                    dcc.Graph(
                                        id="graph-5",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=["1"],
                                                    y=["1"],
                                                    hoverinfo="none",
                                                    marker={"opacity": 0},
                                                    mode="markers",
                                                    name="B",
                                                )
                                            ],
                                            "layout": go.Layout(
                                                title="",
                                                annotations=[
                                                    {
                                                        "x": 0.990130093458,
                                                        "y": 1.00181709504,
                                                        "align": "left",
                                                        "font": {
                                                            "family": "Raleway, sans-serif",
                                                            "size": 7,
                                                            "color": "#7a7a7a",
                                                        },
                                                        "showarrow": False,
                                                        "text": "<b>Market<br>Cap</b>",
                                                        "xref": "x",
                                                        "yref": "y",
                                                    },
                                                    {
                                                        "x": 1.00001816013,
                                                        "y": 1.35907755794e-16,
                                                        "font": {
                                                            "family": "Raleway, sans-serif",
                                                            "size": 7,
                                                            "color": "#7a7a7a",
                                                        },
                                                        "showarrow": False,
                                                        "text": "<b>Style</b>",
                                                        "xref": "x",
                                                        "yanchor": "top",
                                                        "yref": "y",
                                                    },
                                                ],
                                                autosize=False,
                                                width=200,
                                                height=150,
                                                hovermode="closest",
                                                margin={
                                                    "r": 30,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 30,
                                                },
                                                shapes=[
                                                    {
                                                        "fillcolor": "#f9f9f9",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0,
                                                        "x1": 0.33,
                                                        "xref": "paper",
                                                        "y0": 0,
                                                        "y1": 0.33,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f2f2f2",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "dash": "solid",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.33,
                                                        "x1": 0.66,
                                                        "xref": "paper",
                                                        "y0": 0,
                                                        "y1": 0.33,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f9f9f9",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.66,
                                                        "x1": 0.99,
                                                        "xref": "paper",
                                                        "y0": 0,
                                                        "y1": 0.33,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f2f2f2",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0,
                                                        "x1": 0.33,
                                                        "xref": "paper",
                                                        "y0": 0.33,
                                                        "y1": 0.66,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f9f9f9",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.33,
                                                        "x1": 0.66,
                                                        "xref": "paper",
                                                        "y0": 0.33,
                                                        "y1": 0.66,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f2f2f2",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.66,
                                                        "x1": 0.99,
                                                        "xref": "paper",
                                                        "y0": 0.33,
                                                        "y1": 0.66,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f9f9f9",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0,
                                                        "x1": 0.33,
                                                        "xref": "paper",
                                                        "y0": 0.66,
                                                        "y1": 0.99,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": " #97151c",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.33,
                                                        "x1": 0.66,
                                                        "xref": "paper",
                                                        "y0": 0.66,
                                                        "y1": 0.99,
                                                        "yref": "paper",
                                                    },
                                                    {
                                                        "fillcolor": "#f9f9f9",
                                                        "line": {
                                                            "color": "#ffffff",
                                                            "width": 0,
                                                        },
                                                        "type": "rect",
                                                        "x0": 0.66,
                                                        "x1": 0.99,
                                                        "xref": "paper",
                                                        "y0": 0.66,
                                                        "y1": 0.99,
                                                        "yref": "paper",
                                                    },
                                                ],
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        0.989694747864,
                                                        1.00064057995,
                                                    ],
                                                    "showgrid": False,
                                                    "showline": False,
                                                    "showticklabels": False,
                                                    "title": "<br>",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        -0.0358637178721,
                                                        1.06395696354,
                                                    ],
                                                    "showgrid": False,
                                                    "showline": False,
                                                    "showticklabels": False,
                                                    "title": "<br>",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="four columns",
                            ),
                            html.Div(
                                [
                                    html.P(
                                        "Duo Esse Index Fund seeks to track the performance of\
                        a benchmark index that measures the investment return of large-capitalization stocks."
                                    ),
                                    html.P(
                                        "Learn more about this portfolio's investment strategy and policy."
                                    ),
                                ],
                                className="eight columns middle-aligned",
                                style={"color": "#696969"},
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Br([]),
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Equity characteristics as of 01/31/2018"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(
                                        make_dash_table(df_equity_char),
                                        className="tiny-header",
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Equity sector diversification"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(
                                        make_dash_table(df_equity_diver),
                                        className="tiny-header",
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 24
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 2
            html.Div(
                [
                    # Row
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Current Prices"], className="subtitle padded"
                                    ),
                                    html.Table(make_dash_table(df_current_prices)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        ["Historical Prices"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(df_hist_prices)),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6("Performance", className="subtitle padded"),
                                    dcc.Graph(
                                        id="graph-4",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=df_graph["Date"],
                                                    y=df_graph["Duo Esse Index Fund"],
                                                    line={"color": "#97151c"},
                                                    mode="lines",
                                                    name="Duo Esse Index Fund",
                                                ),
                                                go.Scatter(
                                                    x=df_graph["Date"],
                                                    y=df_graph[
                                                        "MSCI EAFE Index Fund (ETF)"
                                                    ],
                                                    line={"color": "#b5b5b5"},
                                                    mode="lines",
                                                    name="MSCI EAFE Index Fund (ETF)",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                autosize=True,
                                                width=700,
                                                height=200,
                                                font={"family": "Raleway", "size": 10},
                                                margin={
                                                    "r": 30,
                                                    "t": 30,
                                                    "b": 30,
                                                    "l": 30,
                                                },
                                                showlegend=True,
                                                titlefont={
                                                    "family": "Raleway",
                                                    "size": 10,
                                                },
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        "2007-12-31",
                                                        "2018-03-06",
                                                    ],
                                                    "rangeselector": {
                                                        "buttons": [
                                                            {
                                                                "count": 1,
                                                                "label": "1Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "count": 3,
                                                                "label": "3Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "count": 5,
                                                                "label": "5Y",
                                                                "step": "year",
                                                            },
                                                            {
                                                                "count": 10,
                                                                "label": "10Y",
                                                                "step": "year",
                                                                "stepmode": "backward",
                                                            },
                                                            {
                                                                "label": "All",
                                                                "step": "all",
                                                            },
                                                        ]
                                                    },
                                                    "showline": True,
                                                    "type": "date",
                                                    "zeroline": False,
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range": [
                                                        18.6880162434,
                                                        278.431996757,
                                                    ],
                                                    "showline": True,
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Average annual returns--updated monthly as of 11/30/2019"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_avg_returns),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "After-tax returns--updated quarterly as of 12/31/2018"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_after_tax),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Recent investment returns"],
                                        className="subtitle padded",
                                    ),
                                    html.Table(
                                        make_dash_table(df_recent_returns),
                                        className="tiny-header",
                                    ),
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 25
0
                 ])
             ],
             className="twelve columns",
         )
     ],
     className="row ",
 ),
 html.Div(
     [
         html.Div(
             [
                 html.H6(
                     "Confusion Matrix",
                     className="subtitle padded",
                 ),
                 html.Table(make_dash_table(confusion)),
             ],
             className="six columns",
         ),
         html.Div(
             [
                 html.H6(
                     "Classification Report",
                     className="subtitle padded",
                 ),
                 html.Table(make_dash_table(class_rep)),
             ],
             className="six columns",
         ),
     ],
     className="row ",
Esempio n. 26
0
def create_layout(app):
    return html.Div(
        [
            html.Div([Header(app)]),
            html.Div(
                [
                    html.Div([
                        html.Div(
                            [
                                html.
                                H5("Curah Hujan dan Penderita Demam Berdarah"),
                                html.Br([]),
                                html.P(
                                    "\
                                    Sebagai wabah endemik di Indonesia, demam berdarah merupakan salah satu penyakit \
                                    yang kasus penyebarannya selalu terjadi setiap tahun. Demam berdarah ditularkan \
                                    lewat virus dengue dengan perantara nyamuk Aedes Aegypti. Penyakit ini sangat \
                                    berbahaya apabila terlambat ditangani. Di Kabupaten Banyumas sendiri, pernah \
                                    terjadi kasus demam berdarah yang sangat banyak dalam setahun sehingga ditetapkan \
                                    sebagai Kejadian Luar Biasa. Melihat betapa berbahayanya demam berdarah, tentunya \
                                    diperlukan tindakan antisipasi dan pencegahan. Salah satu cara antisipasi demam \
                                    berdarah adalah dengan melakukan prediksi. Berdasarkan penelitian sebelumnya, \
                                    faktor yang dianggap berpengaruh terhadap penyebaran demam berdarah adalah cuaca. \
                                    Dengan demikian, dapat diasumsikan dengan melakukan prediksi terhadap curah hujan, \
                                    jumlah penderita demam berdarah dapat diprediksi juga.",
                                    style={"color": "#ffffff"},
                                    className="row",
                                ),
                            ],
                            className="product",
                        ),
                    ],
                             className="row"),  # Tambah row di sini
                    html.Div([
                        html.Div([
                            html.H6([
                                "Tabel Keterangan Data Mentah Curah Hujan Tahun 2010-2019"
                            ],
                                    className="subtitle padded"),
                            html.Table(make_dash_table(data_RR)),
                        ],
                                 className="six columns"),
                        html.Div([
                            html.H6("Deskripsi Data Curah Hujan",
                                    className="subtitle padded"),
                            html.Br([]),
                            html.Div(
                                [
                                    html.
                                    Li("Data dan pengetahuan data didapatkan dari BMKG secara online dan langsung ke kantor Cilacap."
                                       ),
                                    html.
                                    Li("Data berkisar dari tahun 2010 hingga pertengahan tahun 2019."
                                       ),
                                    html.
                                    Li("Data curah hujan berjumlah 2993 record dari 2994 data."
                                       ),
                                    html.
                                    Li("Rata-rata curah hujan dari tahun 2010 hingga pertengahan 2019 adalah 12.668625250040412."
                                       ),
                                    html.
                                    Li("Curah hujan terendah adalah 0, dan yang tertinggi adalah 199,5."
                                       ),
                                    html.
                                    Li("Curah hujan diprediksi dan dicari keterkaitannya dengan penyebaran demam berdarah."
                                       ),
                                ],
                                id="reviews-bullet-pts",
                            ),
                        ],
                                 className="six columns"),
                    ],
                             className="row"),
                    html.Div([
                        html.H6("Tabel Data Cuaca",
                                className="subtitle padded"),
                        tabel1,
                    ],
                             className="row"),
                    html.Div([
                        html.H6("Tabel Keterangan Curah Hujan",
                                className="subtitle padded"),
                        html.Table(make_dash_table(df_hujan)),
                    ],
                             className="row"),
                    html.Div([
                        html.H6("Grafik Curah Hujan",
                                className="subtitle padded"),
                        grafik1,
                    ],
                             className="row"),
                ],
                className="sub_page"),
        ],
        className="page",
    )
Esempio n. 27
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.
                                    H5("Compra de pasajes nacionales e internacionales con precios sobre el doble del precio promedio del mercado"
                                       ),
                                    html.Br([]),
                                    html.P(
                                        "\
                                    As the industry’s first index fund for individual investors, \
                                    the Calibre Index Fund is a low-cost way to gain diversified exposure \
                                    to the U.S. equity market. The fund offers exposure to 500 of the \
                                    largest U.S. companies, which span many different industries and \
                                    account for about three-fourths of the U.S. stock market’s value. \
                                    The key risk for the fund is the volatility that comes with its full \
                                    exposure to the stock market. Because the Calibre Index Fund is broadly \
                                    diversified within the large-capitalization market, it may be \
                                    considered a core equity holding in a portfolio.",
                                        style={"color": "#ffffff"},
                                        className="row",
                                    ),
                                ],
                                className="product",
                            )
                        ],
                        className="row",
                    ),
                    # Row 4
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Hechos fundamentales"],
                                            className="subtitle padded"),
                                    html.Table(make_dash_table(df_fund_facts)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Comportamiento anual promedio",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=[
                                                        "1 Year",
                                                        "3 Year",
                                                        "5 Year",
                                                        "10 Year",
                                                        "41 Year",
                                                    ],
                                                    y=[
                                                        "21.67",
                                                        "11.26",
                                                        "15.62",
                                                        "8.37",
                                                        "11.11",
                                                    ],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Calibre Index Fund",
                                                ),
                                                go.Bar(
                                                    x=[
                                                        "1 Year",
                                                        "3 Year",
                                                        "5 Year",
                                                        "10 Year",
                                                        "41 Year",
                                                    ],
                                                    y=[
                                                        "21.83",
                                                        "11.41",
                                                        "15.79",
                                                        "8.50",
                                                    ],
                                                    marker={
                                                        "color": "#dddddd",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="S&P 500 Index",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.35,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=330,
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 4.5],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": True,
                                                    "range":
                                                    [0, 22.9789473684],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                    # Row 5
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Crecimiento hipotético de $10,000",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-2",
                                        figure={
                                            "data": [
                                                go.Scatter(
                                                    x=[
                                                        "2008",
                                                        "2009",
                                                        "2010",
                                                        "2011",
                                                        "2012",
                                                        "2013",
                                                        "2014",
                                                        "2015",
                                                        "2016",
                                                        "2017",
                                                        "2018",
                                                    ],
                                                    y=[
                                                        "10000",
                                                        "7500",
                                                        "9000",
                                                        "10000",
                                                        "10500",
                                                        "11000",
                                                        "14000",
                                                        "18000",
                                                        "19000",
                                                        "20500",
                                                        "24000",
                                                    ],
                                                    line={"color": "#97151c"},
                                                    mode="lines",
                                                    name=
                                                    "Calibre Index Fund Inv",
                                                )
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=True,
                                                title="",
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=200,
                                                width=340,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0277108433735,
                                                    "y": -0.142606516291,
                                                    "orientation": "h",
                                                },
                                                margin={
                                                    "r": 20,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 50,
                                                },
                                                showlegend=True,
                                                xaxis={
                                                    "autorange": True,
                                                    "linecolor":
                                                    "rgb(0, 0, 0)",
                                                    "linewidth": 1,
                                                    "range": [2008, 2018],
                                                    "showgrid": False,
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "linear",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, 30000],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "$",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(
                                        "Precio y comportamiento (%)",
                                        className="subtitle padded",
                                    ),
                                    html.Table(make_dash_table(df_price_perf)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6("Riesgo potencial",
                                            className="subtitle padded"),
                                    html.Img(
                                        src=app.get_asset_url(
                                            "risk_reward.png"),
                                        className="risk-reward",
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 2
            html.Div(
                [
                html.Div([
                    html.H5("Data analysis report"),
                                html.Br([]),
                                html.P(
                                    "\
                                This section shows the results and tools for the variables INNOVATION STRATEGY, ORGANIZATION, INNOVATION PROJECT, VALUE NETWORK and RESULTS.",
                                    style={"color": "#121214"},
                                    className="row",
                                ),
                    ]),
                    # Row
                  html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Correlation graph"], className="subtitle padded"
                                    ),
                                    html.P(
                                        [
                                            "In this section is presented the correlation between different variables"
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 1.1 ## Matrix correlation
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.H6(
                                        ["Correlation matrix"],
                                        className="subtitle tiny-header padded",
                                    ),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='correlation-selector',
                                        options=[
                                            {'label': 'Total Correlation', 'value': 'TOT'},
                                            {'label': 'Answer YES', 'value': 'YES'},
                                            {'label': 'Answer NO', 'value': 'NO'}
                                        ],
                                        value='TOT'
                                    ),
                                    ]),
                                    html.Div(
                                        [
                                            dcc.Graph(id="correlation"
                                                        ),
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        ["Resume"],
                                        className="subtitle tiny-header padded",
                                    )
                                ],
                                className=" twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4
                    html.Div(
                        [
                            
                            html.Div(
                                [html.Table(make_dash_table(df_realized))],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # New Row
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Br([]),
                                    html.H6(
                                        ["Correlation between two variables"],
                                        className="subtitle tiny-header padded",
                                    ),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='VARIABLE1',
                                        options=[
                                            {'label': 'A INNOVATION STRATEGY ', 'value': 'A'},
                                            {'label': 'B ORGANIZATION', 'value': 'B'},
                                            {'label': 'C INNOVATION PROJECT', 'value': 'C'},
                                            {'label': 'D VALUE NETWORK', 'value': 'D'},
                                            {'label': 'E RESULTS', 'value': 'E'},
                                        ],
                                        value='A'
                                    ),
                                    dcc.Dropdown(
                                        id='VARIABLE2',
                                        options=[
                                            {'label': 'A INNOVATION STRATEGY ', 'value': 'A'},
                                            {'label': 'B ORGANIZATION', 'value': 'B'},
                                            {'label': 'C INNOVATION PROJECT', 'value': 'C'},
                                            {'label': 'D VALUE NETWORK', 'value': 'D'},
                                            {'label': 'E RESULTS', 'value': 'E'},
                                        ],
                                        value='A'
                                    ),
                                    ]
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="graph-4",     
                                    ),
                                        ],
                                        
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),


                   
                      html.Div([
                                html.H6("Factor analysis", className="subtitle padded"),
                                html.Div([]),
                                dcc.Graph(
                                        id="graph-fa",
                                     
                                        config={"displayModeBar": False},
                                    ),
                            
                            ]),
                    html.Div(id='buffer'),

                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Eigenvalues of Factor analysis"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            html.Table(
                                                make_dash_table(df_avg_returns),
                                                className="tiny-header",
                                            )
                                        ],
                                        style={"overflow-x": "auto"},
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),

                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "CLUSTERING ANALYSIS "
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.H6(
                                        [
                                            "Variable selectors"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='varD1',
                                        options=[
                                            {'label': 'A INNOVATION STRATEGY ', 'value': 'A'},
                                            {'label': 'B ORGANIZATION', 'value': 'B'},
                                            {'label': 'C INNOVATION PROJECT', 'value': 'C'},
                                            {'label': 'D VALUE NETWORK', 'value': 'D'},
                                            {'label': 'E RESULTS', 'value': 'E'},
                                        ],
                                        value='A'
                                    ),
                                    ]),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='varD2',
                                        options=[
                                            {'label': 'A INNOVATION STRATEGY ', 'value': 'A'},
                                            {'label': 'B ORGANIZATION', 'value': 'B'},
                                            {'label': 'C INNOVATION PROJECT', 'value': 'C'},
                                            {'label': 'D VALUE NETWORK', 'value': 'D'},
                                            {'label': 'E RESULTS', 'value': 'E'},
                                        ],
                                        value='B'
                                    ),
                                    ]),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='varD3',
                                        options=[
                                            {'label': 'A INNOVATION STRATEGY ', 'value': 'A'},
                                            {'label': 'B ORGANIZATION', 'value': 'B'},
                                            {'label': 'C INNOVATION PROJECT', 'value': 'C'},
                                            {'label': 'D VALUE NETWORK', 'value': 'D'},
                                            {'label': 'E RESULTS', 'value': 'E'},
                                        ],
                                        value='C'
                                    ),
                                    ]),
                                    html.Div([
                                        dcc.Dropdown(
                                        id='Ncluster',
                                        options=[
                                            {'label': '2 ', 'value': '2'},
                                            {'label': '3', 'value': '3'},
                                            {'label': '4', 'value': '4'},
                                            {'label': '5', 'value': '5'},
                                            {'label': '6', 'value': '6'},
                                        ],
                                        value='3'
                                        )

                                    ]),

                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="k-means",
                                        
                                        config={"displayModeBar": True},
                                    ),
                                        ],
                                        
                                    ),
                                    html.Div(
                                [
                                    html.H6(
                                        [
                                            "Elbow rule"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="metric1",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                    
                                ],
                                className="twelve columns",
                            ),
                                    html.Div(
                                [
                                    html.H6(
                                        [
                                            "Rule2 for the clusters"
                                        ],
                                        className="six columns",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="metric2",
                                        
                                        config={"displayModeBar": True},
                                    ),
                                        ],
                                        
                                    ),
                                    
                                ],
                                className="six columns",
                            ),
                                    
                                ],
                                className="six columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 4 Taska plot regressions
                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Graph of the points"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="taska",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 5 Task 1 plot regressions
                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "A affects B, C and D"
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="task1",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 6 Task 2 plot regressions
                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "B affects C and D "
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="task2",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 7 Task 3 plot regressions
                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "B, C and D as a package affect E "
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="task3",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 8 Task 5 plot regressions
                    html.Div(
                        [
                            
                            html.Div(
                                [
                                    html.H6(
                                        [
                                            "Relationship between A and E "
                                        ],
                                        className="subtitle padded",
                                    ),
                                    html.Div(
                                        [
                                            dcc.Graph(
                                        id="task5",
                                        
                                        config={"displayModeBar": False},
                                    ),
                                        ],
                                        
                                    ),
                                    html.Div(dcc.Graph(id="task6")),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    
                  
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 29
0
def create_layout(app):
    # Page layouts
    return html.Div(
        [
            html.Div([Header(app)]),
            # page 1
            html.Div(
                [
                    # Row 1 - Por UF
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(
                                        "Acidentes por UF",
                                        className="subtitle padded",
                                    ),
                                    dcc.Graph(
                                        id="graph-1",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=df_uf['UF'],
                                                    y=df_uf['Quantidade'],
                                                    marker={
                                                        "color": "#97151c",
                                                        "line": {
                                                            "color":
                                                            "rgb(255, 255, 255)",
                                                            "width": 2,
                                                        },
                                                    },
                                                    name="Estados",
                                                ),
                                            ],
                                            "layout":
                                            go.Layout(
                                                autosize=False,
                                                bargap=0.4,
                                                font={
                                                    "family": "Raleway",
                                                    "size": 10
                                                },
                                                height=400,
                                                hovermode="closest",
                                                legend={
                                                    "x": -0.0228945952895,
                                                    "y": -0.189563896463,
                                                    "orientation": "h",
                                                    "yanchor": "top",
                                                },
                                                margin={
                                                    "r": 0,
                                                    "t": 20,
                                                    "b": 10,
                                                    "l": 10,
                                                },
                                                showlegend=True,
                                                title="",
                                                width=660,
                                                xaxis={
                                                    "autorange": True,
                                                    #"range": [-0.5, 2000],
                                                    "showline": True,
                                                    "title": "",
                                                    "type": "category",
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "gridcolor":
                                                    "rgba(127, 127, 127, 0.2)",
                                                    "mirror": False,
                                                    "nticks": 4,
                                                    "range": [0, uf_max],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "ticklen": 10,
                                                    "ticks": "outside",
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                    "zerolinewidth": 4,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                    html.P(
                                        [
                                            "60% dos acidentes ambientais no Brasil estão concentrados em MG, SP e RJ. Se incluimos o ES nessa lista, temos a redião SUDESTE com aproximadamente 64% dos acidentes."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="row ",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 2 - Muinícipios
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Top 5 Municípios"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(df_municipio.head(5))),
                                    html.P(
                                        [
                                            "Dos 5 municípios com mais acidentes, todos eles estão na região SUDESTE. Região que concentra o maior índice de acidentes do país."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.H6(["Top 5 Munícípios MG"],
                                            className="subtitle padded"),
                                    html.Table(
                                        make_dash_table(
                                            df_municipio.query(
                                                'UF == "MG"').head(5))),
                                    html.P(
                                        [
                                            "Mas se fizermos uma análise com os top 5 do estado com maior número de acidentes (MG), somente 1 (Belo Horizonte) está no top 5 dos municípios do Brasil todo."
                                        ],
                                        style={"color": "#7a7a7a"},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row",
                        style={"margin-bottom": "35px"},
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )
Esempio n. 30
0
def create_layout(app):
    return html.Div(
        [
            Header(app),
            # page 4
            html.Div(
                [
                    # Row 1
                    html.Div(
                        [
                            html.Div(
                                [html.H6(["Gastos"], className="subtitle padded")],
                                className="twelve columns",
                            )
                        ],
                        className="row ",
                    ),
                    # Row 2
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.Strong(),
                                    html.Table(make_dash_table(df_expenses)),
                                    html.H6(["Minimos"], className="subtitle padded"),
                                    html.Table(make_dash_table(df_minimums)),
                                ],
                                className="six columns",
                            ),
                            html.Div(
                                [
                                    html.Br([]),
                                    html.Strong(
                                        "Tarifas de $10,000 invertidos en 10 años",
                                        style={"color": "#3a3a3a"},
                                    ),
                                    dcc.Graph(
                                        id="graph-6",
                                        figure={
                                            "data": [
                                                go.Bar(
                                                    x=["Category Average", "This fund"],
                                                    y=["2242", "329"],
                                                    marker={"color": "#97151c"},
                                                    name="A",
                                                ),
                                                go.Bar(
                                                    x=["This fund"],
                                                    y=["1913"],
                                                    marker={"color": " #dddddd"},
                                                    name="B",
                                                ),
                                            ],
                                            "layout": go.Layout(
                                                annotations=[
                                                    {
                                                        "x": -0.0111111111111,
                                                        "y": 2381.92771084,
                                                        "font": {
                                                            "color": "#7a7a7a",
                                                            "family": "Arial sans serif",
                                                            "size": 8,
                                                        },
                                                        "showarrow": False,
                                                        "text": "$2,242",
                                                        "xref": "x",
                                                        "yref": "y",
                                                    },
                                                    {
                                                        "x": 0.995555555556,
                                                        "y": 509.638554217,
                                                        "font": {
                                                            "color": "#7a7a7a",
                                                            "family": "Arial sans serif",
                                                            "size": 8,
                                                        },
                                                        "showarrow": False,
                                                        "text": "$329",
                                                        "xref": "x",
                                                        "yref": "y",
                                                    },
                                                    {
                                                        "x": 0.995551020408,
                                                        "y": 1730.32432432,
                                                        "font": {
                                                            "color": "#7a7a7a",
                                                            "family": "Arial sans serif",
                                                            "size": 8,
                                                        },
                                                        "showarrow": False,
                                                        "text": "You save<br><b>$1,913</b>",
                                                        "xref": "x",
                                                        "yref": "y",
                                                    },
                                                ],
                                                autosize=False,
                                                height=260,
                                                width=320,
                                                bargap=0.4,
                                                barmode="stack",
                                                hovermode="closest",
                                                margin={
                                                    "r": 40,
                                                    "t": 20,
                                                    "b": 20,
                                                    "l": 40,
                                                },
                                                showlegend=False,
                                                title="",
                                                xaxis={
                                                    "autorange": True,
                                                    "range": [-0.5, 1.5],
                                                    "showline": True,
                                                    "tickfont": {
                                                        "family": "Arial sans serif",
                                                        "size": 8,
                                                    },
                                                    "title": "",
                                                    "type": "category",
                                                    "zeroline": False,
                                                },
                                                yaxis={
                                                    "autorange": False,
                                                    "mirror": False,
                                                    "nticks": 3,
                                                    "range": [0, 3000],
                                                    "showgrid": True,
                                                    "showline": True,
                                                    "tickfont": {
                                                        "family": "Arial sans serif",
                                                        "size": 10,
                                                    },
                                                    "tickprefix": "$",
                                                    "title": "",
                                                    "type": "linear",
                                                    "zeroline": False,
                                                },
                                            ),
                                        },
                                        config={"displayModeBar": False},
                                    ),
                                ],
                                className="six columns",
                            ),
                        ],
                        className="row ",
                    ),
                    # Row 3
                    html.Div(
                        [
                            html.Div(
                                [
                                    html.H6(["Tarifas"], className="subtitle"),
                                    html.Br([]),
                                    html.Div(
                                        [
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            html.Strong(
                                                                ["Purchase fee"],
                                                                style={
                                                                    "color": "#515151"
                                                                },
                                                            )
                                                        ],
                                                        className="three columns right-aligned",
                                                    ),
                                                    html.Div(
                                                        [
                                                            html.P(
                                                                ["None"],
                                                                style={
                                                                    "color": "#7a7a7a"
                                                                },
                                                            )
                                                        ],
                                                        className="nine columns",
                                                    ),
                                                ],
                                                className="row",
                                                style={
                                                    "background-color": "#f9f9f9",
                                                    "padding-top": "20px",
                                                },
                                            ),
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            html.Strong(
                                                                ["Redemption fee"],
                                                                style={
                                                                    "color": "#515151"
                                                                },
                                                            )
                                                        ],
                                                        className="three columns right-aligned",
                                                    ),
                                                    html.Div(
                                                        [
                                                            html.P(
                                                                ["None"],
                                                                style={
                                                                    "color": "#7a7a7a"
                                                                },
                                                            )
                                                        ],
                                                        className="nine columns",
                                                    ),
                                                ],
                                                className="row",
                                                style={"background-color": "#f9f9f9"},
                                            ),
                                            html.Div(
                                                [
                                                    html.Div(
                                                        [
                                                            html.Strong(
                                                                ["12b-1 fee"],
                                                                style={
                                                                    "color": "#515151"
                                                                },
                                                            )
                                                        ],
                                                        className="three columns right-aligned",
                                                    ),
                                                    html.Div(
                                                        [
                                                            html.P(
                                                                ["None"],
                                                                style={
                                                                    "color": "#7a7a7a"
                                                                },
                                                            )
                                                        ],
                                                        className="nine columns",
                                                    ),
                                                ],
                                                className="row",
                                                style={"background-color": "#f9f9f9"},
                                            ),
                                        ],
                                        className="fees",
                                    ),
                                    html.Div(
                                        [
                                            html.Div(
                                                [
                                                    html.Strong(
                                                        ["Account service fee"],
                                                        style={"color": "#515151"},
                                                    )
                                                ],
                                                className="three columns right-aligned",
                                            ),
                                            html.Div(
                                                [
                                                    html.Strong(
                                                        [
                                                            "Nonretirement accounts, traditional IRAs, Roth IRAs, UGMAs/UTMAs, SEP-IRAs, and education savings accounts (ESAs)"
                                                        ],
                                                        style={"color": "#515151"},
                                                    ),
                                                    html.P(
                                                        [
                                                            "We charge a $20 annual account service fee for each Brokerage Account, as well as each individual mutual fund holding with a balance of less than $10,000 in an account. This fee does not apply if you sign up for account and choose electronic delivery of statements, confirmations, and fund reports and prospectuses. This fee also does not apply to members of Flagship Select™, Flagship®, Voyager Select®, and Voyager® Services."
                                                        ],
                                                        style={"color": "#7a7a7a"},
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        ["SIMPLE IRAs"],
                                                        style={"color": "#515151"},
                                                    ),
                                                    html.P(
                                                        [
                                                            "We charge participants a $25 annual account service fee for each fund they hold in their SIMPLE IRA. This fee does not apply to members of Flagship Select, Flagship, Voyager Select, and Voyager Services."
                                                        ],
                                                        style={"color": "#7a7a7a"},
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        ["403(b)(7) plans"],
                                                        style={"color": "#515151"},
                                                    ),
                                                    html.P(
                                                        [
                                                            "We charge participants a $15 annual account service fee for each fund they hold in their 403(b)(7) account. This fee does not apply to members of Flagship Select, Flagship, Voyager Select, and Voyager Services."
                                                        ],
                                                        style={"color": "#7a7a7a"},
                                                    ),
                                                    html.Br([]),
                                                    html.Strong(
                                                        ["Individual 401(k) plans"],
                                                        style={"color": "#515151"},
                                                    ),
                                                    html.P(
                                                        [
                                                            "We charge participants a $20 annual account service fee for each fund they hold in their Individual 401(k) account. This fee will be waived for all participants in the plan if at least 1 participant qualifies for Flagship Select, Flagship, Voyager Select, and Voyager Services"
                                                        ],
                                                        style={"color": "#7a7a7a"},
                                                    ),
                                                    html.Br([]),
                                                ],
                                                className="nine columns",
                                            ),
                                        ],
                                        className="row",
                                        style={
                                            "background-color": "#f9f9f9",
                                            "padding-bottom": "30px",
                                        },
                                    ),
                                ],
                                className="twelve columns",
                            )
                        ],
                        className="row",
                    ),
                ],
                className="sub_page",
            ),
        ],
        className="page",
    )