viewx 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {viewx-0.2.2 → viewx-0.2.3}/PKG-INFO +40 -68
- {viewx-0.2.2 → viewx-0.2.3}/README.md +39 -67
- {viewx-0.2.2 → viewx-0.2.3}/setup.py +1 -1
- {viewx-0.2.2 → viewx-0.2.3}/viewx/__init__.py +4 -3
- {viewx-0.2.2 → viewx-0.2.3}/viewx.egg-info/PKG-INFO +40 -68
- {viewx-0.2.2 → viewx-0.2.3}/setup.cfg +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test1.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test2.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test3.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test4.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test5.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test6.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/tests/test7.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/DataMatrix/__init__.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/DataMatrix/bibliometrics.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/DataMatrix/datamatrix_engine.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/DataMatrix/visualizer.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/HTML/__init__.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/HTML/html_engine.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Report/__init__.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Report/report_engine.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Slides/__init__.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Slides/charts.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Slides/components.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/Slides/slides_engine.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/__init__.py +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/course_completion.csv +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/iris.csv +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/penguins.csv +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/sp500_companies.csv +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx/datasets/titanic.csv +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx.egg-info/SOURCES.txt +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx.egg-info/dependency_links.txt +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx.egg-info/requires.txt +0 -0
- {viewx-0.2.2 → viewx-0.2.3}/viewx.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: viewx
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Librería de visualización adaptable para HTML, Dashboards y PDFs en Python
|
|
5
5
|
Home-page: https://github.com/GhostAnalyst30/ViewX
|
|
6
6
|
Author: Emmanuel Ascendra Perez
|
|
@@ -52,7 +52,7 @@ Dynamic: requires-dist
|
|
|
52
52
|
Dynamic: requires-python
|
|
53
53
|
Dynamic: summary
|
|
54
54
|
|
|
55
|
-
# ViewX — v2.
|
|
55
|
+
# ViewX — v2.3
|
|
56
56
|
|
|
57
57
|
**ViewX** es un paquete moderno de Python diseñado para generar **páginas HTML interactivas**, **dashboards dinámicos** y **visualizaciones inteligentes** que se adaptan automáticamente a los objetos agregados por el usuario.
|
|
58
58
|
|
|
@@ -78,81 +78,53 @@ pip install viewx
|
|
|
78
78
|
|
|
79
79
|
## Ejemplo rápido
|
|
80
80
|
|
|
81
|
-
### Crear
|
|
81
|
+
### Crear un DashBoard HTML
|
|
82
82
|
```python
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
df_ventas = pd.DataFrame({
|
|
88
|
-
'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
|
89
|
-
'Ventas': [120, 135, 148, 170, 195, 210, 245, 268, 290, 310, 335, 400],
|
|
90
|
-
'Beneficio': [30, 35, 42, 51, 58, 63, 73, 80, 87, 93, 100, 120],
|
|
91
|
-
'Clientes': [45, 48, 52, 58, 65, 72, 80, 88, 95, 102, 110, 125]
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
# Datos para gráfico de barras
|
|
95
|
-
df_productos = pd.DataFrame({
|
|
96
|
-
'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
|
|
97
|
-
'Ventas': [450, 320, 280, 190, 150]
|
|
83
|
+
df = pd.DataFrame({
|
|
84
|
+
"date": dates, "region": regions, "product": products,
|
|
85
|
+
"revenue": revenue_str, "costs": costs.round(2),
|
|
86
|
+
"units": units, "rating": rating, "returned": returned,
|
|
98
87
|
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
df_clientes = pd.DataFrame({
|
|
102
|
-
'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
|
|
103
|
-
'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
|
|
104
|
-
'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
# 2. Configurar el dashboard
|
|
108
|
-
dashboard = HTML(
|
|
109
|
-
title="📊 Dashboard Ejecutivo - Demo",
|
|
110
|
-
theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
|
|
111
|
-
cols=12, # Grid de 12 columnas
|
|
112
|
-
rows=12, # 12 filas de altura
|
|
113
|
-
gap=16,
|
|
114
|
-
padding=20,
|
|
115
|
-
navbar={
|
|
116
|
-
"title": "📈 ViewX PRO",
|
|
117
|
-
"items": [
|
|
118
|
-
{"label": "Inicio", "link": "#"},
|
|
119
|
-
{"label": "Ventas", "link": "#"},
|
|
120
|
-
{"label": "Clientes", "link": "#"},
|
|
121
|
-
{"label": "Reportes", "link": "#"}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
88
|
+
df["revenue"] = pd.to_numeric(
|
|
89
|
+
df["revenue"].str.replace(r"[$,]", "", regex=True), errors="coerce"
|
|
124
90
|
)
|
|
125
91
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
|
|
131
|
-
dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
|
|
132
|
-
|
|
133
|
-
# Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
|
|
134
|
-
dashboard.add_chart(
|
|
135
|
-
data=df_ventas,
|
|
136
|
-
chart_type="line",
|
|
137
|
-
x="Mes",
|
|
138
|
-
y="Ventas",
|
|
139
|
-
title="📈 Evolución de Ventas 2024",
|
|
140
|
-
row=3, col=1, height=10, width=6
|
|
92
|
+
fig_bar = px.bar(
|
|
93
|
+
df.groupby("region")["revenue"].sum().reset_index().sort_values("revenue"),
|
|
94
|
+
x="revenue", y="region", orientation="h", color="region",
|
|
95
|
+
color_discrete_sequence=["#059669", "#10B981", "#34D399", "#6EE7B7"],
|
|
141
96
|
)
|
|
97
|
+
fig_bar.update_layout(showlegend=False)
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
chart_type="bar",
|
|
147
|
-
x="Producto",
|
|
148
|
-
y="Ventas",
|
|
149
|
-
title="🏷️ Ventas por Producto",
|
|
150
|
-
row=3, col=7, height=10, width=6
|
|
99
|
+
fig_line = px.line(
|
|
100
|
+
df.groupby("date")["revenue"].sum().reset_index(),
|
|
101
|
+
x="date", y="revenue", color_discrete_sequence=["#059669"],
|
|
151
102
|
)
|
|
152
103
|
|
|
153
|
-
|
|
154
|
-
|
|
104
|
+
dash = HTML(
|
|
105
|
+
title="Manual Dashboard", theme="modern_green",
|
|
106
|
+
cols=12, rows=9, gap=14, padding=20,
|
|
107
|
+
navbar={"title": "Manual Dashboard",
|
|
108
|
+
"items": [{"label": "Home", "link": "#"}, {"label": "Analytics", "link": "#"}]},
|
|
109
|
+
authors=[{"name": "Data Team", "email": "data@acme.com"}],
|
|
110
|
+
data_button=True, df=df,
|
|
111
|
+
)
|
|
155
112
|
|
|
113
|
+
dash.add_valuebox("Total Revenue", "$2.4M", icon_key="dollar", row=1, col=1, height=2, width=3)
|
|
114
|
+
dash.add_valuebox("Total Units", "18.4K", icon_key="box", row=1, col=4, height=2, width=3)
|
|
115
|
+
dash.add_valuebox("Avg Rating", "4.12", icon_key="award", row=1, col=7, height=2, width=3)
|
|
116
|
+
dash.add_valuebox("Return Rate", "12%", icon_key="percent", row=1, col=10, height=2, width=3)
|
|
117
|
+
|
|
118
|
+
dash.add_infobox(df=df, variable="revenue",
|
|
119
|
+
info=["mean", "median", "std", "min", "max", "kurtosis", "skewness", "nulls"],
|
|
120
|
+
title="Revenue Stats", row=3, col=1, height=4, width=3)
|
|
121
|
+
dash.add_chart(fig=fig_bar, title="Revenue by Region",
|
|
122
|
+
row=3, col=4, height=4, width=9, show_info_btn=True,
|
|
123
|
+
_info_stats={"Regions": "4", "Total": "$2.4M"})
|
|
124
|
+
dash.add_chart(fig=fig_line, title="Daily Revenue Trend",
|
|
125
|
+
row=7, col=1, height=3, width=12, show_info_btn=True)
|
|
126
|
+
|
|
127
|
+
dash.generate("demo6_manual.html")
|
|
156
128
|
```
|
|
157
129
|
|
|
158
130
|

|
|
39
|
-
|
|
40
|
-
# Datos para gráfico de barras
|
|
41
|
-
df_productos = pd.DataFrame({
|
|
42
|
-
'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
|
|
43
|
-
'Ventas': [450, 320, 280, 190, 150]
|
|
29
|
+
df = pd.DataFrame({
|
|
30
|
+
"date": dates, "region": regions, "product": products,
|
|
31
|
+
"revenue": revenue_str, "costs": costs.round(2),
|
|
32
|
+
"units": units, "rating": rating, "returned": returned,
|
|
44
33
|
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
df_clientes = pd.DataFrame({
|
|
48
|
-
'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
|
|
49
|
-
'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
|
|
50
|
-
'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
# 2. Configurar el dashboard
|
|
54
|
-
dashboard = HTML(
|
|
55
|
-
title="📊 Dashboard Ejecutivo - Demo",
|
|
56
|
-
theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
|
|
57
|
-
cols=12, # Grid de 12 columnas
|
|
58
|
-
rows=12, # 12 filas de altura
|
|
59
|
-
gap=16,
|
|
60
|
-
padding=20,
|
|
61
|
-
navbar={
|
|
62
|
-
"title": "📈 ViewX PRO",
|
|
63
|
-
"items": [
|
|
64
|
-
{"label": "Inicio", "link": "#"},
|
|
65
|
-
{"label": "Ventas", "link": "#"},
|
|
66
|
-
{"label": "Clientes", "link": "#"},
|
|
67
|
-
{"label": "Reportes", "link": "#"}
|
|
68
|
-
]
|
|
69
|
-
}
|
|
34
|
+
df["revenue"] = pd.to_numeric(
|
|
35
|
+
df["revenue"].str.replace(r"[$,]", "", regex=True), errors="coerce"
|
|
70
36
|
)
|
|
71
37
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
|
|
77
|
-
dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
|
|
78
|
-
|
|
79
|
-
# Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
|
|
80
|
-
dashboard.add_chart(
|
|
81
|
-
data=df_ventas,
|
|
82
|
-
chart_type="line",
|
|
83
|
-
x="Mes",
|
|
84
|
-
y="Ventas",
|
|
85
|
-
title="📈 Evolución de Ventas 2024",
|
|
86
|
-
row=3, col=1, height=10, width=6
|
|
38
|
+
fig_bar = px.bar(
|
|
39
|
+
df.groupby("region")["revenue"].sum().reset_index().sort_values("revenue"),
|
|
40
|
+
x="revenue", y="region", orientation="h", color="region",
|
|
41
|
+
color_discrete_sequence=["#059669", "#10B981", "#34D399", "#6EE7B7"],
|
|
87
42
|
)
|
|
43
|
+
fig_bar.update_layout(showlegend=False)
|
|
88
44
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
chart_type="bar",
|
|
93
|
-
x="Producto",
|
|
94
|
-
y="Ventas",
|
|
95
|
-
title="🏷️ Ventas por Producto",
|
|
96
|
-
row=3, col=7, height=10, width=6
|
|
45
|
+
fig_line = px.line(
|
|
46
|
+
df.groupby("date")["revenue"].sum().reset_index(),
|
|
47
|
+
x="date", y="revenue", color_discrete_sequence=["#059669"],
|
|
97
48
|
)
|
|
98
49
|
|
|
99
|
-
|
|
100
|
-
|
|
50
|
+
dash = HTML(
|
|
51
|
+
title="Manual Dashboard", theme="modern_green",
|
|
52
|
+
cols=12, rows=9, gap=14, padding=20,
|
|
53
|
+
navbar={"title": "Manual Dashboard",
|
|
54
|
+
"items": [{"label": "Home", "link": "#"}, {"label": "Analytics", "link": "#"}]},
|
|
55
|
+
authors=[{"name": "Data Team", "email": "data@acme.com"}],
|
|
56
|
+
data_button=True, df=df,
|
|
57
|
+
)
|
|
101
58
|
|
|
59
|
+
dash.add_valuebox("Total Revenue", "$2.4M", icon_key="dollar", row=1, col=1, height=2, width=3)
|
|
60
|
+
dash.add_valuebox("Total Units", "18.4K", icon_key="box", row=1, col=4, height=2, width=3)
|
|
61
|
+
dash.add_valuebox("Avg Rating", "4.12", icon_key="award", row=1, col=7, height=2, width=3)
|
|
62
|
+
dash.add_valuebox("Return Rate", "12%", icon_key="percent", row=1, col=10, height=2, width=3)
|
|
63
|
+
|
|
64
|
+
dash.add_infobox(df=df, variable="revenue",
|
|
65
|
+
info=["mean", "median", "std", "min", "max", "kurtosis", "skewness", "nulls"],
|
|
66
|
+
title="Revenue Stats", row=3, col=1, height=4, width=3)
|
|
67
|
+
dash.add_chart(fig=fig_bar, title="Revenue by Region",
|
|
68
|
+
row=3, col=4, height=4, width=9, show_info_btn=True,
|
|
69
|
+
_info_stats={"Regions": "4", "Total": "$2.4M"})
|
|
70
|
+
dash.add_chart(fig=fig_line, title="Daily Revenue Trend",
|
|
71
|
+
row=7, col=1, height=3, width=12, show_info_btn=True)
|
|
72
|
+
|
|
73
|
+
dash.generate("demo6_manual.html")
|
|
102
74
|
```
|
|
103
75
|
|
|
104
76
|
:
|
|
|
38
38
|
print(f" - Report")
|
|
39
39
|
print(f" - Slides")
|
|
40
40
|
print(f" - DataMatrix")
|
|
41
|
-
print(f"\nPara más información: help(viewx)")
|
|
41
|
+
print(f"\nPara más información: help(viewx)")
|
|
42
|
+
print(f"\nO lee la información en: https://ghostanalyst30.github.io/ViewX/Documentation_Page/index.html")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: viewx
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Librería de visualización adaptable para HTML, Dashboards y PDFs en Python
|
|
5
5
|
Home-page: https://github.com/GhostAnalyst30/ViewX
|
|
6
6
|
Author: Emmanuel Ascendra Perez
|
|
@@ -52,7 +52,7 @@ Dynamic: requires-dist
|
|
|
52
52
|
Dynamic: requires-python
|
|
53
53
|
Dynamic: summary
|
|
54
54
|
|
|
55
|
-
# ViewX — v2.
|
|
55
|
+
# ViewX — v2.3
|
|
56
56
|
|
|
57
57
|
**ViewX** es un paquete moderno de Python diseñado para generar **páginas HTML interactivas**, **dashboards dinámicos** y **visualizaciones inteligentes** que se adaptan automáticamente a los objetos agregados por el usuario.
|
|
58
58
|
|
|
@@ -78,81 +78,53 @@ pip install viewx
|
|
|
78
78
|
|
|
79
79
|
## Ejemplo rápido
|
|
80
80
|
|
|
81
|
-
### Crear
|
|
81
|
+
### Crear un DashBoard HTML
|
|
82
82
|
```python
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
df_ventas = pd.DataFrame({
|
|
88
|
-
'Mes': ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
|
89
|
-
'Ventas': [120, 135, 148, 170, 195, 210, 245, 268, 290, 310, 335, 400],
|
|
90
|
-
'Beneficio': [30, 35, 42, 51, 58, 63, 73, 80, 87, 93, 100, 120],
|
|
91
|
-
'Clientes': [45, 48, 52, 58, 65, 72, 80, 88, 95, 102, 110, 125]
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
# Datos para gráfico de barras
|
|
95
|
-
df_productos = pd.DataFrame({
|
|
96
|
-
'Producto': ['Producto A', 'Producto B', 'Producto C', 'Producto D', 'Producto E'],
|
|
97
|
-
'Ventas': [450, 320, 280, 190, 150]
|
|
83
|
+
df = pd.DataFrame({
|
|
84
|
+
"date": dates, "region": regions, "product": products,
|
|
85
|
+
"revenue": revenue_str, "costs": costs.round(2),
|
|
86
|
+
"units": units, "rating": rating, "returned": returned,
|
|
98
87
|
})
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
df_clientes = pd.DataFrame({
|
|
102
|
-
'Edad': [25, 32, 28, 45, 38, 29, 51, 42, 35, 30],
|
|
103
|
-
'Gasto': [120, 200, 150, 300, 250, 180, 400, 320, 220, 160],
|
|
104
|
-
'Segmento': ['Joven', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Joven', 'Senior', 'Adulto', 'Adulto', 'Joven']
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
# 2. Configurar el dashboard
|
|
108
|
-
dashboard = HTML(
|
|
109
|
-
title="📊 Dashboard Ejecutivo - Demo",
|
|
110
|
-
theme="corporate_blue", # Temas: corporate_blue, dark_enterprise, modern_green, void_indigo, glass_ocean, cyberpunk_neon
|
|
111
|
-
cols=12, # Grid de 12 columnas
|
|
112
|
-
rows=12, # 12 filas de altura
|
|
113
|
-
gap=16,
|
|
114
|
-
padding=20,
|
|
115
|
-
navbar={
|
|
116
|
-
"title": "📈 ViewX PRO",
|
|
117
|
-
"items": [
|
|
118
|
-
{"label": "Inicio", "link": "#"},
|
|
119
|
-
{"label": "Ventas", "link": "#"},
|
|
120
|
-
{"label": "Clientes", "link": "#"},
|
|
121
|
-
{"label": "Reportes", "link": "#"}
|
|
122
|
-
]
|
|
123
|
-
}
|
|
88
|
+
df["revenue"] = pd.to_numeric(
|
|
89
|
+
df["revenue"].str.replace(r"[$,]", "", regex=True), errors="coerce"
|
|
124
90
|
)
|
|
125
91
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
dashboard.add_valuebox("Clientes Activos", "1,247", "👥", "#FF6B35", row=1, col=7, height=2, width=3)
|
|
131
|
-
dashboard.add_valuebox("Tasa Conversión", "24.5%", "🎯", "#9B59B6", row=1, col=10, height=2, width=3)
|
|
132
|
-
|
|
133
|
-
# Fila 2-5: Gráfico de líneas (ventas mensuales) - Método sencillo con datos
|
|
134
|
-
dashboard.add_chart(
|
|
135
|
-
data=df_ventas,
|
|
136
|
-
chart_type="line",
|
|
137
|
-
x="Mes",
|
|
138
|
-
y="Ventas",
|
|
139
|
-
title="📈 Evolución de Ventas 2024",
|
|
140
|
-
row=3, col=1, height=10, width=6
|
|
92
|
+
fig_bar = px.bar(
|
|
93
|
+
df.groupby("region")["revenue"].sum().reset_index().sort_values("revenue"),
|
|
94
|
+
x="revenue", y="region", orientation="h", color="region",
|
|
95
|
+
color_discrete_sequence=["#059669", "#10B981", "#34D399", "#6EE7B7"],
|
|
141
96
|
)
|
|
97
|
+
fig_bar.update_layout(showlegend=False)
|
|
142
98
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
chart_type="bar",
|
|
147
|
-
x="Producto",
|
|
148
|
-
y="Ventas",
|
|
149
|
-
title="🏷️ Ventas por Producto",
|
|
150
|
-
row=3, col=7, height=10, width=6
|
|
99
|
+
fig_line = px.line(
|
|
100
|
+
df.groupby("date")["revenue"].sum().reset_index(),
|
|
101
|
+
x="date", y="revenue", color_discrete_sequence=["#059669"],
|
|
151
102
|
)
|
|
152
103
|
|
|
153
|
-
|
|
154
|
-
|
|
104
|
+
dash = HTML(
|
|
105
|
+
title="Manual Dashboard", theme="modern_green",
|
|
106
|
+
cols=12, rows=9, gap=14, padding=20,
|
|
107
|
+
navbar={"title": "Manual Dashboard",
|
|
108
|
+
"items": [{"label": "Home", "link": "#"}, {"label": "Analytics", "link": "#"}]},
|
|
109
|
+
authors=[{"name": "Data Team", "email": "data@acme.com"}],
|
|
110
|
+
data_button=True, df=df,
|
|
111
|
+
)
|
|
155
112
|
|
|
113
|
+
dash.add_valuebox("Total Revenue", "$2.4M", icon_key="dollar", row=1, col=1, height=2, width=3)
|
|
114
|
+
dash.add_valuebox("Total Units", "18.4K", icon_key="box", row=1, col=4, height=2, width=3)
|
|
115
|
+
dash.add_valuebox("Avg Rating", "4.12", icon_key="award", row=1, col=7, height=2, width=3)
|
|
116
|
+
dash.add_valuebox("Return Rate", "12%", icon_key="percent", row=1, col=10, height=2, width=3)
|
|
117
|
+
|
|
118
|
+
dash.add_infobox(df=df, variable="revenue",
|
|
119
|
+
info=["mean", "median", "std", "min", "max", "kurtosis", "skewness", "nulls"],
|
|
120
|
+
title="Revenue Stats", row=3, col=1, height=4, width=3)
|
|
121
|
+
dash.add_chart(fig=fig_bar, title="Revenue by Region",
|
|
122
|
+
row=3, col=4, height=4, width=9, show_info_btn=True,
|
|
123
|
+
_info_stats={"Regions": "4", "Total": "$2.4M"})
|
|
124
|
+
dash.add_chart(fig=fig_line, title="Daily Revenue Trend",
|
|
125
|
+
row=7, col=1, height=3, width=12, show_info_btn=True)
|
|
126
|
+
|
|
127
|
+
dash.generate("demo6_manual.html")
|
|
156
128
|
```
|
|
157
129
|
|
|
158
130
|
![DashBoardViewX](https://raw.githubusercontent.com/GhostAnalyst30/ViewX/main/images_for_git/DashBoard_Example.png
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|