Py.Cafe

simong123/

vizro-biotech-investment-insights

Biotech Investment Insights

DocsPricing
  • app.py
  • requirements.txt
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Vizro is an open-source toolkit for creating modular data visualization applications.
# check out https://github.com/mckinsey/vizro for more info about Vizro
# and checkout https://vizro.readthedocs.io/en/stable/ for documentation.


import vizro.plotly.express as px
from vizro import Vizro
import vizro.models as vm
import pandas as pd
from vizro.managers import data_manager

df = pd.read_csv('https://github.com/simong123/biotechapp/blob/d0c127ceb8ace3be190571b839241cb81172f38c/sec_test_data.csv?raw=true')

df_op_cash = df[df['account'] == 'Net Cash Provided by (Used in) Operating Activities']

page_1 = vm.Page(
    title = "About",
    layout=vm.Layout(grid=[[0,1],[0,2],[0,3], [0,4]]), 
    components = [vm.Card(text = """
                          
                          # About 
                          
                          ## Methodology
                          
                          """),
                  vm.Card(text = "Placeholder - Clinical Rigor Info"), 
                  vm.Graph(figure = px.histogram(df, x = 'data_fiscal_year',
                                                 labels=dict(data_fiscal_year="Year")), title = "SEC Data Points by Year"), 
                  vm.Card(text = 'Market Sizing Info'), 
                  vm.Card(text = 'Pricing Info')
                  ], 
    )

page_2 = vm.Page(
    title = "FDA Calendar",
    components = [vm.Card(text = "This is a placeholder for FDA Calendar")], 
    )

page_3a = vm.Page(
    title = "Rigor Rankings", 
    components = [vm.Card(text = "This is a placeholder for the rigor rankings")],
    )

page_3b = vm.Page(
    title = "Trial Search by Disease", 
    components = [vm.Card(text = "This is a placeholder for trial search by disease")],
    )

page_3c = vm.Page(
    title = "Trial Search by Company", 
    components = [vm.Card(text = "This is a placeholder for trial search by company")],
    )

page_4 = vm.Page(
    title = "Financial", 
    layout=vm.Layout(grid=[[0,1],[2,2],[3,4]]),
    components = [vm.Card(text = """
                          
                          ## Ticker
                          
                          """), 
                  vm.Graph(id = 'chart1', figure = px.histogram(df_op_cash, x = 'data_fiscal_year', 
                                                 labels=dict(data_fiscal_year = "Year")), title = "Operating Cash Flow"),
                  vm.Card(text = "This is a placholder for financial"),
                  vm.Card(text = "This is a placholder for financial"),
                  vm.Card(text = "This is a placholder for financial")],
    controls = [
        vm.Filter(column="ticker",targets=["chart1"],selector=vm.Dropdown())],
    )

page_5 = vm.Page(
    title = "Market Sizing", 
    components = [vm.Card(text = "This is a placeholder for market sizing data")], 
    )

page_6 = vm.Page(
    title = "Price", 
    components = [vm.Card(text = "This is a placeholder for market pricing")], 
    )

dashboard = vm.Dashboard(
    pages=[page_1, page_2, page_3a, page_3b, page_3c, page_4, page_5, page_6], 
    navigation=vm.Navigation(pages={'About': ['About'], 'FDA Calendar': ['FDA Calendar'], 'Clinical Rigor': ['Rigor Rankings', 'Trial Search by Disease', 'Trial Search by Company'], 'Financial': ['Financial'], 'Market Sizing': ['Market Sizing'], 'Price': ['Price']}))

Vizro().build(dashboard).run()