library(ggplot2)
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.3.3
##
## 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
library(readxl)
## Warning: package 'readxl' was built under R version 4.3.3
library(tidyr)
## Warning: package 'tidyr' was built under R version 4.3.3
VentasUS = read_xlsx("C:\\Users\\HP\\Downloads\\SP_Endeavor_Base1 Papas_VF_CLEANA (1).xlsx")
VentasMex = read_xlsx("C:\\Users\\HP\\Downloads\\SP_Endeavor_Base2Papas_VF_CLEANA (1).xlsx")
apply(is.na(VentasMex), 2, sum)>=1
## Month Region CrujiCos PicanCos SaladoCos BBQCos SalsaCos QuesoCo
## FALSE FALSE TRUE FALSE TRUE TRUE FALSE TRUE
apply(is.na(VentasUS), 2, sum)>=1
## Month Region CrunchyCo SpicyCo SaltCo BBQCo SalsaCo CheeseCo
## FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE
Media_CC= mean(VentasMex$CrujiCos,na.rm=T)
VentasMex$CrujiCos[is.na(VentasMex$CrujiCos)] = Media_CC
Media_SC= mean(VentasMex$SaladoCos,na.rm=T)
VentasMex$SaladoCos[is.na(VentasMex$SaladoCos)] = Media_SC
Media_BC= mean(VentasMex$BBQCos,na.rm=T)
VentasMex$BBQCos[is.na(VentasMex$BBQCos)] = Media_BC
Media_QC= mean(VentasMex$BBQCos,na.rm=T)
VentasMex$QuesoCo[is.na(VentasMex$QuesoCo)] = Media_BC
Media_ChC= mean(VentasUS$CheeseCo,na.rm=T)
VentasUS$CheeseCo[is.na(VentasUS$CheeseCo)] = Media_ChC
## # A tibble: 3 × 7
## Region CruncyCo SpicyCo SaltCo BBQCo SalsaCo CheeseCo
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Region 1 901816 981901 894298 436623 613950 88878.
## 2 Region 2 890841 1063207 863442 430165 587003 65702.
## 3 Region 3 883284 1031777 838803 396945 516861 77910.
## Region Producto_Mas_Vendido_USA
## CruncyCo Region 1 CruncyCo
## SpicyCo Region 2 SpicyCo
## SaltCo Region 3 CruncyCo
## BBQCo Region 1 CruncyCo
## SalsaCo Region 2 CruncyCo
## CheeseCo Region 3 CruncyCo
## Sales_Mex
## # A tibble: 3 × 7
## Region CrujiCos PicanCos SaladoCos BBQCos SalsaCos QuesoCo
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Región 1 93406 111825 60935. 34902. 92529 75383.
## 2 Región 2 83650 118768 60421. 34676. 97443 77585.
## 3 Región 3 96717. 124579 68252 31754 88014 59031.
## Region producto_mas_vendidos_Mex
## CrujiCos Región 1 SaladoCos
## PicanCos Región 2 SaladoCos
## SaladoCos Región 3 SaladoCos
## BBQCos Región 1 CrujiCos
## SalsaCos Región 2 PicanCos
## QuesoCo Región 3 PicanCos
## # A tibble: 1 × 6
## Mes_Mas_Vendido_CrujiCos Mes_Mas_Vendido_PicanCos Mes_Mas_Vendido_SaladoCos
## <chr> <chr> <chr>
## 1 Abril Agosto Julio
## # ℹ 3 more variables: Mes_Mas_Vendido_BBQCos <chr>,
## # Mes_Mas_Vendido_QuesoCo <chr>, Mes_Mas_Vendido_SalsaCos <chr>
## # A tibble: 1 × 6
## Mes_Mas_Vendido_CrunchyCo Mes_Mas_Vendido_SpicyCo Mes_Mas_Vendido_SaltCo
## <chr> <chr> <chr>
## 1 December January April
## # ℹ 3 more variables: Mes_Mas_Vendido_BBQCo <chr>,
## # Mes_Mas_Vendido_SalsaCo <chr>, Mes_Mas_Vendido_CheeseCo <chr>
The sales of CheeseCo and QuesoCo are typically lower in the United States compared to Mexico. This difference can be attributed to cultural preferences, with cheese playing a more central role in Mexican cuisine. Additionally, the Mexican market may have less competition and stronger brand loyalty for products like QuesoCo. Economic factors, such as disposable income levels and price sensitivity, also influence purchasing behavior, with cheese products potentially being more affordable and accessible in Mexico due to lower living costs. Overall, cultural, market, and economic factors contribute to the disparity in sales between the two countries.