Py.Cafe

huong-li-nguyen/

iris-sepal-length-analysis

Iris Sepal Length Analysis

DocsPricing
  • assets/
  • yaml_version/
  • app.py
  • charts.py
  • data.yaml
  • 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
import vizro.actions as va
import vizro.models as vm
import vizro.plotly.express as px
from vizro import Vizro

df = px.data.iris()

page = vm.Page(
    title="Dashboard with welcome message",
    components=[
        vm.Graph(figure=px.histogram(df, x="sepal_length")),
    ],
    actions=[
        va.show_notification(
            message="Welcome! Data was last updated 2 hours ago.",
            auto_close=False,
        )
    ],
)

dashboard = vm.Dashboard(pages=[page])
Vizro().build(dashboard).run()