jcmachicao
commited on
Commit
•
5ab1006
1
Parent(s):
a36df71
Create app.ipynb
Browse files
app.ipynb
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Actualizado por: José Carlos Machicao, Fecha de actualización: 2024_07_08, Lima
|
2 |
+
# Esta vinculado a los PKL de https://sites.google.com/continental.edu.pe/edusights/inicio
|
3 |
+
|
4 |
+
# Importacion de librerias
|
5 |
+
import streamlit as st
|
6 |
+
import pandas as pd
|
7 |
+
import numpy as np
|
8 |
+
import seaborn as sns
|
9 |
+
import matplotlib.pyplot as plt
|
10 |
+
import plotly.express as px
|
11 |
+
from sklearn.model_selection import train_test_split
|
12 |
+
from sklearn.preprocessing import StandardScaler
|
13 |
+
from sklearn.decomposition import PCA
|
14 |
+
pd.DataFrame.iteritems = pd.DataFrame.items
|
15 |
+
scaler = StandardScaler()
|
16 |
+
|
17 |
+
c1, c2 = st.columns([6,6])
|
18 |
+
with c2:
|
19 |
+
st.image('logo_vidad.png', width=300, caption='https://www.continental.edu.pe/')
|
20 |
+
|
21 |
+
# Títulos y carga de archivo
|
22 |
+
st.title("Visualización y Clusterización automática de Data de Estudiantes")
|
23 |
+
st.write("Cargue el archivo PKL para visualizar el análisis de su contenido.")
|
24 |
+
uploaded_file = st.file_uploader("Cargar archivo: ", type='pkl')
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
if uploaded_file is not None:
|
29 |
+
|
30 |
+
df = pd.read_pickle(uploaded_file)
|
31 |
+
|
32 |
+
|
33 |
+
st.subheader('Radar Diferencia con Linea Base')
|
34 |
+
fig4 = px.line_polar(df_result, r='diff_linbase', theta='col_cats')
|
35 |
+
st.plotly_chart(fig4)
|
36 |
+
|
37 |
+
csv2 = df_result.to_csv(encoding='iso-8859-1')
|
38 |
+
|
39 |
+
st.download_button(
|
40 |
+
label="Descargar CSV",
|
41 |
+
data=csv2,
|
42 |
+
file_name='frecuencias_experimento.csv',
|
43 |
+
mime='text/csv'
|
44 |
+
)
|
45 |
+
|
46 |
+
c1, c2 = st.columns([6,6])
|
47 |
+
with c1:
|
48 |
+
st.image('gdmklogo.png', width=100, caption='Powered by GestioDinámica 2024')
|