---
title: "RENDIMIENTO ACADÉMICO DE LOS DÉCIMOS EN MATEMÁTICA- PRIMER TRIMESTRE"
author: Prof. Deivin J. Espinosa M.
output:
flexdashboard::flex_dashboard:
theme: cosmo
social: menu
source_code: embed
---
```{r}
library(readxl)
Base <- read_excel("C:/Users/espin/Downloads/I Trimestre Mat/AS.xlsx", col_names = TRUE)
```
Column {data-width=250}
-----------------------------------------------------------------------
### **RESULTADOS POR GRUPO EN MATEMÁTICAS**
```{r}
knitr::kable(Base[1:28,c("10°A","10°B","10°C", "10°D", "10°E")])
```
```{r setup, include = FALSE}
# Cargar las librerías necesarias
library(ggplot2)
library(reshape2)
library(dplyr)
library(plotly)
library(htmlwidgets)
library(webshot)
# Crear los datos
data <- data.frame(
Grupo_A = c(4.3, 4.1, 4.0, 3.7, 3.5, 3.6, 3.8, 4.2, 4.4, 3.3, 3.8, 4.1, 4.1,
4.0, 4.1, 4.6, 4.1, 3.4, 4.1, 4.2, 4.2, 3.8, 4.9, 3.7, 3.7, 3.9,
4.0, 3.1),
Grupo_B = c(3.9, 3.9, 4.6, 3.8, 4.0, 4.0, 3.0, 3.5, 3.9, 4.3, 4.0, 3.7, 3.5,
4.5, 3.7, 3.2, 4.0, 3.1, 4.0, 3.7, 3.3, 3.4, 2.5, 3.6, 4.3, 3.8,
3.1, 3.9),
Grupo_C = c(4.1, 4.3, 3.9, 4.1, 3.9, 3.7, 4.2, 4.3, 4.3, 3.8, 4.2, 3.6, 4.4,
3.6, 4.1, 4.2, 4.1, 3.7, 3.6, 3.9, 3.9, 4.0, 3.8, 4.3, 3.6, 4.1,
4.1, 3.6),
Grupo_D = c(3.5, NA, 3.1, 4.4, 4.7, 3.9, 2.5, 4.0, 4.1, 4.0, 3.7, NA, 4.0,
NA, 3.5, 4.1, 3.8, 4.0, 4.4, 4.1, 3.7, 3.1, 4.3, 4.3, 3.3, 4.2,
3.7, NA),
Grupo_E = c(4.2, NA, 3.6, 4.6, NA, 4.3, 3.5, 4.1, 3.3, 3.8, 4.2, 4.2, 3.7,
3.4, 3.9, 3.4, 3.1, NA, 3.2, 3.6, 4.2, 3.6, 4.0, 3.4, 4.1, 4.3,
4.0, NA)
)
# Convertir los datos a largo formato
data_long <- melt(data, variable.name = "Grupo", value.name = "Nota")
# Definir los intervalos
data_long$Intervalo <- cut(data_long$Nota, breaks = c(2.0, 2.9, 3.9, 4.9, 5.0),
include.lowest = TRUE)
# Contar la cantidad de notas en cada intervalo por grupo
conteo <- as.data.frame(table(data_long$Grupo, data_long$Intervalo))
colnames(conteo) <- c("Grupo", "Intervalo", "Frecuencia")
```
Column {data-width=600}
-----------------------------------------------------------------------
### **GRÁFICO DE RENDIMIENTO ACADÉMICO**
```{r}
# Crear el gráfico de barras en 3D
p <- plot_ly(conteo, x = ~Grupo, y = ~Frecuencia, z = ~Intervalo,
type = 'bar', color = ~Intervalo, text = ~Frecuencia,
textposition = 'outside') %>%
layout(scene = list(
xaxis = list(title = 'Grupos'),
yaxis = list(title = 'Cantidad de Notas'),
zaxis = list(title = 'Intervalo')
),
title = "Cantidad de Notas por Intervalo y Grupo",
legend = list(
font = list(
size = 16 # Tamaño de la fuente de la leyenda
)
))
# Mostrar el gráfico
p
```