ANALISIS DE LA BUSQUEDA DE “HALLOWEEN” A TRAVÉS DEL TIEMPO

Se utilizarán los datos de búsqueda del término “Halloween” en México a partir del año 2004, terminando en el año 2021, obtenidos en la herramienta Google trends a través del siguiente enlace : Halloween trends

library(readr)
Halloween <- read_csv("Halloween.csv")
## Rows: 214 Columns: 1
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## chr (1): Mes
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
View(Halloween)
plot(Halloween)
## Warning in xy.coords(x, y, xlabel, ylabel, log): NAs introducidos por coerción

Halloween.ts <- ts(Halloween, start = c (2004,1), frequency = 12     )

frequency = 12 meses es un anio (un ciclo ) start = inicio enero de 2004

print(Halloween.ts)
##      Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
## 2004   2   2  13   2  13   2   1  13  21  30   5   2
## 2005   2   2   2   1   2   2   1   2  28  26   7   2
## 2006   2   2   2  13   2   2   2   2  21  23   5   2
## 2007   2   2   2   2   2   2   2  13  21  19   7  13
## 2008   2   2   2   2   2   2   2  13  34  22   6   2
## 2009   2  13   2  13  13  13  13  13  28  20   7  17
## 2010  16  13  13  13  13  13  16  13  21  20   8  16
## 2011  16  13  13  13   2   2  13  13  28  24  10  17
## 2012  17  16  13  13  13  13  13  16  37  25  12  16
## 2013  16  13  13   2   2  13  13  16  28  29  14  16
## 2014  13  13   2  13   2   2  13  16   3  35  14  16
## 2015  13   2  13  13  13  13  13  16   5   4  12  16
## 2016  13  13   2   2   2  13  13  16   6  36  10  13
## 2017   2   2   2   2  13  13  13  16   3  32  11  13
## 2018   2   2   2   2   2  13  13  16   5  33  15  16
## 2019  13   2   2  13   2  13  13  16   6  27  10  13
## 2020  13  13   2  13  16  13  13  13   3  31   9  13
## 2021  13  13  13  13   2  13  13  17   7  18
plot(Halloween.ts)

boxplot (Halloween.ts ~ cycle(Halloween.ts))

cycle(Halloween.ts)
##      Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
## 2004   1   2   3   4   5   6   7   8   9  10  11  12
## 2005   1   2   3   4   5   6   7   8   9  10  11  12
## 2006   1   2   3   4   5   6   7   8   9  10  11  12
## 2007   1   2   3   4   5   6   7   8   9  10  11  12
## 2008   1   2   3   4   5   6   7   8   9  10  11  12
## 2009   1   2   3   4   5   6   7   8   9  10  11  12
## 2010   1   2   3   4   5   6   7   8   9  10  11  12
## 2011   1   2   3   4   5   6   7   8   9  10  11  12
## 2012   1   2   3   4   5   6   7   8   9  10  11  12
## 2013   1   2   3   4   5   6   7   8   9  10  11  12
## 2014   1   2   3   4   5   6   7   8   9  10  11  12
## 2015   1   2   3   4   5   6   7   8   9  10  11  12
## 2016   1   2   3   4   5   6   7   8   9  10  11  12
## 2017   1   2   3   4   5   6   7   8   9  10  11  12
## 2018   1   2   3   4   5   6   7   8   9  10  11  12
## 2019   1   2   3   4   5   6   7   8   9  10  11  12
## 2020   1   2   3   4   5   6   7   8   9  10  11  12
## 2021   1   2   3   4   5   6   7   8   9  10
Halloween.ts.desc <- decompose(Halloween.ts)
plot(Halloween.ts.desc, xlab = "Year")

x <- log(Halloween.ts)
dif1.x <- diff(x)
plot(dif1.x)

dif12.dif1.x <- diff(dif1.x, lag=12)
plot(dif12.dif1.x)

y = dif12.dif1.x 
acf(y)

Conclusión

Concluimos que la búsqueda de Halloween es una fenómeno de temporada, que directamente se relaciona a la celebración de dicha festividad, se puede esperar que este tendencia se siga repitiendo en los próximos años.