# file.choose()
produccion<- read.csv("/Users/mayracampoyramos/Desktop/Analisis de Datos Concentracion/Reto/Produccion de FORM sept.csv")
# Instalar librerias
# install.packages("dplyr")
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
# install.packages("psych")
library(psych)
#Sacar número de variables:
describeData(produccion,head=1,tail=1)
## n.obs = 1614 of which 1 are complete cases. Number of variables = 15 of which all are numeric FALSE
## variable # n.obs type
## CLIENTE* 1 1613 3
## ID.FORM* 2 1613 3
## PRODUCTO* 3 1614 3
## PIEZAS.PROG.* 4 1614 3
## TMO..MIN. 5 1129 1
## HR..FIN* 6 1614 3
## ESTACION.ARRANQUE* 7 1614 3
## Laminas.procesadas.* 8 1614 3
## INICIO.SEP.UP* 9 1614 3
## fin.de.set.up* 10 1614 3
## INICIO.de.PROCESO* 11 1614 3
## FIN.de.PROCESO* 12 1614 3
## TIEMPO.CALIDAD* 13 1614 3
## TIEMPO.MATERIALES. 14 161 1
## X 15 7 1
## H1
## CLIENTE* DENSO
## ID.FORM*
## PRODUCTO* TOYOTA. MCV. Insterto D 2R. CORTE. 1 Golpe = 12 piezas. ( 9 Pza. / Celda).
## PIEZAS.PROG.* 240
## TMO..MIN. 10
## HR..FIN* 9:10
## ESTACION.ARRANQUE* C1
## Laminas.procesadas.* 48
## INICIO.SEP.UP* 9:30
## fin.de.set.up* 9:32
## INICIO.de.PROCESO* 9:;32
## FIN.de.PROCESO* 9:57
## TIEMPO.CALIDAD* 1
## TIEMPO.MATERIALES. <NA>
## X <NA>
## T1
## CLIENTE* STABILUS 3
## ID.FORM* ST-047-14234
## PRODUCTO* AUDI Q5. DIVISOR. ST0254. 6 Pza/GOLP. 1 Pza/CELDA.
## PIEZAS.PROG.* 400
## TMO..MIN. 15
## HR..FIN* 5:45
## ESTACION.ARRANQUE* TROQUEL
## Laminas.procesadas.*
## INICIO.SEP.UP*
## fin.de.set.up*
## INICIO.de.PROCESO*
## FIN.de.PROCESO*
## TIEMPO.CALIDAD*
## TIEMPO.MATERIALES. <NA>
## X <NA>
#R: Existen 15 variables y 1614 registros en la base de datos.
summary(produccion)
## CLIENTE ID.FORM PRODUCTO PIEZAS.PROG.
## Length:1614 Length:1614 Length:1614 Length:1614
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## TMO..MIN. HR..FIN ESTACION.ARRANQUE Laminas.procesadas.
## Min. : 10.00 Length:1614 Length:1614 Length:1614
## 1st Qu.: 15.00 Class :character Class :character Class :character
## Median : 20.00 Mode :character Mode :character Mode :character
## Mean : 22.92
## 3rd Qu.: 25.00
## Max. :120.00
## NA's :485
## INICIO.SEP.UP fin.de.set.up INICIO.de.PROCESO FIN.de.PROCESO
## Length:1614 Length:1614 Length:1614 Length:1614
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## TIEMPO.CALIDAD TIEMPO.MATERIALES. X
## Length:1614 Min. : 0.000 Min. :1.000
## Class :character 1st Qu.: 0.000 1st Qu.:1.000
## Mode :character Median : 0.000 Median :3.000
## Mean : 5.733 Mean :2.714
## 3rd Qu.:10.000 3rd Qu.:4.000
## Max. :51.000 Max. :5.000
## NA's :1453 NA's :1607
produccion1 <- produccion
produccion1 [is.na(produccion1)]<-0
summary (produccion1)
## CLIENTE ID.FORM PRODUCTO PIEZAS.PROG.
## Length:1614 Length:1614 Length:1614 Length:1614
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## TMO..MIN. HR..FIN ESTACION.ARRANQUE Laminas.procesadas.
## Min. : 0.00 Length:1614 Length:1614 Length:1614
## 1st Qu.: 0.00 Class :character Class :character Class :character
## Median : 15.00 Mode :character Mode :character Mode :character
## Mean : 16.03
## 3rd Qu.: 25.00
## Max. :120.00
## INICIO.SEP.UP fin.de.set.up INICIO.de.PROCESO FIN.de.PROCESO
## Length:1614 Length:1614 Length:1614 Length:1614
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## TIEMPO.CALIDAD TIEMPO.MATERIALES. X
## Length:1614 Min. : 0.0000 Min. :0.00000
## Class :character 1st Qu.: 0.0000 1st Qu.:0.00000
## Mode :character Median : 0.0000 Median :0.00000
## Mean : 0.5719 Mean :0.01177
## 3rd Qu.: 0.0000 3rd Qu.:0.00000
## Max. :51.0000 Max. :5.00000
produccion1 <- subset(produccion1, select = -c (ID.FORM, PRODUCTO, HR..FIN , ESTACION.ARRANQUE, INICIO.SEP.UP, fin.de.set.up, INICIO.de.PROCESO, FIN.de.PROCESO, X))
produccion1 <- subset(produccion1, select = -c (TIEMPO.MATERIALES.))
Variable<-c("CLIENTE", "PIEZAS.PROG.", "TMO..MIN.", "Laminas.procesadas.", "TIEMPO.CALIDAD")
Type<-c("cualitativa", "cuantitativa discreta", "cuantitativa continua ", "cuantitativa discreta", "cuantitativa continua ")
Measurement <-c("NA", "unidades", "minutos", "unidades", "hora")
table<-data.frame(Variable,Type, Measurement)
knitr::kable(table)
| Variable | Type | Measurement |
|---|---|---|
| CLIENTE | cualitativa | NA |
| PIEZAS.PROG. | cuantitativa discreta | unidades |
| TMO..MIN. | cuantitativa continua | minutos |
| Laminas.procesadas. | cuantitativa discreta | unidades |
| TIEMPO.CALIDAD | cuantitativa continua | hora |
# install.packages("ggplot2")
library(ggplot2)
##
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
##
## %+%, alpha
ggplot(produccion1, aes(x=CLIENTE, y=TIEMPO.CALIDAD)) +
geom_bar(stat="identity", fill="orange") + scale_fill_grey() + # Add bars to the plot
labs(title = "Relación de Cliente y Tiempo de calidad", # Add a title
subtitle = "RH empresa FORM", # Add a subtitle
caption = "Relación", # Add a caption
x = "Cliente")
plot(produccion1$PIEZAS.PROG. ~ produccion1$Laminas.procesadas, horizontal = TRUE)
## Warning in xy.coords(x, y, xlabel, ylabel, log): NAs introduced by coercion
## Warning in xy.coords(x, y, xlabel, ylabel, log): NAs introduced by coercion
## Warning in plot.window(...): "horizontal" is not a graphical parameter
## Warning in plot.xy(xy, type, ...): "horizontal" is not a graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "horizontal" is not
## a graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "horizontal" is not
## a graphical parameter
## Warning in box(...): "horizontal" is not a graphical parameter
## Warning in title(...): "horizontal" is not a graphical parameter
# file.choose()
scrap<- read.csv("/Users/mayracampoyramos/Desktop/Analisis de Datos Concentracion/Reto/FORM - Scrap.csv")
# Instalar librerias
# install.packages("dplyr")
library(dplyr)
# install.packages("psych")
library(psych)
#Sacar número de variables:
describeData(scrap,head=1,tail=1)
## n.obs = 251 of which 251 are complete cases. Number of variables = 9 of which all are numeric FALSE
## variable # n.obs type H1
## Referencia* 1 251 3 agosto 2022 (250)
## Fecha* 2 251 3
## Producto* 3 251 3
## Cantidad 4 251 1 1674.002
## Unidad.de.medida* 5 251 3
## Ubicación.de.origen* 6 251 3
## Ubicación.de.desecho* 7 251 3
## Estado* 8 251 3
## Hora* 9 251 3
## T1
## Referencia* SP/08479
## Fecha* 01/08/22
## Producto* [N61506747 TAPA] N61506747. Kit. Tapa.
## Cantidad 1
## Unidad.de.medida* Unidad(es)
## Ubicación.de.origen* SAB/Calidad/Entrega de PT
## Ubicación.de.desecho* Virtual Locations/Scrapped
## Estado* Hecho
## Hora* 13:59:47
#R: Existen 19 variables y 251 registros en la base de datos.
summary(scrap)
## Referencia Fecha Producto Cantidad
## Length:251 Length:251 Length:251 Min. : 0.00
## Class :character Class :character Class :character 1st Qu.: 1.00
## Mode :character Mode :character Mode :character Median : 2.00
## Mean : 13.34
## 3rd Qu.: 7.00
## Max. :1674.00
## Unidad.de.medida Ubicación.de.origen Ubicación.de.desecho Estado
## Length:251 Length:251 Length:251 Length:251
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## Hora
## Length:251
## Class :character
## Mode :character
##
##
##
scrap1<- scrap [-1,]
scrap1 <- subset(scrap1, select = -c ( Referencia, Producto,Unidad.de.medida, Ubicación.de.desecho, Estado, Hora))
summary(scrap1)
## Fecha Cantidad Ubicación.de.origen
## Length:250 Min. : 0.000 Length:250
## Class :character 1st Qu.: 1.000 Class :character
## Mode :character Median : 2.000 Mode :character
## Mean : 6.696
## 3rd Qu.: 7.000
## Max. :96.000
Variable<-c("Fecha", "Cantidad", "Ubicación.de.origen")
Type<-c("cuantitativa continua ", "cuantitativa discreta", "cualitativa")
Measurement <-c("dia", "cantidad generada", "NA")
table<-data.frame(Variable,Type, Measurement)
knitr::kable(table)
| Variable | Type | Measurement |
|---|---|---|
| Fecha | cuantitativa continua | dia |
| Cantidad | cuantitativa discreta | cantidad generada |
| Ubicación.de.origen | cualitativa | NA |
pie(table(scrap1$Ubicación.de.origen))
# install.packages("ggplot2")
library("ggplot2")
library("tidyverse")
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ tibble 3.1.8 ✔ purrr 0.3.4
## ✔ tidyr 1.2.0 ✔ stringr 1.4.1
## ✔ readr 2.1.2 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ ggplot2::%+%() masks psych::%+%()
## ✖ ggplot2::alpha() masks psych::alpha()
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
ggplot(data = scrap1, mapping = aes(Ubicación.de.origen, Cantidad)) + geom_point() + theme_bw()
# file.choose()
merma<- read.csv("/Users/mayracampoyramos/Desktop/Analisis de Datos Concentracion/Reto/FORM - Merma 1.csv")
#Sacar número de variables:
describeData(merma,head=1,tail=1)
## n.obs = 60 of which 60 are complete cases. Number of variables = 3 of which all are numeric FALSE
## variable # n.obs type H1 T1
## Fecha* 1 60 3 11/01/22
## Mes* 2 60 3 ENERO Total general
## Kilos* 3 60 3 5080 185,426
#R: Existen 3 variables y 60 registros en la base de datos.
summary(merma)
## Fecha Mes Kilos
## Length:60 Length:60 Length:60
## Class :character Class :character Class :character
## Mode :character Mode :character Mode :character
merma1<- merma[-c(5,12,19,25,31,36,42,54,59,60),]
merma1$Kilos <- as.integer(merma1$Kilos)
str(merma1)
## 'data.frame': 50 obs. of 3 variables:
## $ Fecha: chr "11/01/22" "11/01/22" "22/01/22" "22/01/22" ...
## $ Mes : chr "ENERO" "ENERO" "ENERO" "ENERO" ...
## $ Kilos: int 5080 3810 2990 2680 3650 4380 3870 3590 3410 3930 ...
Variable<-c("Fecha", "Mes", "Kilos")
Type<-c("cuantitativa continua ", "cualitativa", "cuantitativa discreta")
Measurement <-c("dia", "NA", "cantidad")
table<-data.frame(Variable,Type, Measurement)
knitr::kable(table)
| Variable | Type | Measurement |
|---|---|---|
| Fecha | cuantitativa continua | dia |
| Mes | cualitativa | NA |
| Kilos | cuantitativa discreta | cantidad |
table(merma1$Mes, merma1$Kilos)
##
## 790 810 1040 2130 2480 2680 2830 2950 2980 2990 3050 3140 3290
## ABRIL 0 0 0 0 0 0 0 1 0 0 0 0 0
## AGOSTO 1 1 1 0 1 0 0 0 0 0 0 2 0
## ENERO 0 0 0 0 0 1 0 0 0 1 0 0 0
## FEBRERO 0 0 0 0 0 0 0 0 0 0 0 0 0
## JULIO 0 0 0 1 0 0 0 0 0 0 0 0 0
## JUNIO 0 0 0 0 0 0 0 0 0 0 0 0 0
## MARZO 0 0 0 0 0 0 0 0 1 0 0 0 1
## MAYO 0 0 0 0 0 0 0 0 0 0 0 0 0
## SEPTIEMBRE 0 0 0 0 0 0 1 0 0 0 1 0 0
##
## 3410 3590 3650 3680 3690 3739 3780 3810 3870 3920 3930 3940 3960
## ABRIL 0 0 0 0 1 0 0 0 0 0 0 1 0
## AGOSTO 0 0 0 0 0 0 1 0 0 0 0 0 0
## ENERO 0 0 0 0 0 0 0 1 0 0 0 0 0
## FEBRERO 1 1 1 0 0 0 0 0 1 0 1 0 0
## JULIO 0 0 0 0 0 0 0 0 0 1 0 0 1
## JUNIO 0 0 0 0 0 0 0 0 0 0 0 0 0
## MARZO 0 0 0 0 0 0 0 1 0 0 0 0 0
## MAYO 0 0 0 1 0 0 0 0 0 0 0 0 0
## SEPTIEMBRE 0 0 0 0 0 1 0 0 0 0 0 0 0
##
## 3967 4000 4050 4130 4190 4200 4210 4240 4260 4270 4310 4330 4380
## ABRIL 0 0 1 0 1 0 0 0 0 0 0 0 0
## AGOSTO 0 0 0 0 0 1 1 1 0 1 0 0 0
## ENERO 0 0 0 0 0 0 0 0 0 0 0 0 0
## FEBRERO 0 0 0 0 0 0 0 0 0 0 0 0 1
## JULIO 0 0 0 1 0 0 0 0 0 0 0 0 0
## JUNIO 0 0 0 0 0 0 0 0 1 0 0 1 0
## MARZO 0 1 0 0 1 1 0 0 0 0 0 0 0
## MAYO 0 0 0 0 0 0 0 0 0 0 1 0 0
## SEPTIEMBRE 1 0 0 0 0 0 0 0 0 0 0 0 0
##
## 4510 4680 4770 5010 5080 5230 6140
## ABRIL 0 0 0 0 0 0 0
## AGOSTO 0 0 0 0 0 0 0
## ENERO 0 0 0 0 1 0 0
## FEBRERO 0 0 0 0 0 0 0
## JULIO 0 0 0 0 0 1 0
## JUNIO 0 1 0 1 0 0 0
## MARZO 0 0 0 0 0 0 0
## MAYO 1 0 1 0 0 0 1
## SEPTIEMBRE 0 0 0 0 0 0 0
prop.table(table(merma1$Mes, merma1$Kilos))
##
## 790 810 1040 2130 2480 2680 2830 2950 2980 2990 3050 3140 3290
## ABRIL 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00
## AGOSTO 0.02 0.02 0.02 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.04 0.00
## ENERO 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.02 0.00 0.00 0.00
## FEBRERO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## JULIO 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## JUNIO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## MARZO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.02
## MAYO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## SEPTIEMBRE 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.02 0.00 0.00
##
## 3410 3590 3650 3680 3690 3739 3780 3810 3870 3920 3930 3940 3960
## ABRIL 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00
## AGOSTO 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00
## ENERO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00
## FEBRERO 0.02 0.02 0.02 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.02 0.00 0.00
## JULIO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.02
## JUNIO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## MARZO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00
## MAYO 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## SEPTIEMBRE 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00
##
## 3967 4000 4050 4130 4190 4200 4210 4240 4260 4270 4310 4330 4380
## ABRIL 0.00 0.00 0.02 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## AGOSTO 0.00 0.00 0.00 0.00 0.00 0.02 0.02 0.02 0.00 0.02 0.00 0.00 0.00
## ENERO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## FEBRERO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02
## JULIO 0.00 0.00 0.00 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## JUNIO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00 0.02 0.00
## MARZO 0.00 0.02 0.00 0.00 0.02 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## MAYO 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.02 0.00 0.00
## SEPTIEMBRE 0.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
##
## 4510 4680 4770 5010 5080 5230 6140
## ABRIL 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## AGOSTO 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## ENERO 0.00 0.00 0.00 0.00 0.02 0.00 0.00
## FEBRERO 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## JULIO 0.00 0.00 0.00 0.00 0.00 0.02 0.00
## JUNIO 0.00 0.02 0.00 0.02 0.00 0.00 0.00
## MARZO 0.00 0.00 0.00 0.00 0.00 0.00 0.00
## MAYO 0.02 0.00 0.02 0.00 0.00 0.00 0.02
## SEPTIEMBRE 0.00 0.00 0.00 0.00 0.00 0.00 0.00
# install.packages("ggplot2")
library(ggplot2)
ggplot(data=merma1, mapping = aes(Mes, Kilos)) + geom_point() + theme_bw()
En esta actividad se realizó un análisis a 3 distintas bases de datos del socio formador FORM, base de datos de la producción de cartón, el scrap y la merma. Al resolver esta actividad pude implementar los conocimientos de los módulos que se han visto de la concentración. De la misma manera, es más importante llegar al análisis y poder tener como resultado propuestas o estrategias para crear un bien al socio formador.