Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
inventario
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jose Luis Gordillo Ruiz
inventario
Commits
9dc13d25
Commit
9dc13d25
authored
Jun 05, 2025
by
Jose Luis Gordillo Ruiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nueva versión de la gráfica de datos por paciente
no recurre a los datos del archivo, tiene su función independiente
parent
dd955cae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
2 deletions
+77
-2
dinamyc.py
+77
-2
No files found.
dinamyc.py
View file @
9dc13d25
...
...
@@ -183,7 +183,47 @@ app.layout = html.Div(children=[
#gráfica
html
.
Div
(
children
=
[
dcc
.
Graph
(
id
=
"gauges"
)],)
],
style
=
{
'display'
:
'flex'
,
'flexDirection'
:
'row'
},
className
=
"wrapper"
),
# segundo 'panel': datos existentes por paciente.
# segundo 'panel': datos existentes por paciente. working in progress
html
.
Div
(
children
=
[
html
.
H1
(
"Cantidad de datos registrados por paciente"
,
className
=
"header-title2"
),
# controles. 1 renglon, dos columnas.
html
.
Div
(
children
=
[
#dropdown etapa. columna izquierda.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
"Etapa"
,
className
=
"menu-title"
),
dcc
.
Dropdown
(
id
=
"select_etapa_dpp"
,
options
=
[
{
"label"
:
1
,
"value"
:
1
},
{
"label"
:
2
,
"value"
:
2
},
{
"label"
:
3
,
"value"
:
3
},
],
value
=
1
,
clearable
=
False
,
searchable
=
False
,
className
=
"dropdown"
,
),
],
className
=
"wrapper"
),
# dropdown fuente. columna derecha.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
"Fuente"
,
className
=
"menu-title"
),
dcc
.
Dropdown
(
id
=
"select_fuente_dpp"
,
options
=
[
{
"label"
:
"Comidas"
,
"value"
:
1
},
{
"label"
:
"Glucómetro"
,
"value"
:
2
},
],
value
=
1
,
clearable
=
False
,
searchable
=
False
,
className
=
"dropdown"
,
),
],
className
=
"wrapper"
,),
],
style
=
{
"display"
:
"flex"
,
"flexDirection"
:
"row"
},),
dcc
.
Graph
(
id
=
"datos_por_paciente"
),
],
className
=
"wrapper"
),
# segundo 'panel': datos existentes por paciente. legajo.
html
.
Div
(
children
=
[
html
.
H1
(
"Cantidad de datos por paciente"
,
className
=
"header-title2"
),
# controles. 1 renglon, dos columnas.
...
...
@@ -197,7 +237,6 @@ app.layout = html.Div(children=[
{
"label"
:
1
,
"value"
:
1
},
{
"label"
:
2
,
"value"
:
2
},
{
"label"
:
3
,
"value"
:
3
},
{
"label"
:
"No-Clas."
,
"value"
:
99
}
],
value
=
1
,
clearable
=
False
,
...
...
@@ -356,6 +395,42 @@ def update_gauges(etapaSel, min_comidas, min_glucosa):
return
multi
@app.callback
(
Output
(
"datos_por_paciente"
,
"figure"
),
Input
(
"select_etapa_dpp"
,
"value"
),
Input
(
"select_fuente_dpp"
,
"value"
)
)
def
update_datos_por_paciente
(
etapa
,
fuente
):
if
fuente
==
1
:
xs
=
resumen_comidas
.
loc
[(
slice
(
None
),
f
'e{etapa}'
)]
.
sort_values
()
title
=
f
"Comidas por paciente en la etapa {etapa}"
medCadena
=
'comidas'
if
fuente
==
2
:
xs
=
glucometro_df
.
loc
[
glucometro_df
[
"visit_id"
]
==
etapa
][
"amount_of_days"
]
.
sort_values
()
title
=
f
'dias de glucómetro por paciente en la etapa {etapa}'
medCadena
=
'días de glucómetro'
xs
.
index
=
"p_"
+
xs
.
index
.
astype
(
str
)
figura
=
{
"data"
:
[
{
"x"
:
xs
.
index
,
"y"
:
xs
,
"name"
:
"Comidas"
,
#"orientation": "v",
},
#{ "x": temp["Comidas_e1"], "type": "histogram"},
],
"layout"
:
{
"title"
:
{
"text"
:
title
},
"xaxis"
:
{
"title"
:
{
"text"
:
"Paciente"
}},
"yaxis"
:
{
"title"
:
{
"text"
:
f
'Número de {medCadena}'
}},
"bargap"
:
"0.05"
}
}
return
figura
@app.callback
(
Output
(
"detalle_figura"
,
"figure"
),
Output
(
"multi-visitas"
,
"figure"
),
Output
(
"detalle_pruebas"
,
"figure"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment