Generar tablas de frecuencia y gráficos
Importamos la base de datos nuevamente para evitar algunos conflictos
<- read.csv("shows.csv", sep = ";") animacion
Recodificamos las variables
names(animacion) <- c("Puesto","Nombre","Año","Duracion","Género","Puntaje","Votos")
Omitimos los valores nulos
<- na.omit(animacion) animacion
Ejecutamos la libreria “summarytools”
library(summarytools)
freq(animacion$Puntaje)
## Frequencies
## animacion$Puntaje
## Type: Numeric
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ----------- ------ --------- -------------- --------- --------------
## 3.2 1 2.13 2.13 2.13 2.13
## 6.3 1 2.13 4.26 2.13 4.26
## 6.5 1 2.13 6.38 2.13 6.38
## 6.6 1 2.13 8.51 2.13 8.51
## 6.8 2 4.26 12.77 4.26 12.77
## 6.9 1 2.13 14.89 2.13 14.89
## 7.1 2 4.26 19.15 4.26 19.15
## 7.2 1 2.13 21.28 2.13 21.28
## 7.3 1 2.13 23.40 2.13 23.40
## 7.4 2 4.26 27.66 4.26 27.66
## 7.6 1 2.13 29.79 2.13 29.79
## 7.9 2 4.26 34.04 4.26 34.04
## 8 2 4.26 38.30 4.26 38.30
## 8.2 3 6.38 44.68 6.38 44.68
## 8.3 1 2.13 46.81 2.13 46.81
## 8.4 6 12.77 59.57 12.77 59.57
## 8.5 2 4.26 63.83 4.26 63.83
## 8.6 3 6.38 70.21 6.38 70.21
## 8.7 4 8.51 78.72 8.51 78.72
## 8.8 2 4.26 82.98 4.26 82.98
## 8.9 1 2.13 85.11 2.13 85.11
## 9 3 6.38 91.49 6.38 91.49
## 9.1 1 2.13 93.62 2.13 93.62
## 9.3 1 2.13 95.74 2.13 95.74
## 9.4 1 2.13 97.87 2.13 97.87
## 9.7 1 2.13 100.00 2.13 100.00
## <NA> 0 0.00 100.00
## Total 47 100.00 100.00 100.00 100.00
library(epiDisplay)
tab1(animacion$Puntaje)
## animacion$Puntaje :
## Frequency Percent Cum. percent
## 3.2 1 2.1 2.1
## 6.3 1 2.1 4.3
## 6.5 1 2.1 6.4
## 6.6 1 2.1 8.5
## 6.8 2 4.3 12.8
## 6.9 1 2.1 14.9
## 7.1 2 4.3 19.1
## 7.2 1 2.1 21.3
## 7.3 1 2.1 23.4
## 7.4 2 4.3 27.7
## 7.6 1 2.1 29.8
## 7.9 2 4.3 34.0
## 8 2 4.3 38.3
## 8.2 3 6.4 44.7
## 8.3 1 2.1 46.8
## 8.4 6 12.8 59.6
## 8.5 2 4.3 63.8
## 8.6 3 6.4 70.2
## 8.7 4 8.5 78.7
## 8.8 2 4.3 83.0
## 8.9 1 2.1 85.1
## 9 3 6.4 91.5
## 9.1 1 2.1 93.6
## 9.3 1 2.1 95.7
## 9.4 1 2.1 97.9
## 9.7 1 2.1 100.0
## Total 47 100.0 100.0
tab1(animacion$Votos)
## animacion$Votos :
## Frequency Percent Cum. percent
## 355 1 2.1 2.1
## 539 1 2.1 4.3
## 1232 1 2.1 6.4
## 2548 1 2.1 8.5
## 5759 1 2.1 10.6
## 6269 1 2.1 12.8
## 8182 1 2.1 14.9
## 10061 1 2.1 17.0
## 10613 1 2.1 19.1
## 11645 1 2.1 21.3
## 15691 1 2.1 23.4
## 22796 1 2.1 25.5
## 23460 1 2.1 27.7
## 31786 1 2.1 29.8
## 37335 1 2.1 31.9
## 41881 1 2.1 34.0
## 55915 1 2.1 36.2
## 60494 1 2.1 38.3
## 60842 1 2.1 40.4
## 61931 1 2.1 42.6
## 67960 1 2.1 44.7
## 79301 1 2.1 46.8
## 81343 1 2.1 48.9
## 96880 1 2.1 51.1
## 101339 1 2.1 53.2
## 103990 1 2.1 55.3
## 124898 1 2.1 57.4
## 128206 1 2.1 59.6
## 135460 1 2.1 61.7
## 155029 1 2.1 63.8
## 156050 1 2.1 66.0
## 168071 1 2.1 68.1
## 170727 1 2.1 70.2
## 200274 1 2.1 72.3
## 203013 1 2.1 74.5
## 218233 1 2.1 76.6
## 237826 1 2.1 78.7
## 313079 1 2.1 80.9
## 338447 1 2.1 83.0
## 339067 1 2.1 85.1
## 368653 1 2.1 87.2
## 369274 1 2.1 89.4
## 406290 1 2.1 91.5
## 497187 1 2.1 93.6
## 503181 1 2.1 95.7
## 515315 1 2.1 97.9
## 1052286 1 2.1 100.0
## Total 47 100.0 100.0
library(funModeling)
df_status(animacion)
## variable q_zeros p_zeros q_na p_na q_inf p_inf type unique
## 1 Puesto 0 0 0 0 0 0 integer 47
## 2 Nombre 0 0 0 0 0 0 character 47
## 3 Año 0 0 0 0 0 0 character 29
## 4 Duracion 0 0 0 0 0 0 character 25
## 5 Género 0 0 0 0 0 0 character 13
## 6 Puntaje 0 0 0 0 0 0 numeric 26
## 7 Votos 0 0 0 0 0 0 numeric 47
0.7 Gráficos y tablas para variabes cualitativas
freq(animacion)
## Nombre frequency percentage cumulative_perc
## 1 American Dad! 1 2.13 2.13
## 2 Arcane 1 2.13 4.26
## 3 Archer 1 2.13 6.39
## 4 Attack on Titan 1 2.13 8.52
## 5 Avatar: The Last Airbender 1 2.13 10.65
## 6 Batman: The Animated Series 1 2.13 12.78
## 7 Big Mouth 1 2.13 14.91
## 8 Bleach 1 2.13 17.04
## 9 Bleach: Thousand-Year Blood War 1 2.13 19.17
## 10 Bluey 1 2.13 21.30
## 11 Bob's Burgers 1 2.13 23.43
## 12 BoJack Horseman 1 2.13 25.56
## 13 Chainsaw Man 1 2.13 27.69
## 14 Coco 1 2.13 29.82
## 15 Cyberpunk: Edgerunners 1 2.13 31.95
## 16 Demon Slayer: Kimetsu no Yaiba 1 2.13 34.08
## 17 Encanto 1 2.13 36.21
## 18 Enchanted 1 2.13 38.34
## 19 Family Guy 1 2.13 40.47
## 20 Futurama 1 2.13 42.60
## 21 Invincible 1 2.13 44.73
## 22 Love, Death & Robots 1 2.13 46.86
## 23 Lyle, Lyle, Crocodile 1 2.13 48.99
## 24 Minions: The Rise of Gru 1 2.13 51.12
## 25 Miraculous: Tales of Ladybug & Cat Noir 1 2.13 53.25
## 26 Mob Psycho 100 1 2.13 55.38
## 27 My Hero Academia 1 2.13 57.51
## 28 One Piece 1 2.13 59.64
## 29 One Piece Film: Red 1 2.13 61.77
## 30 Pinocchio 1 2.13 63.90
## 31 Rick and Morty 1 2.13 66.03
## 32 Sing 1 2.13 68.16
## 33 Sing 2 1 2.13 70.29
## 34 South Park 1 2.13 72.42
## 35 SPY×FAMILY 1 2.13 74.55
## 36 Star Wars: Tales of the Jedi 1 2.13 76.68
## 37 Star Wars: The Clone Wars 1 2.13 78.81
## 38 Super Pets 1 2.13 80.94
## 39 The Bad Guys 1 2.13 83.07
## 40 The Dragon Prince 1 2.13 85.20
## 41 The Lion King 1 2.13 87.33
## 42 The Nightmare Before Christmas 1 2.13 89.46
## 43 The Simpsons 1 2.13 91.59
## 44 The Soccer Football Movie 1 2.13 93.72
## 45 Wendell & Wild 1 2.13 95.85
## 46 Zootopia+ 1 2.13 97.98
## 47 Zootropolis 1 2.13 100.00
## Año frequency percentage cumulative_perc
## 1 -2022 7 14.89 14.89
## 2 (2022– ) 6 12.77 27.66
## 3 -2016 2 4.26 31.92
## 4 -2021 2 4.26 36.18
## 5 (1999– ) 2 4.26 40.44
## 6 (2016– ) 2 4.26 44.70
## 7 (2018– ) 2 4.26 48.96
## 8 (2019– ) 2 4.26 53.22
## 9 (2021– ) 2 4.26 57.48
## 10 -1993 1 2.13 59.61
## 11 -1994 1 2.13 61.74
## 12 -2007 1 2.13 63.87
## 13 (1989– ) 1 2.13 66.00
## 14 (1992–1995) 1 2.13 68.13
## 15 (1997– ) 1 2.13 70.26
## 16 (1999–2023) 1 2.13 72.39
## 17 (2004–2012) 1 2.13 74.52
## 18 (2005– ) 1 2.13 76.65
## 19 (2005–2008) 1 2.13 78.78
## 20 (2008–2020) 1 2.13 80.91
## 21 (2009– ) 1 2.13 83.04
## 22 (2011– ) 1 2.13 85.17
## 23 (2013– ) 1 2.13 87.30
## 24 (2013–2023) 1 2.13 89.43
## 25 (2014–2020) 1 2.13 91.56
## 26 (2015– ) 1 2.13 93.69
## 27 (2017– ) 1 2.13 95.82
## 28 (I) (2017) 1 2.13 97.95
## 29 (II) (2022) 1 2.13 100.00
## Duracion frequency percentage cumulative_perc
## 1 24 min 9 19.15 19.15
## 2 22 min 7 14.89 34.04
## 3 23 min 4 8.51 42.55
## 4 105 min 3 6.38 48.93
## 5 2 4.26 53.19
## 6 108 min 2 4.26 57.45
## 7 15 min 2 4.26 61.71
## 8 100 min 1 2.13 63.84
## 9 102 min 1 2.13 65.97
## 10 106 min 1 2.13 68.10
## 11 107 min 1 2.13 70.23
## 12 110 min 1 2.13 72.36
## 13 115 min 1 2.13 74.49
## 14 117 min 1 2.13 76.62
## 15 20 min 1 2.13 78.75
## 16 25 min 1 2.13 80.88
## 17 26 min 1 2.13 83.01
## 18 30 min 1 2.13 85.14
## 19 41 min 1 2.13 87.27
## 20 50 min 1 2.13 89.40
## 21 7 min 1 2.13 91.53
## 22 73 min 1 2.13 93.66
## 23 76 min 1 2.13 95.79
## 24 87 min 1 2.13 97.92
## 25 88 min 1 2.13 100.00
## Género frequency percentage cumulative_perc
## 1 Animation, Action, Adventure 17 36.17 36.17
## 2 Animation, Adventure, Comedy 10 21.28 57.45
## 3 Animation, Comedy 5 10.64 68.09
## 4 Animation, Action, Comedy 3 6.38 74.47
## 5 Animation, Comedy, Family 3 6.38 80.85
## 6 Animation, Short, Action 2 4.26 85.11
## 7 Animation, Adventure, Drama 1 2.13 87.24
## 8 Animation, Comedy, Drama 1 2.13 89.37
## 9 Animation, Comedy, Romance 1 2.13 91.50
## 10 Animation, Drama, Family 1 2.13 93.63
## 11 Animation, Family 1 2.13 95.76
## 12 Animation, Family, Fantasy 1 2.13 97.89
## 13 Animation, Short, Adventure 1 2.13 100.00
## [1] "Variables processed: Nombre, Año, Duracion, Género"
freq(animacion, path_out = "resultados")
## Nombre frequency percentage cumulative_perc
## 1 American Dad! 1 2.13 2.13
## 2 Arcane 1 2.13 4.26
## 3 Archer 1 2.13 6.39
## 4 Attack on Titan 1 2.13 8.52
## 5 Avatar: The Last Airbender 1 2.13 10.65
## 6 Batman: The Animated Series 1 2.13 12.78
## 7 Big Mouth 1 2.13 14.91
## 8 Bleach 1 2.13 17.04
## 9 Bleach: Thousand-Year Blood War 1 2.13 19.17
## 10 Bluey 1 2.13 21.30
## 11 Bob's Burgers 1 2.13 23.43
## 12 BoJack Horseman 1 2.13 25.56
## 13 Chainsaw Man 1 2.13 27.69
## 14 Coco 1 2.13 29.82
## 15 Cyberpunk: Edgerunners 1 2.13 31.95
## 16 Demon Slayer: Kimetsu no Yaiba 1 2.13 34.08
## 17 Encanto 1 2.13 36.21
## 18 Enchanted 1 2.13 38.34
## 19 Family Guy 1 2.13 40.47
## 20 Futurama 1 2.13 42.60
## 21 Invincible 1 2.13 44.73
## 22 Love, Death & Robots 1 2.13 46.86
## 23 Lyle, Lyle, Crocodile 1 2.13 48.99
## 24 Minions: The Rise of Gru 1 2.13 51.12
## 25 Miraculous: Tales of Ladybug & Cat Noir 1 2.13 53.25
## 26 Mob Psycho 100 1 2.13 55.38
## 27 My Hero Academia 1 2.13 57.51
## 28 One Piece 1 2.13 59.64
## 29 One Piece Film: Red 1 2.13 61.77
## 30 Pinocchio 1 2.13 63.90
## 31 Rick and Morty 1 2.13 66.03
## 32 Sing 1 2.13 68.16
## 33 Sing 2 1 2.13 70.29
## 34 South Park 1 2.13 72.42
## 35 SPY×FAMILY 1 2.13 74.55
## 36 Star Wars: Tales of the Jedi 1 2.13 76.68
## 37 Star Wars: The Clone Wars 1 2.13 78.81
## 38 Super Pets 1 2.13 80.94
## 39 The Bad Guys 1 2.13 83.07
## 40 The Dragon Prince 1 2.13 85.20
## 41 The Lion King 1 2.13 87.33
## 42 The Nightmare Before Christmas 1 2.13 89.46
## 43 The Simpsons 1 2.13 91.59
## 44 The Soccer Football Movie 1 2.13 93.72
## 45 Wendell & Wild 1 2.13 95.85
## 46 Zootopia+ 1 2.13 97.98
## 47 Zootropolis 1 2.13 100.00
## Año frequency percentage cumulative_perc
## 1 -2022 7 14.89 14.89
## 2 (2022– ) 6 12.77 27.66
## 3 -2016 2 4.26 31.92
## 4 -2021 2 4.26 36.18
## 5 (1999– ) 2 4.26 40.44
## 6 (2016– ) 2 4.26 44.70
## 7 (2018– ) 2 4.26 48.96
## 8 (2019– ) 2 4.26 53.22
## 9 (2021– ) 2 4.26 57.48
## 10 -1993 1 2.13 59.61
## 11 -1994 1 2.13 61.74
## 12 -2007 1 2.13 63.87
## 13 (1989– ) 1 2.13 66.00
## 14 (1992–1995) 1 2.13 68.13
## 15 (1997– ) 1 2.13 70.26
## 16 (1999–2023) 1 2.13 72.39
## 17 (2004–2012) 1 2.13 74.52
## 18 (2005– ) 1 2.13 76.65
## 19 (2005–2008) 1 2.13 78.78
## 20 (2008–2020) 1 2.13 80.91
## 21 (2009– ) 1 2.13 83.04
## 22 (2011– ) 1 2.13 85.17
## 23 (2013– ) 1 2.13 87.30
## 24 (2013–2023) 1 2.13 89.43
## 25 (2014–2020) 1 2.13 91.56
## 26 (2015– ) 1 2.13 93.69
## 27 (2017– ) 1 2.13 95.82
## 28 (I) (2017) 1 2.13 97.95
## 29 (II) (2022) 1 2.13 100.00
## Duracion frequency percentage cumulative_perc
## 1 24 min 9 19.15 19.15
## 2 22 min 7 14.89 34.04
## 3 23 min 4 8.51 42.55
## 4 105 min 3 6.38 48.93
## 5 2 4.26 53.19
## 6 108 min 2 4.26 57.45
## 7 15 min 2 4.26 61.71
## 8 100 min 1 2.13 63.84
## 9 102 min 1 2.13 65.97
## 10 106 min 1 2.13 68.10
## 11 107 min 1 2.13 70.23
## 12 110 min 1 2.13 72.36
## 13 115 min 1 2.13 74.49
## 14 117 min 1 2.13 76.62
## 15 20 min 1 2.13 78.75
## 16 25 min 1 2.13 80.88
## 17 26 min 1 2.13 83.01
## 18 30 min 1 2.13 85.14
## 19 41 min 1 2.13 87.27
## 20 50 min 1 2.13 89.40
## 21 7 min 1 2.13 91.53
## 22 73 min 1 2.13 93.66
## 23 76 min 1 2.13 95.79
## 24 87 min 1 2.13 97.92
## 25 88 min 1 2.13 100.00
## Género frequency percentage cumulative_perc
## 1 Animation, Action, Adventure 17 36.17 36.17
## 2 Animation, Adventure, Comedy 10 21.28 57.45
## 3 Animation, Comedy 5 10.64 68.09
## 4 Animation, Action, Comedy 3 6.38 74.47
## 5 Animation, Comedy, Family 3 6.38 80.85
## 6 Animation, Short, Action 2 4.26 85.11
## 7 Animation, Adventure, Drama 1 2.13 87.24
## 8 Animation, Comedy, Drama 1 2.13 89.37
## 9 Animation, Comedy, Romance 1 2.13 91.50
## 10 Animation, Drama, Family 1 2.13 93.63
## 11 Animation, Family 1 2.13 95.76
## 12 Animation, Family, Fantasy 1 2.13 97.89
## 13 Animation, Short, Adventure 1 2.13 100.00
## [1] "Variables processed: Nombre, Año, Duracion, Género"