En el siguiente informe se detallan los índices estadísticos de las infracciones cometidas entre los meses de abril y mayo del 2010, en la ciudad de Barranquilla.
Vista general de los datos almacenados en la tabla Comparendos.
library(readxl)
BD_Comparendos <- read_excel("E:/Power BI - Intensivo/BD Comparendos TAD.xlsx")
BD_Comparendos
## # A tibble: 2,120 × 18
## `No. MANDAMIENTO DE PAGO` `FECHA MANDAMIENTO DE PAGO` EJECUTADO
## <chr> <chr> <chr>
## 1 F00002191 19/08/2010 GEOVANA DEL CARMEN VAR…
## 2 F00002126 19/08/2010 MARIJOSE CURE CHAGUI
## 3 F00002203 19/08/2010 OLGA LUCIA SANDOVAL OS…
## 4 F00001507 19/08/2010 ELSA MERCEDES HERRERA …
## 5 F00003480 19/08/2010 ALOIS THUNKER .
## 6 F00001890 19/08/2010 DIANAN ALEXANDR MEJIA …
## 7 F00002631 19/08/2010 LUIS RAMIREZ ACOSTA
## 8 F00001329 19/08/2010 MILENA ROPAIN FERNANDEZ
## 9 F00001799 19/08/2010 JACQUELINE SARMIENTO D…
## 10 F00002953 19/08/2010 MIGUEL HERNANDO GARAY …
## # ℹ 2,110 more rows
## # ℹ 15 more variables: `TIPO DE IDENTIFICACION` <chr>,
## # `No. IDENTIFICACION` <dbl>, GENERO <chr>, `COD. INFRACCION` <dbl>,
## # `SUM COD INFRACCION` <dbl>, `TIPO DE INFRACCON` <chr>, COMPARENDO <chr>,
## # `FECHA DE COMPARENDO` <dttm>, DIA <dbl>, MES <dbl>, `NOM MES` <chr>,
## # AÑO <dbl>, `PLACA DE VEHICULO` <chr>, `TIPO VEHICULO` <chr>,
## # VALOR_A_PAGAR <dbl>
Se muestran las dimensiones de la tabla “Comparendos”.
dim(BD_Comparendos)
[1] 2120 18
Resumen general de la tabla “Comparendos”.
summary(BD_Comparendos)
## No. MANDAMIENTO DE PAGO FECHA MANDAMIENTO DE PAGO EJECUTADO
## Length:2120 Length:2120 Length:2120
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
##
##
##
## TIPO DE IDENTIFICACION No. IDENTIFICACION GENERO COD. INFRACCION
## Length:2120 Min. :2.358e+05 Length:2120 Min. :64.00
## Class :character 1st Qu.:3.273e+07 Class :character 1st Qu.:64.00
## Mode :character Median :7.214e+07 Mode :character Median :64.00
## Mean :1.125e+09 Mean :66.53
## 3rd Qu.:8.002e+08 3rd Qu.:64.00
## Max. :9.003e+09 Max. :77.00
## SUM COD INFRACCION TIPO DE INFRACCON COMPARENDO
## Min. :1 Length:2120 Length:2120
## 1st Qu.:1 Class :character Class :character
## Median :1 Mode :character Mode :character
## Mean :1
## 3rd Qu.:1
## Max. :1
## FECHA DE COMPARENDO DIA MES
## Min. :2010-04-12 00:00:00.00 Min. : 1.00 Min. :4.000
## 1st Qu.:2010-04-27 00:00:00.00 1st Qu.: 9.00 1st Qu.:4.000
## Median :2010-05-06 00:00:00.00 Median :16.00 Median :5.000
## Mean :2010-05-05 16:27:37.35 Mean :15.76 Mean :4.664
## 3rd Qu.:2010-05-16 00:00:00.00 3rd Qu.:23.00 3rd Qu.:5.000
## Max. :2010-05-27 00:00:00.00 Max. :30.00 Max. :5.000
## NOM MES AÑO PLACA DE VEHICULO TIPO VEHICULO
## Length:2120 Min. :2010 Length:2120 Length:2120
## Class :character 1st Qu.:2010 Class :character Class :character
## Mode :character Median :2010 Mode :character Mode :character
## Mean :2010
## 3rd Qu.:2010
## Max. :2010
## VALOR_A_PAGAR
## Min. :257494
## 1st Qu.:257494
## Median :257494
## Mean :304741
## 3rd Qu.:257494
## Max. :514987
Sumatoria total de los valores a pagar.
sum(BD_Comparendos$VALOR_A_PAGAR)
[1] 646051192
Diagrama de tipo de identificación.
Diagrama que representa la proporción de las infracciones según el tipo de identificación de los infractores.
vehiculo = as.factor(BD_Comparendos$`TIPO DE IDENTIFICACION`)
Cuentas2 = table(vehiculo)
pie(Cuentas2,
col = c("darkolivegreen","yellow","royalblue"),
main = "Diagrama Tipo de identificación")
Diagrama que muestra la frecuencia con la que cada género (hombre, mujer y empresa), comete infracciones.
Sexo <- as.factor(BD_Comparendos$GENERO)
Cuentas1 <- table(Sexo)
barplot(Cuentas1,
main="Gráfica Género - Frecuencia",
xlab="Género",
ylab="Frecuencia",
legend = rownames(Cuentas1),
ylim = c(0, 1000),
col=c("hotpink","aquamarine","gold2")
)