Py.Cafe

Horaciorek/

vizro-interactive-iris-data-exploration

Vizro: Interactive Iris Data Exploration

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
import pandas as pd
import vizro.plotly.express as px
from vizro import Vizro
import vizro.models as vm

# URL of the CSV data
url = 'https://sdmx.data.unicef.org/ws/public/sdmxapi/rest/data/ECARO,ECACID,1.0/all?format=csv&labels=both'

# Read the CSV data from the URL and store it in a DataFrame
df = pd.read_csv(url, low_memory=False)

# Create a sample plotly figure
fig = px.scatter(df, x="OBS_Value", y="Indicator", title="Sample Plot")

# Define the components to be displayed on the page
components = [
    vm.Graph(figure=fig)
]

# Create the page with components
page = vm.Page(
    title="ECACID",
    components=components
)

# Create the dashboard with the page
dashboard = vm.Dashboard(pages=[page])

# Build and run the Vizro app
Vizro().build(dashboard).run()