Py.Cafe

SmartDvi/

usa-views-analysis

USA Views Analysis

DocsPricing
  • asset/
  • pages/
  • app.py
  • components.py
  • requirements.txt
  • utils.py
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import dash
from dash import dcc, Output, callback, State, html
import dash_bootstrap_components as dbc
import pandas as pd



# Initialize the Dash app
app = dash.Dash(__name__, use_pages= True, external_stylesheets=[dbc.themes.BOOTSTRAP])

# define the layout of the app
app.layout =dbc.Container([
        html.H1('USA Views Analysis Dashboard', className='page-header'),

        # styling the navigation link
        dbc.Nav(
            [
                dbc.NavItem(
                    dbc.NavLink(f'{page['name']}', href=page['relative_path'], className='dash-link', active='exact' )
                ) for page in dash.page_registry.values()
            ],
            className = 'nav-links',
            pills=True,
        ),
        # customizing the page container with styling
        html.Div(dash.page_container, className='page-container'),

        # developing the footer
        dbc.Row(
            [
                dbc.Col(
                    dbc.Nav(
                        [
                            footer
                        ],
                        className='footer-links',
                        pills=True,
                        


                    ),
                    width='auto',
                    className='text-center mt-4'
                )
            ],
            justify='center'
            
        )
    ],
    fluid=True

)
if __name__ == "__main__":
    app.run(debug=True, port=6530)