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
1d089149
Commit
1d089149
authored
Jun 06, 2025
by
Jose Luis Gordillo Ruiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eliminamos gráfica de cobertura de datos
ahora inmersa en una combinación de bullet y scatter
parent
495a5ee8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
95 deletions
+0
-95
dinamyc.py
+0
-95
No files found.
dinamyc.py
View file @
1d089149
...
@@ -161,45 +161,6 @@ app.layout = html.Div(children=[
...
@@ -161,45 +161,6 @@ app.layout = html.Div(children=[
#gráfica
#gráfica
html
.
Div
(
children
=
[
dcc
.
Graph
(
id
=
"cover_series"
)],)
html
.
Div
(
children
=
[
dcc
.
Graph
(
id
=
"cover_series"
)],)
],
style
=
{
'display'
:
'flex'
,
'flexDirection'
:
'row'
},
className
=
"wrapper"
),
],
style
=
{
'display'
:
'flex'
,
'flexDirection'
:
'row'
},
className
=
"wrapper"
),
# cobertura por fuente de datos
html
.
Div
(
children
=
[
html
.
H1
(
"Cobertura de pacientes por fuente de datos"
,
className
=
"header-title2"
)
]),
# dos columnas: controles y gráfica de pacientes por fuente de datos
html
.
Div
(
children
=
[
#controles
html
.
Div
(
children
=
[
html
.
Div
(
children
=
"Etapa"
,
className
=
"menu-title"
),
dcc
.
Dropdown
(
id
=
"etapaSel"
,
options
=
[
{
"label"
:
1
,
"value"
:
1
},
{
"label"
:
2
,
"value"
:
2
},
{
"label"
:
3
,
"value"
:
3
},
],
value
=
1
,
clearable
=
False
,
searchable
=
False
,
className
=
"dropdown"
,
),
html
.
Div
(
children
=
"Comidas"
,
className
=
"menu-title"
),
dcc
.
Slider
(
id
=
"min_comidas"
,
min
=
1
,
max
=
Comidas_totales_e
,
value
=
15
,
marks
=
{
1
:
"1"
,
15
:
"15"
,
21
:
"21"
,
30
:
"30"
,
42
:
"42"
,
Comidas_totales_e
:
str
(
Comidas_totales_e
)}
),
html
.
Div
(
children
=
"Días con glucómetro"
,
className
=
"menu-title"
),
dcc
.
Slider
(
id
=
"min_glucosa"
,
min
=
1
,
max
=
Glucometro_e
,
value
=
7
,
marks
=
{
1
:
"1"
,
7
:
"7"
,
14
:
"14"
,
28
:
"28"
,
42
:
"+42"
}
),
]),
#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.
html
.
Div
(
children
=
[
html
.
Div
(
children
=
[
html
.
H1
(
"Cantidad de datos registrados por paciente"
,
className
=
"header-title2"
),
html
.
H1
(
"Cantidad de datos registrados por paciente"
,
className
=
"header-title2"
),
...
@@ -338,62 +299,6 @@ def update_cobertura_series(etapaSel=1, min_comidas=10, min_glucosa=7, distribuc
...
@@ -338,62 +299,6 @@ def update_cobertura_series(etapaSel=1, min_comidas=10, min_glucosa=7, distribuc
return
multi
return
multi
@app.callback
(
Output
(
"gauges"
,
"figure"
),
Input
(
"etapaSel"
,
"value"
),
Input
(
"min_comidas"
,
"value"
),
Input
(
"min_glucosa"
,
"value"
),
)
def
update_gauges
(
etapaSel
,
min_comidas
,
min_glucosa
):
gauges
=
{
'shape'
:
"bullet"
,
'axis'
:
{
'range'
:
[
None
,
100
]},
'steps'
:
[
{
'range'
:
[
0
,
25
],
'color'
:
"lightcyan"
},
{
'range'
:
[
25
,
50
],
'color'
:
"lightblue"
},
{
'range'
:
[
50
,
75
],
'color'
:
"skyblue"
},
{
'range'
:
[
75
,
100
],
'color'
:
"steelblue"
}],
'bar'
:
{
'color'
:
"blue"
},
}
numbers
=
{
'suffix'
:
'
%
'
,
'valueformat'
:
'.2f'
}
modes
=
"number+gauge"
comidas_data
=
resumen_comidas
.
loc
[(
slice
(
None
),
f
'e{etapaSel}'
)]
>
min_comidas
glucosa_data
=
glucometro_df
.
loc
[
glucometro_df
[
"visit_id"
]
==
etapaSel
,
"amount_of_days"
]
>
min_glucosa
microbiota_data
=
num_secuencias
[
etapaSel
-
1
]
# microbiota_data = visitas_datos[etapaSel-1]["muestra"].count()
# La N de la etapa debe ser el número de participantes que cumplieron la etapa.
# esto es diferente al número de participantes que asistieron a la visita N o N+1.
N_etapa
=
len
(
participantes
.
loc
[
participantes
[
"finished_periods"
]
.
isin
(
range
(
etapaSel
,
4
))]
.
index
)
multi
=
go
.
Figure
()
multi
.
add_trace
(
go
.
Indicator
(
value
=
100
*
comidas_data
.
sum
()
/
N_etapa
,
domain
=
{
'x'
:
[
0.25
,
1
],
'y'
:
[
0.60
,
0.7
]},
title
=
{
'text'
:
"Comidas"
},
mode
=
modes
,
number
=
numbers
,
gauge
=
gauges
,
))
multi
.
add_trace
(
go
.
Indicator
(
value
=
100
*
glucosa_data
.
sum
()
/
N_etapa
,
domain
=
{
'x'
:
[
0.25
,
1
],
'y'
:
[
0.8
,
0.9
]},
title
=
{
'text'
:
"Glucómetro"
},
mode
=
modes
,
number
=
numbers
,
gauge
=
gauges
))
multi
.
add_trace
(
go
.
Indicator
(
value
=
100
*
microbiota_data
/
N_etapa
,
domain
=
{
'x'
:
[
0.25
,
1
],
'y'
:
[
0.5
,
0.6
]},
title
=
{
'text'
:
"Microbiota"
},
mode
=
modes
,
number
=
numbers
,
gauge
=
gauges
))
return
multi
@app.callback
(
@app.callback
(
Output
(
"datos_por_paciente"
,
"figure"
),
Output
(
"datos_por_paciente"
,
"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