Update app.py
Browse files
app.py
CHANGED
@@ -46,9 +46,22 @@ if uploaded_file is not None:
|
|
46 |
df_100 = df_050[col_selec]
|
47 |
df_110 = pd.get_dummies(df_100)
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
st.header('Matriz de correlación de todas las categorías')
|
50 |
|
51 |
-
corr_matrix = df_110.corr()
|
52 |
plt.figure(figsize=(21, 21)) # Adjust the figure size as needed
|
53 |
sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', fmt=".2f", linewidths=0.5, annot_kws={'size': 5})
|
54 |
plt.title('Mapa de Calor de la Correlation de Variables')
|
|
|
46 |
df_100 = df_050[col_selec]
|
47 |
df_110 = pd.get_dummies(df_100)
|
48 |
|
49 |
+
# Calcular línea base
|
50 |
+
df_linBase = df_110.mean() / df_110.max() * 100
|
51 |
+
df_linBase2 = pd.DataFrame(df_linBase)
|
52 |
+
csv_10 = df_linBase2.to_csv(encoding='iso-8859-1')
|
53 |
+
|
54 |
+
st.download_button(
|
55 |
+
label="Descargar CSV",
|
56 |
+
data=csv_10,
|
57 |
+
file_name='línea_base.csv',
|
58 |
+
mime='text/csv'
|
59 |
+
)
|
60 |
+
|
61 |
+
|
62 |
st.header('Matriz de correlación de todas las categorías')
|
63 |
|
64 |
+
corr_matrix = df_110.corr(){}
|
65 |
plt.figure(figsize=(21, 21)) # Adjust the figure size as needed
|
66 |
sns.heatmap(corr_matrix, annot=True, cmap='coolwarm', fmt=".2f", linewidths=0.5, annot_kws={'size': 5})
|
67 |
plt.title('Mapa de Calor de la Correlation de Variables')
|