jcmachicao commited on
Commit
9f44fe9
·
verified ·
1 Parent(s): 1d158d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -23,6 +23,8 @@ if uploaded_file is not None:
23
  # Eliminación de datos inválidos
24
  df_050 = df.dropna(axis=0)
25
  df_050.index = df_050.DNI
 
 
26
 
27
  # Depuración de columnas sólo para aquellas que contribuyen al clustering
28
  col_selec = []
@@ -87,8 +89,8 @@ if uploaded_file is not None:
87
  plt.figure(figsize=(7, 4))
88
  densidades = pd.DataFrame(plt_extracto.get_array())
89
  densidades.hist(bins=50, log=True)
90
- plt.xlabel('Cantidad de Ocurrencias')
91
- plt.ylabel('Frecuencia')
92
 
93
  plt.title('Histograma de Densidades')
94
  st.pyplot(plt)
@@ -109,8 +111,10 @@ if uploaded_file is not None:
109
  st.write('Usted ha elegido ', NUM_CASOS, 'casos.')
110
 
111
  radiohex = (data_210.pca_1.max() - data_210.pca_1.min())/50/2
112
-
113
- CASOX = st.selectbox('Elija el caso: ', (1, 2, 3))
 
 
114
 
115
  a, b = patrones_df.col1[CASOX], patrones_df.col2[CASOX]
116
  enfoqueX = data_210[
@@ -122,7 +126,7 @@ if uploaded_file is not None:
122
 
123
  st.write(enfoqueX.shape)
124
 
125
- st.header('Diagrama de Coordenadas Paralelas')
126
 
127
  LISTA_SELEC = st.multiselect('Escoja la variable de color: ', list(enfoqueX.columns))
128
  st.write(LISTA_SELEC)
@@ -130,6 +134,8 @@ if uploaded_file is not None:
130
  fig2 = px.parallel_categories(data_frame=enfoqueX[list(LISTA_SELEC)])
131
  st.plotly_chart(fig2)
132
 
 
 
133
  for c in range(NUM_CASOS):
134
  a, b = patrones_df.col1[c], patrones_df.col2[c]
135
  enfoqueX = data_210[
 
23
  # Eliminación de datos inválidos
24
  df_050 = df.dropna(axis=0)
25
  df_050.index = df_050.DNI
26
+
27
+ st.write(df_050.shape)
28
 
29
  # Depuración de columnas sólo para aquellas que contribuyen al clustering
30
  col_selec = []
 
89
  plt.figure(figsize=(7, 4))
90
  densidades = pd.DataFrame(plt_extracto.get_array())
91
  densidades.hist(bins=50, log=True)
92
+ plt.ylabel('Cantidad de Ocurrencias')
93
+ plt.xlabel('Frecuencia')
94
 
95
  plt.title('Histograma de Densidades')
96
  st.pyplot(plt)
 
111
  st.write('Usted ha elegido ', NUM_CASOS, 'casos.')
112
 
113
  radiohex = (data_210.pca_1.max() - data_210.pca_1.min())/50/2
114
+
115
+ st.header('Visualización de Caso Particular')
116
+
117
+ CASOX = st.selectbox('Elija el caso: ', range(NUM_CASOS))
118
 
119
  a, b = patrones_df.col1[CASOX], patrones_df.col2[CASOX]
120
  enfoqueX = data_210[
 
126
 
127
  st.write(enfoqueX.shape)
128
 
129
+ st.subheader('Diagrama de Coordenadas Paralelas')
130
 
131
  LISTA_SELEC = st.multiselect('Escoja la variable de color: ', list(enfoqueX.columns))
132
  st.write(LISTA_SELEC)
 
134
  fig2 = px.parallel_categories(data_frame=enfoqueX[list(LISTA_SELEC)])
135
  st.plotly_chart(fig2)
136
 
137
+ st.subheader('Poblaciones por Hexágonos Elegidos')
138
+
139
  for c in range(NUM_CASOS):
140
  a, b = patrones_df.col1[c], patrones_df.col2[c]
141
  enfoqueX = data_210[