getwd()
## [1] "C:/data"
setwd("c:/data")
ls()
## character(0)
library(dplyr)
## 
## 다음의 패키지를 부착합니다: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
rm(list=ls())

set.seed(1)
data(iris)
library(caret)
## 필요한 패키지를 로딩중입니다: ggplot2
## 필요한 패키지를 로딩중입니다: lattice
library(dplyr)


idx<-createDataPartition(iris$Species,p=0.8)
class(idx)
## [1] "list"
idx$Resample1
##   [1]   1   3   4   6   7   8   9  10  12  14  15  18  19  20  21  22  23  24
##  [19]  25  26  27  29  31  32  33  34  35  36  37  38  39  40  41  42  43  45
##  [37]  46  47  48  49  51  52  53  56  57  59  60  61  62  63  64  66  67  68
##  [55]  69  70  72  73  74  75  76  77  78  82  83  84  85  86  87  88  89  90
##  [73]  91  92  93  95  96  97  99 100 101 102 103 105 106 107 109 110 111 112
##  [91] 114 115 116 117 119 120 122 124 125 126 127 128 129 130 131 132 133 134
## [109] 135 136 137 138 139 140 142 143 145 146 147 149
class(idx$Resample1)
## [1] "integer"
glimpse(iris)
## Rows: 150
## Columns: 5
## $ Sepal.Length <dbl> 5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9, 5.4, 4.…
## $ Sepal.Width  <dbl> 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.…
## $ Petal.Length <dbl> 1.4, 1.4, 1.3, 1.5, 1.4, 1.7, 1.4, 1.5, 1.4, 1.5, 1.5, 1.…
## $ Petal.Width  <dbl> 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.…
## $ Species      <fct> setosa, setosa, setosa, setosa, setosa, setosa, setosa, s…
table(iris[idx$Resample1,"Species"])
## 
##     setosa versicolor  virginica 
##         40         40         40
table(iris[-idx$Resample1,"Species"])
## 
##     setosa versicolor  virginica 
##         10         10         10
#랜덤으로 뽑지만 종의 비율도 신경써서 뽑는 우수한 기능

idx<-createDataPartition(iris$Species,p=0.8,list = FALSE)
class(idx)
## [1] "matrix" "array"
iris$Species
##   [1] setosa     setosa     setosa     setosa     setosa     setosa    
##   [7] setosa     setosa     setosa     setosa     setosa     setosa    
##  [13] setosa     setosa     setosa     setosa     setosa     setosa    
##  [19] setosa     setosa     setosa     setosa     setosa     setosa    
##  [25] setosa     setosa     setosa     setosa     setosa     setosa    
##  [31] setosa     setosa     setosa     setosa     setosa     setosa    
##  [37] setosa     setosa     setosa     setosa     setosa     setosa    
##  [43] setosa     setosa     setosa     setosa     setosa     setosa    
##  [49] setosa     setosa     versicolor versicolor versicolor versicolor
##  [55] versicolor versicolor versicolor versicolor versicolor versicolor
##  [61] versicolor versicolor versicolor versicolor versicolor versicolor
##  [67] versicolor versicolor versicolor versicolor versicolor versicolor
##  [73] versicolor versicolor versicolor versicolor versicolor versicolor
##  [79] versicolor versicolor versicolor versicolor versicolor versicolor
##  [85] versicolor versicolor versicolor versicolor versicolor versicolor
##  [91] versicolor versicolor versicolor versicolor versicolor versicolor
##  [97] versicolor versicolor versicolor versicolor virginica  virginica 
## [103] virginica  virginica  virginica  virginica  virginica  virginica 
## [109] virginica  virginica  virginica  virginica  virginica  virginica 
## [115] virginica  virginica  virginica  virginica  virginica  virginica 
## [121] virginica  virginica  virginica  virginica  virginica  virginica 
## [127] virginica  virginica  virginica  virginica  virginica  virginica 
## [133] virginica  virginica  virginica  virginica  virginica  virginica 
## [139] virginica  virginica  virginica  virginica  virginica  virginica 
## [145] virginica  virginica  virginica  virginica  virginica  virginica 
## Levels: setosa versicolor virginica
train<-iris[idx,]
test<-iris[-idx,]
nrow(train)
## [1] 120
nrow(test)
## [1] 30
library(caret)
set.seed(2)
data(iris)
idx<-createDataPartition(iris$Species,p=0.6,list=FALSE)
train<-iris[idx,]
valid_test<-iris[-idx,]
idx2<-createDataPartition(valid_test$Species,p=0.5,list=FALSE)
valid<-valid_test[idx2,]
test<-valid_test[-idx2,]
nrow(train)/nrow(iris)
## [1] 0.6
nrow(valid)/nrow(iris)
## [1] 0.2
nrow(test)/nrow(iris)
## [1] 0.2
library(caret) 
data(iris)
zs_iris<-preProcess(iris,method=c("center","scale")) 
zs_iris
## Created from 150 samples and 5 variables
## 
## Pre-processing:
##   - centered (4)
##   - ignored (1)
##   - scaled (4)
zs_iris_p<-predict(zs_iris,iris)


library(psych)
## 
## 다음의 패키지를 부착합니다: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
describe(zs_iris_p[,1:4]) 
##              vars   n mean sd median trimmed  mad   min  max range  skew
## Sepal.Length    1 150    0  1  -0.05   -0.04 1.25 -1.86 2.48  4.35  0.31
## Sepal.Width     2 150    0  1  -0.13   -0.03 1.02 -2.43 3.08  5.51  0.31
## Petal.Length    3 150    0  1   0.34    0.00 1.05 -1.56 1.78  3.34 -0.27
## Petal.Width     4 150    0  1   0.13   -0.02 1.36 -1.44 1.71  3.15 -0.10
##              kurtosis   se
## Sepal.Length    -0.61 0.08
## Sepal.Width      0.14 0.08
## Petal.Length    -1.42 0.08
## Petal.Width     -1.36 0.08
#표준편차1 평균0의 표준화 거친 데이터 표준정규분포로 변환

library(caret) 
data(iris)
sca_iris<-preProcess(iris,method="range")
sca_iris
## Created from 150 samples and 5 variables
## 
## Pre-processing:
##   - ignored (1)
##   - re-scaling to [0, 1] (4)
sca_iris_p<-predict(sca_iris,iris) 
head(sca_iris_p)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1   0.22222222   0.6250000   0.06779661  0.04166667  setosa
## 2   0.16666667   0.4166667   0.06779661  0.04166667  setosa
## 3   0.11111111   0.5000000   0.05084746  0.04166667  setosa
## 4   0.08333333   0.4583333   0.08474576  0.04166667  setosa
## 5   0.19444444   0.6666667   0.06779661  0.04166667  setosa
## 6   0.30555556   0.7916667   0.11864407  0.12500000  setosa
library(psych)
describe(sca_iris_p)
##              vars   n mean   sd median trimmed  mad min max range  skew
## Sepal.Length    1 150 0.43 0.23   0.42    0.42 0.29   0   1     1  0.31
## Sepal.Width     2 150 0.44 0.18   0.42    0.43 0.19   0   1     1  0.31
## Petal.Length    3 150 0.47 0.30   0.57    0.47 0.31   0   1     1 -0.27
## Petal.Width     4 150 0.46 0.32   0.50    0.45 0.43   0   1     1 -0.10
## Species*        5 150 2.00 0.82   2.00    2.00 1.48   1   3     2  0.00
##              kurtosis   se
## Sepal.Length    -0.61 0.02
## Sepal.Width      0.14 0.01
## Petal.Length    -1.42 0.02
## Petal.Width     -1.36 0.03
## Species*        -1.52 0.07
#boxcox
library(caret) 
data(iris)
bc_iris = preProcess(iris, method = "BoxCox") 
bc_iris
## Created from 150 samples and 5 variables
## 
## Pre-processing:
##   - Box-Cox transformation (4)
##   - ignored (1)
## 
## Lambda estimates for Box-Cox transformation:
## -0.1, 0.3, 0.9, 0.6
bc_iris_t = predict(bc_iris, iris) 
head(bc_iris_t)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1     1.629241    1.520660          1.4  -1.0321154  setosa
## 2     1.589235    1.301297          1.4  -1.0321154  setosa
## 3     1.547563    1.391905          1.3  -1.0321154  setosa
## 4     1.526056    1.347113          1.5  -1.0321154  setosa
## 5     1.609438    1.561856          1.4  -1.0321154  setosa
## 6     1.686399    1.680826          1.7  -0.7048667  setosa
par(mfrow=c(1,2))
plot(density(x=iris$Sepal.Width)) 
plot(density(x=bc_iris_t$Sepal.Width))

#pca 주성분 분석 전처리
library(caret) 
data(iris)
pca_iris<-preProcess(iris,method="pca") 
pca_iris
## Created from 150 samples and 5 variables
## 
## Pre-processing:
##   - centered (4)
##   - ignored (1)
##   - principal component signal extraction (4)
##   - scaled (4)
## 
## PCA needed 2 components to capture 95 percent of the variance
pca_iris_p<-predict(pca_iris,iris) 
head(pca_iris_p)
##   Species       PC1        PC2
## 1  setosa -2.257141 -0.4784238
## 2  setosa -2.074013  0.6718827
## 3  setosa -2.356335  0.3407664
## 4  setosa -2.291707  0.5953999
## 5  setosa -2.381863 -0.6446757
## 6  setosa -2.068701 -1.4842053
#더미변수생성
library(earth)
## 필요한 패키지를 로딩중입니다: Formula
## 필요한 패키지를 로딩중입니다: plotmo
## 필요한 패키지를 로딩중입니다: plotrix
## 
## 다음의 패키지를 부착합니다: 'plotrix'
## The following object is masked from 'package:psych':
## 
##     rescale
## 필요한 패키지를 로딩중입니다: TeachingDemos
data(etitanic) 
library(dplyr) 
glimpse(etitanic)
## Rows: 1,046
## Columns: 6
## $ pclass   <fct> 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1st, 1…
## $ survived <int> 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1…
## $ sex      <fct> female, male, female, male, female, male, female, male, femal…
## $ age      <dbl> 29.0000, 0.9167, 2.0000, 30.0000, 25.0000, 48.0000, 63.0000, …
## $ sibsp    <int> 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1…
## $ parch    <int> 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1…
dummies <- dummyVars(survived ~ ., data = etitanic) 
dummies
## Dummy Variable Object
## 
## Formula: survived ~ .
## 6 variables, 2 factors
## Variables and levels will be separated by '.'
## A less than full rank encoding is used
head(predict(dummies, newdata = etitanic))
##   pclass.1st pclass.2nd pclass.3rd sex.female sex.male     age sibsp parch
## 1          1          0          0          1        0 29.0000     0     0
## 2          1          0          0          0        1  0.9167     1     2
## 3          1          0          0          1        0  2.0000     1     2
## 4          1          0          0          0        1 30.0000     1     2
## 5          1          0          0          1        0 25.0000     1     2
## 6          1          0          0          0        1 48.0000     0     0
#결측값 다루는 법
data(airquality)
colSums(is.na(airquality))
##   Ozone Solar.R    Wind    Temp   Month     Day 
##      37       7       0       0       0       0
#위 결측값 확인하는 것
#아래 결측값 처리하는 방법
library(RANN)
knn_im<-preProcess(airquality[1:4],method="knnImpute") 
head(predict(knn_im,airquality))
##         Ozone     Solar.R       Wind       Temp Month Day
## 1 -0.03423409  0.04517615 -0.7259482 -1.1497140     5   1
## 2 -0.18580489 -0.75430487 -0.5556388 -0.6214670     5   2
## 3 -0.91334473 -0.41008388  0.7500660 -0.4101682     5   3
## 4 -0.73145977  1.41095624  0.4378323 -1.6779609     5   4
## 5 -0.69508278 -0.92308420  1.2326091 -2.3118573     5   5
## 6 -0.42831817 -0.28349938  1.4029185 -1.2553634     5   6
knn_im_p<-predict(knn_im,airquality)
colSums(is.na(knn_im_p))
##   Ozone Solar.R    Wind    Temp   Month     Day 
##       0       0       0       0       0       0
describe(knn_im_p)
##         vars   n  mean   sd median trimmed   mad   min   max range  skew
## Ozone      1 153 -0.04 0.92  -0.31   -0.16  0.72 -1.25  3.82  5.06  1.30
## Solar.R    2 153 -0.01 0.99   0.17    0.03  1.05 -1.99  1.64  3.63 -0.39
## Wind       3 153  0.00 1.00  -0.07   -0.02  0.97 -2.34  3.05  5.39  0.34
## Temp       4 153  0.00 1.00   0.12    0.04  0.94 -2.31  2.02  4.33 -0.37
## Month      5 153  6.99 1.42   7.00    6.99  1.48  5.00  9.00  4.00  0.00
## Day        6 153 15.80 8.86  16.00   15.80 11.86  1.00 31.00 30.00  0.00
##         kurtosis   se
## Ozone       1.62 0.07
## Solar.R    -0.99 0.08
## Wind        0.03 0.08
## Temp       -0.46 0.08
## Month      -1.32 0.11
## Day        -1.22 0.72
#중앙값으로 결측치를 대체하는 방법
median_im<-preProcess(airquality[1:4],method="medianImpute")
head(predict(median_im,airquality))
##   Ozone Solar.R Wind Temp Month Day
## 1  41.0     190  7.4   67     5   1
## 2  36.0     118  8.0   72     5   2
## 3  12.0     149 12.6   74     5   3
## 4  18.0     313 11.5   62     5   4
## 5  31.5     205 14.3   56     5   5
## 6  28.0     205 14.9   66     5   6
#caret에서 산점도 그리는 법 ggplot2와 동일 하지만 시각화는 ggplot2가 더 좋음
library(mlbench)
data(BostonHousing)
glimpse(BostonHousing)
## Rows: 506
## Columns: 14
## $ crim    <dbl> 0.00632, 0.02731, 0.02729, 0.03237, 0.06905, 0.02985, 0.08829,…
## $ zn      <dbl> 18.0, 0.0, 0.0, 0.0, 0.0, 0.0, 12.5, 12.5, 12.5, 12.5, 12.5, 1…
## $ indus   <dbl> 2.31, 7.07, 7.07, 2.18, 2.18, 2.18, 7.87, 7.87, 7.87, 7.87, 7.…
## $ chas    <fct> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ nox     <dbl> 0.538, 0.469, 0.469, 0.458, 0.458, 0.458, 0.524, 0.524, 0.524,…
## $ rm      <dbl> 6.575, 6.421, 7.185, 6.998, 7.147, 6.430, 6.012, 6.172, 5.631,…
## $ age     <dbl> 65.2, 78.9, 61.1, 45.8, 54.2, 58.7, 66.6, 96.1, 100.0, 85.9, 9…
## $ dis     <dbl> 4.0900, 4.9671, 4.9671, 6.0622, 6.0622, 6.0622, 5.5605, 5.9505…
## $ rad     <dbl> 1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,…
## $ tax     <dbl> 296, 242, 242, 222, 222, 222, 311, 311, 311, 311, 311, 311, 31…
## $ ptratio <dbl> 15.3, 17.8, 17.8, 18.7, 18.7, 18.7, 15.2, 15.2, 15.2, 15.2, 15…
## $ b       <dbl> 396.90, 396.90, 392.83, 394.63, 396.90, 394.12, 395.60, 396.90…
## $ lstat   <dbl> 4.98, 9.14, 4.03, 2.94, 5.33, 5.21, 12.43, 19.15, 29.93, 17.10…
## $ medv    <dbl> 24.0, 21.6, 34.7, 33.4, 36.2, 28.7, 22.9, 27.1, 16.5, 18.9, 15…
x=BostonHousing[,c("age", "lstat", "tax")] 
y=BostonHousing$medv
featurePlot(x,y = BostonHousing$medv,plot = "scatter",layout = c(3, 1))

library(mlbench) 
library(caret) 
library(dplyr)
data(PimaIndiansDiabetes)
glimpse(PimaIndiansDiabetes)
## Rows: 768
## Columns: 9
## $ pregnant <dbl> 6, 1, 8, 1, 0, 5, 3, 10, 2, 8, 4, 10, 10, 1, 5, 7, 0, 7, 1, 1…
## $ glucose  <dbl> 148, 85, 183, 89, 137, 116, 78, 115, 197, 125, 110, 168, 139,…
## $ pressure <dbl> 72, 66, 64, 66, 40, 74, 50, 0, 70, 96, 92, 74, 80, 60, 72, 0,…
## $ triceps  <dbl> 35, 29, 0, 23, 35, 0, 32, 0, 45, 0, 0, 0, 0, 23, 19, 0, 47, 0…
## $ insulin  <dbl> 0, 0, 0, 94, 168, 0, 88, 0, 543, 0, 0, 0, 0, 846, 175, 0, 230…
## $ mass     <dbl> 33.6, 26.6, 23.3, 28.1, 43.1, 25.6, 31.0, 35.3, 30.5, 0.0, 37…
## $ pedigree <dbl> 0.627, 0.351, 0.672, 0.167, 2.288, 0.201, 0.248, 0.134, 0.158…
## $ age      <dbl> 50, 31, 32, 21, 33, 30, 26, 29, 53, 54, 30, 34, 57, 59, 51, 3…
## $ diabetes <fct> pos, neg, pos, neg, pos, neg, pos, neg, pos, pos, neg, pos, n…
PimaIndiansDiabetes %>% count(diabetes)
##   diabetes   n
## 1      neg 500
## 2      pos 268
library(randomForest)
## randomForest 4.7-1.1
## Type rfNews() to see new features/changes/bug fixes.
## 
## 다음의 패키지를 부착합니다: 'randomForest'
## The following object is masked from 'package:psych':
## 
##     outlier
## The following object is masked from 'package:ggplot2':
## 
##     margin
## The following object is masked from 'package:dplyr':
## 
##     combine
#데이터 분할하는 방법 도 가능
control <- trainControl(method="repeatedcv", number=5)
#전처리(표준화)해서 10-fold 방식, "knn" 트레이닝(학습)시키고 model에 넣는 것
model <- train(diabetes~., data=PimaIndiansDiabetes, method="rf",preProcess=c("center","scale"),trControl=control)
model
## Random Forest 
## 
## 768 samples
##   8 predictor
##   2 classes: 'neg', 'pos' 
## 
## Pre-processing: centered (8), scaled (8) 
## Resampling: Cross-Validated (5 fold, repeated 1 times) 
## Summary of sample sizes: 615, 614, 614, 615, 614 
## Resampling results across tuning parameters:
## 
##   mtry  Accuracy   Kappa    
##   2     0.7694848  0.4809709
##   5     0.7577710  0.4552707
##   8     0.7538664  0.4471454
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
control <- trainControl(method="repeatedcv", number=5)
model1 <- train(diabetes~., data=PimaIndiansDiabetes, method="knn",preProcess=c("center","scale"),trControl=control)
model1
## k-Nearest Neighbors 
## 
## 768 samples
##   8 predictor
##   2 classes: 'neg', 'pos' 
## 
## Pre-processing: centered (8), scaled (8) 
## Resampling: Cross-Validated (5 fold, repeated 1 times) 
## Summary of sample sizes: 615, 615, 614, 614, 614 
## Resampling results across tuning parameters:
## 
##   k  Accuracy   Kappa    
##   5  0.7291147  0.3818076
##   7  0.7448010  0.4207935
##   9  0.7422205  0.4098283
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was k = 7.
importance <- varImp(model, scale=FALSE) 
print(importance)
## rf variable importance
## 
##          Overall
## glucose    91.28
## mass       57.41
## age        46.74
## pedigree   42.62
## pressure   31.33
## pregnant   29.25
## insulin    24.83
## triceps    23.59
plot(importance)

#위 과정은 타깃변수에 대해 독립변수의 영향력 순위를 알아보는 것


library(caret)
library(mlbench) 
data(Sonar) 
set.seed(200)
inTraining<- createDataPartition(y = Sonar$Class,p = .65, list = FALSE) 
training <- Sonar[ inTraining,]
testing <- Sonar[-inTraining,]
nrow(training)
## [1] 137
nrow(testing)
## [1] 71
#데이터를 나누었고

rffit<-train(Class ~ .,data = training,ethod = "rf",preProc = c("center", "scale"))
rffit
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## Pre-processing: centered (60), scaled (60) 
## Resampling: Bootstrapped (25 reps) 
## Summary of sample sizes: 137, 137, 137, 137, 137, 137, ... 
## Resampling results across tuning parameters:
## 
##   mtry  Accuracy   Kappa    
##    2    0.7738093  0.5438175
##   31    0.7806531  0.5573821
##   60    0.7659402  0.5288224
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 31.
#rf방식으로 모델학습 알고리즘

rffit1<-train(Class ~ .,data = training,ethod = "knn",preProc = c("center", "scale"))
rffit1
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## Pre-processing: centered (60), scaled (60) 
## Resampling: Bootstrapped (25 reps) 
## Summary of sample sizes: 137, 137, 137, 137, 137, 137, ... 
## Resampling results across tuning parameters:
## 
##   mtry  Accuracy   Kappa    
##    2    0.7750673  0.5421357
##   31    0.7680493  0.5271761
##   60    0.7429855  0.4772316
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
#knn방식으로 모델학습 알고리즘

rffit2<-train(Class ~ .,data = training,ethod = "rpart",preProc = c("center", "scale"))
rffit2
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## Pre-processing: centered (60), scaled (60) 
## Resampling: Bootstrapped (25 reps) 
## Summary of sample sizes: 137, 137, 137, 137, 137, 137, ... 
## Resampling results across tuning parameters:
## 
##   mtry  Accuracy   Kappa    
##    2    0.7924689  0.5805473
##   31    0.7643466  0.5248490
##   60    0.7597988  0.5150028
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
#rpart방식으로 모델학습 알고리즘



fitControl <- trainControl(method = "cv",number = 5,classProbs = TRUE,summaryFunction = twoClassSummary)
set.seed(825)
rmfit1<-train(Class ~ ., data = training,method = "rf",trControl = fitControl,verbose = FALSE,metric = "ROC")
rmfit1
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## No pre-processing
## Resampling: Cross-Validated (5 fold) 
## Summary of sample sizes: 109, 111, 109, 110, 109 
## Resampling results across tuning parameters:
## 
##   mtry  ROC        Sens       Spec     
##    2    0.9196703  0.8628571  0.7179487
##   31    0.8879121  0.8619048  0.6884615
##   60    0.8529029  0.7942857  0.6884615
## 
## ROC was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
set.seed(825)
customGrid <- expand.grid(mtry = 1:10)
rffit2<-train(Class ~ .,data = training,method = "rf",trControl=fitControl,tuneGrid=customGrid,metric="ROC")
rffit2
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## No pre-processing
## Resampling: Cross-Validated (5 fold) 
## Summary of sample sizes: 109, 111, 109, 110, 109 
## Resampling results across tuning parameters:
## 
##   mtry  ROC        Sens       Spec     
##    1    0.9161355  0.8628571  0.7179487
##    2    0.9153480  0.8628571  0.6717949
##    3    0.9156777  0.8761905  0.7025641
##    4    0.9155311  0.8628571  0.7333333
##    5    0.9161172  0.8628571  0.7333333
##    6    0.9100183  0.8485714  0.6871795
##    7    0.9164652  0.8619048  0.7333333
##    8    0.9102930  0.8628571  0.7179487
##    9    0.9138919  0.9028571  0.7179487
##   10    0.9066484  0.8619048  0.7333333
## 
## ROC was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 7.
fitControl <- trainControl(method = "repeatedcv", number = 10,classProbs = TRUE,summaryFunction = twoClassSummary)
rffit4<-train(Class~.,data=training,method="rf",trControl=fitControl,tuneLength=20,metric="ROC")
rffit4
## Random Forest 
## 
## 137 samples
##  60 predictor
##   2 classes: 'M', 'R' 
## 
## No pre-processing
## Resampling: Cross-Validated (10 fold, repeated 1 times) 
## Summary of sample sizes: 124, 122, 124, 123, 123, 123, ... 
## Resampling results across tuning parameters:
## 
##   mtry  ROC        Sens       Spec     
##    2    0.8908588  0.8500000  0.7190476
##    5    0.8904337  0.8375000  0.7214286
##    8    0.8821429  0.8375000  0.7357143
##   11    0.8826531  0.8517857  0.7357143
##   14    0.8761480  0.8517857  0.7190476
##   17    0.8693878  0.8392857  0.7190476
##   20    0.8813138  0.8517857  0.7357143
##   23    0.8733631  0.8267857  0.7023810
##   26    0.8673044  0.8267857  0.7190476
##   29    0.8757228  0.8125000  0.7190476
##   32    0.8638605  0.8392857  0.7190476
##   35    0.8643282  0.8392857  0.7190476
##   38    0.8631378  0.8267857  0.7190476
##   41    0.8535714  0.7982143  0.7357143
##   44    0.8461310  0.8142857  0.7333333
##   47    0.8613946  0.8267857  0.7190476
##   50    0.8610757  0.8267857  0.7190476
##   53    0.8596301  0.8267857  0.7357143
##   56    0.8658588  0.8267857  0.7023810
##   60    0.8585884  0.8125000  0.7190476
## 
## ROC was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 2.
library(lubridate)
## 
## 다음의 패키지를 부착합니다: 'lubridate'
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library(nycflights13)
library(dplyr)
data("flights")
glimpse(flights)
## Rows: 336,776
## Columns: 19
## $ year           <int> 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2…
## $ month          <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ day            <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ dep_time       <int> 517, 533, 542, 544, 554, 554, 555, 557, 557, 558, 558, …
## $ sched_dep_time <int> 515, 529, 540, 545, 600, 558, 600, 600, 600, 600, 600, …
## $ dep_delay      <dbl> 2, 4, 2, -1, -6, -4, -5, -3, -3, -2, -2, -2, -2, -2, -1…
## $ arr_time       <int> 830, 850, 923, 1004, 812, 740, 913, 709, 838, 753, 849,…
## $ sched_arr_time <int> 819, 830, 850, 1022, 837, 728, 854, 723, 846, 745, 851,…
## $ arr_delay      <dbl> 11, 20, 33, -18, -25, 12, 19, -14, -8, 8, -2, -3, 7, -1…
## $ carrier        <chr> "UA", "UA", "AA", "B6", "DL", "UA", "B6", "EV", "B6", "…
## $ flight         <int> 1545, 1714, 1141, 725, 461, 1696, 507, 5708, 79, 301, 4…
## $ tailnum        <chr> "N14228", "N24211", "N619AA", "N804JB", "N668DN", "N394…
## $ origin         <chr> "EWR", "LGA", "JFK", "JFK", "LGA", "EWR", "EWR", "LGA",…
## $ dest           <chr> "IAH", "IAH", "MIA", "BQN", "ATL", "ORD", "FLL", "IAD",…
## $ air_time       <dbl> 227, 227, 160, 183, 116, 150, 158, 53, 140, 138, 149, 1…
## $ distance       <dbl> 1400, 1416, 1089, 1576, 762, 719, 1065, 229, 944, 733, …
## $ hour           <dbl> 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6…
## $ minute         <dbl> 15, 29, 40, 45, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0…
## $ time_hour      <dttm> 2013-01-01 05:00:00, 2013-01-01 05:00:00, 2013-01-01 0…
today()
## [1] "2024-01-31"
now()
## [1] "2024-01-31 17:11:04 KST"
ymd("20230131")
## [1] "2023-01-31"
mdy("2023-01-31")
## Warning: All formats failed to parse. No formats found.
## [1] NA
as.Date("2023-12-31")
## [1] "2023-12-31"
ymd_hms("2017-01-31 20:11:59")
## [1] "2017-01-31 20:11:59 UTC"
library(dplyr)
library(nycflights13) 
data("flights") 
glimpse(flights) 
## Rows: 336,776
## Columns: 19
## $ year           <int> 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2…
## $ month          <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ day            <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1…
## $ dep_time       <int> 517, 533, 542, 544, 554, 554, 555, 557, 557, 558, 558, …
## $ sched_dep_time <int> 515, 529, 540, 545, 600, 558, 600, 600, 600, 600, 600, …
## $ dep_delay      <dbl> 2, 4, 2, -1, -6, -4, -5, -3, -3, -2, -2, -2, -2, -2, -1…
## $ arr_time       <int> 830, 850, 923, 1004, 812, 740, 913, 709, 838, 753, 849,…
## $ sched_arr_time <int> 819, 830, 850, 1022, 837, 728, 854, 723, 846, 745, 851,…
## $ arr_delay      <dbl> 11, 20, 33, -18, -25, 12, 19, -14, -8, 8, -2, -3, 7, -1…
## $ carrier        <chr> "UA", "UA", "AA", "B6", "DL", "UA", "B6", "EV", "B6", "…
## $ flight         <int> 1545, 1714, 1141, 725, 461, 1696, 507, 5708, 79, 301, 4…
## $ tailnum        <chr> "N14228", "N24211", "N619AA", "N804JB", "N668DN", "N394…
## $ origin         <chr> "EWR", "LGA", "JFK", "JFK", "LGA", "EWR", "EWR", "LGA",…
## $ dest           <chr> "IAH", "IAH", "MIA", "BQN", "ATL", "ORD", "FLL", "IAD",…
## $ air_time       <dbl> 227, 227, 160, 183, 116, 150, 158, 53, 140, 138, 149, 1…
## $ distance       <dbl> 1400, 1416, 1089, 1576, 762, 719, 1065, 229, 944, 733, …
## $ hour           <dbl> 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6…
## $ minute         <dbl> 15, 29, 40, 45, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0…
## $ time_hour      <dttm> 2013-01-01 05:00:00, 2013-01-01 05:00:00, 2013-01-01 0…
flights %>%select(year, month, day, hour, minute)
## # A tibble: 336,776 × 5
##     year month   day  hour minute
##    <int> <int> <int> <dbl>  <dbl>
##  1  2013     1     1     5     15
##  2  2013     1     1     5     29
##  3  2013     1     1     5     40
##  4  2013     1     1     5     45
##  5  2013     1     1     6      0
##  6  2013     1     1     5     58
##  7  2013     1     1     6      0
##  8  2013     1     1     6      0
##  9  2013     1     1     6      0
## 10  2013     1     1     6      0
## # ℹ 336,766 more rows
flights %>% select(year, month, day, hour, minute) %>% mutate(departure = make_datetime(year, month, day, hour, minute))
## # A tibble: 336,776 × 6
##     year month   day  hour minute departure          
##    <int> <int> <int> <dbl>  <dbl> <dttm>             
##  1  2013     1     1     5     15 2013-01-01 05:15:00
##  2  2013     1     1     5     29 2013-01-01 05:29:00
##  3  2013     1     1     5     40 2013-01-01 05:40:00
##  4  2013     1     1     5     45 2013-01-01 05:45:00
##  5  2013     1     1     6      0 2013-01-01 06:00:00
##  6  2013     1     1     5     58 2013-01-01 05:58:00
##  7  2013     1     1     6      0 2013-01-01 06:00:00
##  8  2013     1     1     6      0 2013-01-01 06:00:00
##  9  2013     1     1     6      0 2013-01-01 06:00:00
## 10  2013     1     1     6      0 2013-01-01 06:00:00
## # ℹ 336,766 more rows
make_datetime_100 <- function(year, month, day, time) {make_datetime(year, month, day, time %/% 100, time %% 100)}
make_datetime_100
## function(year, month, day, time) {make_datetime(year, month, day, time %/% 100, time %% 100)}
flights %>% filter(!is.na(dep_time)|!is.na(arr_time)) %>% mutate(dep_time = make_datetime_100(year, month, day, dep_time),arr_time = make_datetime_100(year, month, day, arr_time),sched_dep_time = make_datetime_100(year, month, day, sched_dep_time),sched_arr_time = make_datetime_100(year, month, day, sched_arr_time))%>%select(origin, dest, ends_with("delay"), ends_with("time"))
## # A tibble: 328,521 × 9
##    origin dest  dep_delay arr_delay dep_time            sched_dep_time     
##    <chr>  <chr>     <dbl>     <dbl> <dttm>              <dttm>             
##  1 EWR    IAH           2        11 2013-01-01 05:17:00 2013-01-01 05:15:00
##  2 LGA    IAH           4        20 2013-01-01 05:33:00 2013-01-01 05:29:00
##  3 JFK    MIA           2        33 2013-01-01 05:42:00 2013-01-01 05:40:00
##  4 JFK    BQN          -1       -18 2013-01-01 05:44:00 2013-01-01 05:45:00
##  5 LGA    ATL          -6       -25 2013-01-01 05:54:00 2013-01-01 06:00:00
##  6 EWR    ORD          -4        12 2013-01-01 05:54:00 2013-01-01 05:58:00
##  7 EWR    FLL          -5        19 2013-01-01 05:55:00 2013-01-01 06:00:00
##  8 LGA    IAD          -3       -14 2013-01-01 05:57:00 2013-01-01 06:00:00
##  9 JFK    MCO          -3        -8 2013-01-01 05:57:00 2013-01-01 06:00:00
## 10 LGA    ORD          -2         8 2013-01-01 05:58:00 2013-01-01 06:00:00
## # ℹ 328,511 more rows
## # ℹ 3 more variables: arr_time <dttm>, sched_arr_time <dttm>, air_time <dbl>
datetime <- ymd_hms("2023-01-31 10:30:20") 
year(datetime)
## [1] 2023
month(datetime) 
## [1] 1
mday(datetime) 
## [1] 31
yday(datetime) 
## [1] 31
wday(datetime) 
## [1] 3
library(ggplot2)
data("economics")
glimpse(economics)
## Rows: 574
## Columns: 6
## $ date     <date> 1967-07-01, 1967-08-01, 1967-09-01, 1967-10-01, 1967-11-01, …
## $ pce      <dbl> 506.7, 509.8, 515.6, 512.2, 517.4, 525.1, 530.9, 533.6, 544.3…
## $ pop      <dbl> 198712, 198911, 199113, 199311, 199498, 199657, 199808, 19992…
## $ psavert  <dbl> 12.6, 12.6, 11.9, 12.9, 12.8, 11.8, 11.7, 12.3, 11.7, 12.3, 1…
## $ uempmed  <dbl> 4.5, 4.7, 4.6, 4.9, 4.7, 4.8, 5.1, 4.5, 4.1, 4.6, 4.4, 4.4, 4…
## $ unemploy <dbl> 2944, 2945, 2958, 3143, 3066, 3018, 2878, 3001, 2877, 2709, 2…
economics$year<-year(economics$date)
economics$month<-month(economics$date)
economics$day<-day(economics$date)
#연도만, 월만, 날짜만 떼어서 따로 만듬
economics %>% group_by(year) %>% summarise(m=mean(pop))
## # A tibble: 49 × 2
##     year       m
##    <dbl>   <dbl>
##  1  1967 199200.
##  2  1968 200664.
##  3  1969 202649.
##  4  1970 204982.
##  5  1971 207589.
##  6  1972 209838.
##  7  1973 211857.
##  8  1974 213815.
##  9  1975 215891.
## 10  1976 217999.
## # ℹ 39 more rows
#연도별로 뽑아서 그룹바이로 기초통계 가능해짐 루브리데이트에 강점

df<-read.csv("netflix.csv")
df %>% glimpse()
## Rows: 8,807
## Columns: 11
## $ show_id      <chr> "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s1…
## $ type         <chr> "Movie", "TV Show", "TV Show", "TV Show", "TV Show", "TV …
## $ title        <chr> "Dick Johnson Is Dead", "Blood & Water", "Ganglands", "Ja…
## $ director     <chr> "Kirsten Johnson", "", "Julien Leclercq", "", "", "Mike F…
## $ cast         <chr> "", "Ama Qamata, Khosi Ngema, Gail Mabalane, Thabang Mola…
## $ country      <chr> "United States", "South Africa", "", "", "India", "", "",…
## $ date_added   <chr> "25-Sep-21", "24-Sep-21", "24-Sep-21", "24-Sep-21", "24-S…
## $ release_year <int> 2020, 2021, 2021, 2021, 2021, 2021, 2021, 1993, 2021, 202…
## $ rating       <chr> "PG-13", "TV-MA", "TV-MA", "TV-MA", "TV-MA", "TV-MA", "PG…
## $ duration     <chr> "90 min", "2 Seasons", "1 Season", "1 Season", "2 Seasons…
## $ listed_in    <chr> "Documentaries", "International TV Shows, TV Dramas, TV M…
glimpse(df)
## Rows: 8,807
## Columns: 11
## $ show_id      <chr> "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s1…
## $ type         <chr> "Movie", "TV Show", "TV Show", "TV Show", "TV Show", "TV …
## $ title        <chr> "Dick Johnson Is Dead", "Blood & Water", "Ganglands", "Ja…
## $ director     <chr> "Kirsten Johnson", "", "Julien Leclercq", "", "", "Mike F…
## $ cast         <chr> "", "Ama Qamata, Khosi Ngema, Gail Mabalane, Thabang Mola…
## $ country      <chr> "United States", "South Africa", "", "", "India", "", "",…
## $ date_added   <chr> "25-Sep-21", "24-Sep-21", "24-Sep-21", "24-Sep-21", "24-S…
## $ release_year <int> 2020, 2021, 2021, 2021, 2021, 2021, 2021, 1993, 2021, 202…
## $ rating       <chr> "PG-13", "TV-MA", "TV-MA", "TV-MA", "TV-MA", "TV-MA", "PG…
## $ duration     <chr> "90 min", "2 Seasons", "1 Season", "1 Season", "2 Seasons…
## $ listed_in    <chr> "Documentaries", "International TV Shows, TV Dramas, TV M…
df %>% count(date_added)
##               date_added   n
## 1                         10
## 2         April 15, 2018   1
## 3         April 16, 2019   1
## 4         April 17, 2016   1
## 5         April 20, 2017   1
## 6          April 4, 2017   1
## 7         August 1, 2017   1
## 8        August 13, 2018   1
## 9        August 21, 2017   1
## 10        August 4, 2017   3
## 11      December 1, 2018   1
## 12      December 1, 2019   2
## 13     December 14, 2018   2
## 14     December 15, 2015   1
## 15     December 15, 2017   2
## 16     December 15, 2018   1
## 17     December 18, 2014   1
## 18      December 2, 2017   1
## 19     December 23, 2018   1
## 20     December 25, 2015   1
## 21     December 28, 2016   1
## 22      December 3, 2019   1
## 23     December 31, 2015   1
## 24      February 1, 2015   1
## 25      February 1, 2017   1
## 26      February 1, 2019   3
## 27     February 24, 2018   1
## 28       January 1, 2016   1
## 29       January 1, 2018   3
## 30       January 1, 2020   1
## 31      January 11, 2019   1
## 32      January 12, 2019   1
## 33      January 13, 2016   1
## 34      January 17, 2018   1
## 35      January 28, 2018   1
## 36       January 8, 2018   1
## 37          July 1, 2017   4
## 38         July 12, 2019   1
## 39         July 20, 2018   2
## 40         July 26, 2019   1
## 41          June 1, 2017   2
## 42          June 1, 2018   1
## 43         June 30, 2015   1
## 44         March 1, 2017   1
## 45        March 15, 2019   1
## 46        March 16, 2016   1
## 47        March 20, 2018   1
## 48        March 22, 2015   1
## 49        March 31, 2017   1
## 50        March 31, 2018   2
## 51           May 1, 2018   1
## 52          May 18, 2017   1
## 53          May 19, 2018   1
## 54          May 26, 2016   1
## 55          May 28, 2016   1
## 56          May 31, 2015   1
## 57      November 1, 2016   2
## 58      November 1, 2017   3
## 59      November 1, 2019   2
## 60      November 3, 2015   1
## 61       October 1, 2019   2
## 62      October 31, 2018   1
## 63       October 5, 2017   1
## 64       October 8, 2013   1
## 65     September 1, 2019   1
## 66    September 16, 2018   1
## 67    September 22, 2016   1
## 68     September 7, 2016   1
## 69     September 8, 2015   1
## 70             01-Apr-14   1
## 71             01-Apr-16   7
## 72             01-Apr-17  27
## 73             01-Apr-18  44
## 74             01-Apr-19  28
## 75             01-Apr-20  43
## 76             01-Apr-21  32
## 77             01-Aug-16  14
## 78             01-Aug-17  39
## 79             01-Aug-18  37
## 80             01-Aug-19  26
## 81             01-Aug-20  21
## 82             01-Aug-21  38
## 83             01-Dec-12   1
## 84             01-Dec-15   3
## 85             01-Dec-16  20
## 86             01-Dec-17  26
## 87             01-Dec-18  28
## 88             01-Dec-19  25
## 89             01-Dec-20  28
## 90             01-Feb-14   1
## 91             01-Feb-16   2
## 92             01-Feb-17  18
## 93             01-Feb-18  19
## 94             01-Feb-19  38
## 95             01-Feb-20  15
## 96             01-Feb-21  13
## 97             01-Jan-08   1
## 98             01-Jan-16  32
## 99             01-Jan-17  19
## 100            01-Jan-18  52
## 101            01-Jan-19  37
## 102            01-Jan-20 109
## 103            01-Jan-21  49
## 104            01-Jul-16  12
## 105            01-Jul-17  38
## 106            01-Jul-18  40
## 107            01-Jul-19  52
## 108            01-Jul-20  21
## 109            01-Jul-21  60
## 110            01-Jun-15   1
## 111            01-Jun-16   8
## 112            01-Jun-17  31
## 113            01-Jun-18  12
## 114            01-Jun-19  18
## 115            01-Jun-20  24
## 116            01-Mar-16   4
## 117            01-Mar-17  21
## 118            01-Mar-18  75
## 119            01-Mar-19  30
## 120            01-Mar-20  17
## 121            01-Mar-21  11
## 122            01-May-16   3
## 123            01-May-17  25
## 124            01-May-18  41
## 125            01-May-19  16
## 126            01-May-20  24
## 127            01-May-21  33
## 128            01-Nov-10   1
## 129            01-Nov-13   2
## 130            01-Nov-16  14
## 131            01-Nov-17  30
## 132            01-Nov-18  60
## 133            01-Nov-19  89
## 134            01-Nov-20  33
## 135            01-Oct-11  11
## 136            01-Oct-15   1
## 137            01-Oct-16  23
## 138            01-Oct-17  47
## 139            01-Oct-18  71
## 140            01-Oct-19  60
## 141            01-Oct-20  33
## 142            01-Sep-13   2
## 143            01-Sep-16  20
## 144            01-Sep-17  38
## 145            01-Sep-18  22
## 146            01-Sep-19  30
## 147            01-Sep-20  26
## 148            01-Sep-21  56
## 149            02-Apr-17   2
## 150            02-Apr-18   2
## 151            02-Apr-19   4
## 152            02-Apr-20   2
## 153            02-Apr-21  11
## 154            02-Aug-13   1
## 155            02-Aug-16   1
## 156            02-Aug-18  25
## 157            02-Aug-19   7
## 158            02-Aug-20   2
## 159            02-Dec-15   1
## 160            02-Dec-16   4
## 161            02-Dec-17   2
## 162            02-Dec-18   3
## 163            02-Dec-19   1
## 164            02-Dec-20   6
## 165            02-Feb-17   1
## 166            02-Feb-18   4
## 167            02-Feb-19   6
## 168            02-Feb-21   2
## 169            02-Jan-18   3
## 170            02-Jan-19   2
## 171            02-Jan-20   3
## 172            02-Jan-21   2
## 173            02-Jul-18   2
## 174            02-Jul-19   3
## 175            02-Jul-20   3
## 176            02-Jul-21   9
## 177            02-Jun-16   1
## 178            02-Jun-17   5
## 179            02-Jun-18   2
## 180            02-Jun-19   4
## 181            02-Jun-20  11
## 182            02-Jun-21  51
## 183            02-Mar-16   1
## 184            02-Mar-17   2
## 185            02-Mar-18   4
## 186            02-Mar-19  10
## 187            02-Mar-20   1
## 188            02-Mar-21   3
## 189            02-May-17   2
## 190            02-May-18   1
## 191            02-May-19   7
## 192            02-May-20  11
## 193            02-Nov-16   2
## 194            02-Nov-18   6
## 195            02-Nov-19  14
## 196            02-Nov-20   2
## 197            02-Oct-15   1
## 198            02-Oct-17   1
## 199            02-Oct-18  17
## 200            02-Oct-19  12
## 201            02-Oct-20  11
## 202            02-Sep-15   1
## 203            02-Sep-16   2
## 204            02-Sep-17   3
## 205            02-Sep-18   3
## 206            02-Sep-20   5
## 207            02-Sep-21  14
## 208            03-Apr-18   3
## 209            03-Apr-19   4
## 210            03-Apr-20   4
## 211            03-Apr-21   1
## 212            03-Aug-17   1
## 213            03-Aug-18   4
## 214            03-Aug-19   1
## 215            03-Aug-20   1
## 216            03-Aug-21  10
## 217            03-Dec-16   3
## 218            03-Dec-18   3
## 219            03-Dec-19   4
## 220            03-Dec-20   5
## 221            03-Feb-17   2
## 222            03-Feb-19   1
## 223            03-Feb-20   3
## 224            03-Feb-21   5
## 225            03-Jan-17   1
## 226            03-Jan-19   2
## 227            03-Jan-20   3
## 228            03-Jan-21   1
## 229            03-Jul-18   4
## 230            03-Jul-19   2
## 231            03-Jul-20   9
## 232            03-Jul-21   1
## 233            03-Jun-16   1
## 234            03-Jun-17   3
## 235            03-Jun-19   2
## 236            03-Jun-20   3
## 237            03-Jun-21   8
## 238            03-Mar-17   1
## 239            03-Mar-19   2
## 240            03-Mar-20   8
## 241            03-Mar-21   2
## 242            03-May-18   1
## 243            03-May-19  10
## 244            03-May-20   1
## 245            03-Nov-17   2
## 246            03-Nov-18   2
## 247            03-Nov-20   4
## 248            03-Oct-17   2
## 249            03-Oct-18   3
## 250            03-Oct-19   2
## 251            03-Oct-20   4
## 252            03-Sep-18   1
## 253            03-Sep-20   4
## 254            03-Sep-21   5
## 255            04-Apr-17   1
## 256            04-Apr-18   3
## 257            04-Apr-19   1
## 258            04-Apr-20   2
## 259            04-Apr-21   2
## 260            04-Aug-17   5
## 261            04-Aug-18   4
## 262            04-Aug-20   4
## 263            04-Aug-21   7
## 264            04-Dec-15   1
## 265            04-Dec-16   1
## 266            04-Dec-18   3
## 267            04-Dec-19   3
## 268            04-Dec-20   9
## 269            04-Feb-08   1
## 270            04-Feb-16   1
## 271            04-Feb-17   1
## 272            04-Feb-18   1
## 273            04-Feb-20   4
## 274            04-Jan-17   1
## 275            04-Jan-19   5
## 276            04-Jan-20   1
## 277            04-Jan-21   3
## 278            04-Jul-16   1
## 279            04-Jul-17   1
## 280            04-Jul-18   1
## 281            04-Jul-19   4
## 282            04-Jul-20   1
## 283            04-Jul-21   1
## 284            04-Jun-18   2
## 285            04-Jun-19   4
## 286            04-Jun-20   3
## 287            04-Jun-21   9
## 288            04-Mar-17   1
## 289            04-Mar-18   1
## 290            04-Mar-19   6
## 291            04-Mar-20   4
## 292            04-Mar-21   4
## 293            04-May-17   1
## 294            04-May-18  10
## 295            04-May-20   2
## 296            04-May-21   4
## 297            04-Nov-16   3
## 298            04-Nov-17   1
## 299            04-Nov-19   9
## 300            04-Nov-20   4
## 301            04-Oct-16   1
## 302            04-Oct-18   4
## 303            04-Oct-19  10
## 304            04-Oct-20   1
## 305            04-Sep-17   2
## 306            04-Sep-18   2
## 307            04-Sep-19   3
## 308            04-Sep-20   6
## 309            04-Sep-21   1
## 310            05-Apr-16   1
## 311            05-Apr-18   2
## 312            05-Apr-19  15
## 313            05-Apr-20   2
## 314            05-Apr-21   2
## 315            05-Aug-15   1
## 316            05-Aug-16   1
## 317            05-Aug-17   4
## 318            05-Aug-18   1
## 319            05-Aug-19   5
## 320            05-Aug-20   3
## 321            05-Aug-21   5
## 322            05-Dec-14   1
## 323            05-Dec-16   2
## 324            05-Dec-17   1
## 325            05-Dec-18   1
## 326            05-Dec-19   3
## 327            05-Dec-20   2
## 328            05-Feb-16   3
## 329            05-Feb-17   2
## 330            05-Feb-18   4
## 331            05-Feb-19   6
## 332            05-Feb-20   4
## 333            05-Feb-21  10
## 334            05-Jan-17   3
## 335            05-Jan-18   3
## 336            05-Jan-19   7
## 337            05-Jan-21   3
## 338            05-Jul-18   1
## 339            05-Jul-19   2
## 340            05-Jul-20  29
## 341            05-Jun-17   2
## 342            05-Jun-18   1
## 343            05-Jun-19   6
## 344            05-Jun-20   9
## 345            05-Jun-21   3
## 346            05-Mar-18   1
## 347            05-Mar-19   5
## 348            05-Mar-20   5
## 349            05-Mar-21   7
## 350            05-May-09   1
## 351            05-May-16   1
## 352            05-May-17   5
## 353            05-May-18   3
## 354            05-May-19   1
## 355            05-May-20   1
## 356            05-May-21   3
## 357            05-Nov-17   1
## 358            05-Nov-18   2
## 359            05-Nov-19   7
## 360            05-Nov-20   7
## 361            05-Oct-18   9
## 362            05-Oct-19   3
## 363            05-Oct-20   1
## 364            05-Sep-17   4
## 365            05-Sep-18   7
## 366            05-Sep-19   1
## 367            05-Sep-20   3
## 368            05-Sep-21   2
## 369            06-Apr-17   1
## 370            06-Apr-18  10
## 371            06-Apr-19   1
## 372            06-Apr-20   2
## 373            06-Apr-21   1
## 374            06-Aug-17   2
## 375            06-Aug-19   6
## 376            06-Aug-20   3
## 377            06-Aug-21   5
## 378            06-Dec-16   4
## 379            06-Dec-17   1
## 380            06-Dec-18   1
## 381            06-Dec-19  16
## 382            06-Feb-16   1
## 383            06-Feb-18   3
## 384            06-Feb-19   2
## 385            06-Feb-20   3
## 386            06-Feb-21   1
## 387            06-Jan-17   4
## 388            06-Jan-18   2
## 389            06-Jan-21   3
## 390            06-Jul-16   1
## 391            06-Jul-17   2
## 392            06-Jul-18   6
## 393            06-Jul-19   2
## 394            06-Jul-20   2
## 395            06-Jul-21  39
## 396            06-Jun-19  16
## 397            06-Jun-20   3
## 398            06-Jun-21   1
## 399            06-Mar-15   2
## 400            06-Mar-18   6
## 401            06-Mar-19   2
## 402            06-Mar-20   8
## 403            06-Mar-21   1
## 404            06-May-16   1
## 405            06-May-19   4
## 406            06-May-20   3
## 407            06-May-21   2
## 408            06-Nov-17   1
## 409            06-Nov-19   3
## 410            06-Nov-20   9
## 411            06-Oct-17   4
## 412            06-Oct-18   2
## 413            06-Oct-19   1
## 414            06-Oct-20   5
## 415            06-Sep-16   1
## 416            06-Sep-17   1
## 417            06-Sep-18   2
## 418            06-Sep-19   5
## 419            06-Sep-21   3
## 420            07-Apr-17   5
## 421            07-Apr-18   1
## 422            07-Apr-19   2
## 423            07-Apr-20   2
## 424            07-Apr-21   4
## 425            07-Aug-17   8
## 426            07-Aug-19   3
## 427            07-Aug-20  10
## 428            07-Aug-21   2
## 429            07-Dec-17   1
## 430            07-Dec-18  10
## 431            07-Dec-19   2
## 432            07-Dec-20   5
## 433            07-Feb-17   1
## 434            07-Feb-19   2
## 435            07-Feb-20   9
## 436            07-Feb-21   1
## 437            07-Jan-17   2
## 438            07-Jan-19   2
## 439            07-Jan-20   2
## 440            07-Jan-21   3
## 441            07-Jul-15   1
## 442            07-Jul-16   1
## 443            07-Jul-17   8
## 444            07-Jul-19   1
## 445            07-Jul-20   2
## 446            07-Jul-21  13
## 447            07-Jun-18   3
## 448            07-Jun-19  12
## 449            07-Jun-20   3
## 450            07-Jun-21   1
## 451            07-Mar-16   1
## 452            07-Mar-17   1
## 453            07-Mar-18   2
## 454            07-Mar-19   6
## 455            07-May-17   1
## 456            07-May-18   1
## 457            07-May-19   6
## 458            07-May-20   5
## 459            07-May-21   9
## 460            07-Nov-14   1
## 461            07-Nov-17   5
## 462            07-Nov-18   3
## 463            07-Nov-19   1
## 464            07-Oct-16   4
## 465            07-Oct-17   1
## 466            07-Oct-19   1
## 467            07-Oct-20   2
## 468            07-Sep-17   1
## 469            07-Sep-18   9
## 470            07-Sep-20   5
## 471            07-Sep-21   6
## 472            08-Apr-16   1
## 473            08-Apr-17   2
## 474            08-Apr-19   2
## 475            08-Apr-20   2
## 476            08-Apr-21   2
## 477            08-Aug-17   1
## 478            08-Aug-18   2
## 479            08-Aug-19  13
## 480            08-Aug-20   3
## 481            08-Aug-21   2
## 482            08-Dec-16   4
## 483            08-Dec-17   4
## 484            08-Dec-18   5
## 485            08-Dec-19   1
## 486            08-Dec-20   8
## 487            08-Feb-16   1
## 488            08-Feb-17   3
## 489            08-Feb-18   1
## 490            08-Feb-19   7
## 491            08-Feb-20   2
## 492            08-Feb-21   2
## 493            08-Jan-16   1
## 494            08-Jan-18   1
## 495            08-Jan-19   1
## 496            08-Jan-20   1
## 497            08-Jan-21  11
## 498            08-Jul-16   1
## 499            08-Jul-18   1
## 500            08-Jul-19   1
## 501            08-Jul-20   4
## 502            08-Jul-21   6
## 503            08-Jun-17   1
## 504            08-Jun-18   4
## 505            08-Jun-19   3
## 506            08-Jun-20   1
## 507            08-Jun-21   1
## 508            08-Mar-17   1
## 509            08-Mar-18   2
## 510            08-Mar-19  12
## 511            08-Mar-20   1
## 512            08-Mar-21   2
## 513            08-May-16   1
## 514            08-May-17   1
## 515            08-May-18   3
## 516            08-May-19   9
## 517            08-May-20   6
## 518            08-May-21   2
## 519            08-Nov-18   6
## 520            08-Nov-19   5
## 521            08-Oct-18   2
## 522            08-Oct-19   2
## 523            08-Oct-20   5
## 524            08-Sep-15   1
## 525            08-Sep-17  21
## 526            08-Sep-18   2
## 527            08-Sep-20   4
## 528            08-Sep-21   4
## 529            09-Apr-16   1
## 530            09-Apr-18   2
## 531            09-Apr-19   2
## 532            09-Apr-20   2
## 533            09-Apr-21   6
## 534            09-Aug-17   1
## 535            09-Aug-18   2
## 536            09-Aug-19   8
## 537            09-Aug-21   1
## 538            09-Dec-15   1
## 539            09-Dec-16   5
## 540            09-Dec-18   1
## 541            09-Dec-19   2
## 542            09-Dec-20   7
## 543            09-Feb-18   5
## 544            09-Feb-19   3
## 545            09-Feb-20   3
## 546            09-Feb-21   1
## 547            09-Jan-18   2
## 548            09-Jan-19   5
## 549            09-Jan-20   2
## 550            09-Jul-19   2
## 551            09-Jul-20   3
## 552            09-Jul-21  12
## 553            09-Jun-17   2
## 554            09-Jun-21   5
## 555            09-Mar-16   1
## 556            09-Mar-17   4
## 557            09-Mar-18   4
## 558            09-Mar-19   2
## 559            09-Mar-21   1
## 560            09-May-17   1
## 561            09-May-19   7
## 562            09-May-20   1
## 563            09-May-21   2
## 564            09-Nov-16   2
## 565            09-Nov-18   9
## 566            09-Nov-19   1
## 567            09-Oct-15   1
## 568            09-Oct-18   3
## 569            09-Oct-19   3
## 570            09-Oct-20   6
## 571            09-Sep-16   1
## 572            09-Sep-18   1
## 573            09-Sep-19   1
## 574            09-Sep-20   6
## 575            09-Sep-21   4
## 576            10-Apr-17   2
## 577            10-Apr-18   1
## 578            10-Apr-19   4
## 579            10-Apr-20   8
## 580            10-Apr-21   1
## 581            10-Aug-17   4
## 582            10-Aug-18   7
## 583            10-Aug-20   4
## 584            10-Aug-21   5
## 585            10-Dec-16   2
## 586            10-Dec-18   4
## 587            10-Dec-19   2
## 588            10-Dec-20   6
## 589            10-Feb-17   4
## 590            10-Feb-20   1
## 591            10-Feb-21   3
## 592            10-Jan-17   2
## 593            10-Jan-18   3
## 594            10-Jan-19   3
## 595            10-Jan-20  11
## 596            10-Jan-21   1
## 597            10-Jul-15   1
## 598            10-Jul-16   1
## 599            10-Jul-17   1
## 600            10-Jul-18   2
## 601            10-Jul-20   8
## 602            10-Jul-21   3
## 603            10-Jun-17   9
## 604            10-Jun-19   1
## 605            10-Jun-20   7
## 606            10-Jun-21   6
## 607            10-Mar-17  22
## 608            10-Mar-18   2
## 609            10-Mar-19   1
## 610            10-Mar-20   2
## 611            10-Mar-21   3
## 612            10-May-15   1
## 613            10-May-17   2
## 614            10-May-19  11
## 615            10-May-21   1
## 616            10-Nov-16   2
## 617            10-Nov-17   7
## 618            10-Nov-18   3
## 619            10-Nov-20   2
## 620            10-Oct-14   1
## 621            10-Oct-15   2
## 622            10-Oct-17   1
## 623            10-Oct-18   4
## 624            10-Oct-19   3
## 625            10-Sep-19   4
## 626            10-Sep-20  15
## 627            10-Sep-21   8
## 628            11-Apr-17   1
## 629            11-Apr-19   2
## 630            11-Apr-20   2
## 631            11-Apr-21   1
## 632            11-Aug-16   4
## 633            11-Aug-17   1
## 634            11-Aug-20   2
## 635            11-Aug-21   6
## 636            11-Dec-15   1
## 637            11-Dec-16   1
## 638            11-Dec-17   3
## 639            11-Dec-18   2
## 640            11-Dec-19   1
## 641            11-Dec-20   6
## 642            11-Feb-17   1
## 643            11-Feb-19   1
## 644            11-Feb-20   3
## 645            11-Feb-21   8
## 646            11-Jan-18   1
## 647            11-Jan-19   8
## 648            11-Jan-20   1
## 649            11-Jan-21   2
## 650            11-Jul-14   1
## 651            11-Jul-18   1
## 652            11-Jul-19   2
## 653            11-Jul-20   1
## 654            11-Jun-19   1
## 655            11-Jun-20   2
## 656            11-Jun-21   7
## 657            11-Mar-16   1
## 658            11-Mar-18   2
## 659            11-Mar-19   2
## 660            11-Mar-20   6
## 661            11-Mar-21   3
## 662            11-May-18   6
## 663            11-May-19   4
## 664            11-May-20   5
## 665            11-May-21   3
## 666            11-Nov-16   2
## 667            11-Nov-17   1
## 668            11-Nov-19   4
## 669            11-Nov-20   6
## 670            11-Oct-18   4
## 671            11-Oct-19   8
## 672            11-Oct-20   1
## 673            11-Sep-17   1
## 674            11-Sep-18   3
## 675            11-Sep-19   1
## 676            11-Sep-20   9
## 677            11-Sep-21   3
## 678            12-Apr-17   2
## 679            12-Apr-18   1
## 680            12-Apr-19   9
## 681            12-Apr-21   2
## 682            12-Aug-17   2
## 683            12-Aug-19   1
## 684            12-Aug-20   3
## 685            12-Aug-21   3
## 686            12-Dec-13   1
## 687            12-Dec-14   1
## 688            12-Dec-16   1
## 689            12-Dec-17   4
## 690            12-Dec-18   2
## 691            12-Dec-19   1
## 692            12-Dec-20   2
## 693            12-Feb-17   1
## 694            12-Feb-19   2
## 695            12-Feb-20   3
## 696            12-Feb-21   7
## 697            12-Jan-17   2
## 698            12-Jan-18   6
## 699            12-Jan-19   2
## 700            12-Jan-20   2
## 701            12-Jan-21   3
## 702            12-Jul-17   1
## 703            12-Jul-19  20
## 704            12-Jul-21   1
## 705            12-Jun-18   2
## 706            12-Jun-19   2
## 707            12-Jun-20  15
## 708            12-Jun-21   4
## 709            12-Mar-18   2
## 710            12-Mar-19   3
## 711            12-Mar-21  12
## 712            12-May-17   4
## 713            12-May-18   1
## 714            12-May-19   2
## 715            12-May-20   3
## 716            12-May-21   4
## 717            12-Nov-17   1
## 718            12-Nov-18   1
## 719            12-Nov-19   2
## 720            12-Nov-20   8
## 721            12-Oct-14   1
## 722            12-Oct-16   1
## 723            12-Oct-17   2
## 724            12-Oct-18  11
## 725            12-Oct-20   6
## 726            12-Sep-17   2
## 727            12-Sep-18   2
## 728            12-Sep-19   3
## 729            13-Apr-18   5
## 730            13-Apr-19   2
## 731            13-Apr-20   4
## 732            13-Apr-21   9
## 733            13-Aug-16   1
## 734            13-Aug-17   2
## 735            13-Aug-19   5
## 736            13-Aug-20   6
## 737            13-Aug-21   7
## 738            13-Dec-16   1
## 739            13-Dec-19   8
## 740            13-Dec-20   1
## 741            13-Feb-15   1
## 742            13-Feb-18   1
## 743            13-Feb-19   1
## 744            13-Feb-20   5
## 745            13-Feb-21   1
## 746            13-Jan-17   3
## 747            13-Jan-19   3
## 748            13-Jan-20   2
## 749            13-Jan-21   2
## 750            13-Jul-17   3
## 751            13-Jul-18   6
## 752            13-Jul-19   1
## 753            13-Jul-21   4
## 754            13-Jun-16   1
## 755            13-Jun-17   2
## 756            13-Jun-19   9
## 757            13-Jun-20   5
## 758            13-Jun-21   3
## 759            13-Mar-18   3
## 760            13-Mar-19   3
## 761            13-Mar-20   9
## 762            13-May-17   1
## 763            13-May-18   1
## 764            13-May-19   1
## 765            13-May-20   2
## 766            13-May-21   4
## 767            13-Nov-15   2
## 768            13-Nov-17   1
## 769            13-Nov-18   3
## 770            13-Nov-19   1
## 771            13-Nov-20   8
## 772            13-Oct-16   1
## 773            13-Oct-17   6
## 774            13-Oct-18   1
## 775            13-Oct-19   2
## 776            13-Oct-20   3
## 777            13-Sep-16   1
## 778            13-Sep-17   2
## 779            13-Sep-18   2
## 780            13-Sep-19  12
## 781            14-Apr-17   5
## 782            14-Apr-18   1
## 783            14-Apr-19   2
## 784            14-Apr-20   2
## 785            14-Apr-21  15
## 786            14-Aug-15   1
## 787            14-Aug-17   4
## 788            14-Aug-19   2
## 789            14-Aug-20  10
## 790            14-Dec-16   1
## 791            14-Dec-17   1
## 792            14-Dec-18   9
## 793            14-Dec-20   3
## 794            14-Feb-16   1
## 795            14-Feb-17   4
## 796            14-Feb-18   3
## 797            14-Feb-19   4
## 798            14-Feb-20  10
## 799            14-Feb-21   1
## 800            14-Jan-17   4
## 801            14-Jan-19   2
## 802            14-Jan-20   3
## 803            14-Jan-21   2
## 804            14-Jul-15   1
## 805            14-Jul-16   2
## 806            14-Jul-17   3
## 807            14-Jul-18   3
## 808            14-Jul-20   3
## 809            14-Jul-21   6
## 810            14-Jun-18   1
## 811            14-Jun-19  10
## 812            14-Jun-21   1
## 813            14-Mar-17   4
## 814            14-Mar-18   1
## 815            14-Mar-19   6
## 816            14-Mar-20   1
## 817            14-Mar-21   1
## 818            14-May-17   1
## 819            14-May-19   4
## 820            14-May-20   8
## 821            14-May-21  14
## 822            14-Nov-12   1
## 823            14-Nov-14   1
## 824            14-Nov-17   1
## 825            14-Nov-19   3
## 826            14-Nov-20   1
## 827            14-Oct-13   2
## 828            14-Oct-15   1
## 829            14-Oct-16   1
## 830            14-Oct-17   1
## 831            14-Oct-19   1
## 832            14-Oct-20   3
## 833            14-Sep-18  11
## 834            14-Sep-19   2
## 835            14-Sep-20   1
## 836            14-Sep-21   6
## 837            15-Apr-14   1
## 838            15-Apr-16   3
## 839            15-Apr-17  12
## 840            15-Apr-18   5
## 841            15-Apr-19  10
## 842            15-Apr-20  12
## 843            15-Apr-21  18
## 844            15-Aug-14   1
## 845            15-Aug-16   6
## 846            15-Aug-17   8
## 847            15-Aug-18   6
## 848            15-Aug-19   5
## 849            15-Aug-20   4
## 850            15-Aug-21   5
## 851            15-Dec-15   2
## 852            15-Dec-16  18
## 853            15-Dec-17  23
## 854            15-Dec-18  16
## 855            15-Dec-19  29
## 856            15-Dec-20   7
## 857            15-Feb-15   1
## 858            15-Feb-17   8
## 859            15-Feb-18  13
## 860            15-Feb-19  24
## 861            15-Feb-20   3
## 862            15-Feb-21   3
## 863            15-Jan-16   2
## 864            15-Jan-17  10
## 865            15-Jan-18  12
## 866            15-Jan-19  15
## 867            15-Jan-20   8
## 868            15-Jan-21  13
## 869            15-Jul-15   2
## 870            15-Jul-16   4
## 871            15-Jul-17   3
## 872            15-Jul-18  14
## 873            15-Jul-19   5
## 874            15-Jul-20   7
## 875            15-Jul-21  11
## 876            15-Jun-14   1
## 877            15-Jun-15   1
## 878            15-Jun-17   6
## 879            15-Jun-18  10
## 880            15-Jun-19  11
## 881            15-Jun-20   4
## 882            15-Jun-21  12
## 883            15-Mar-15   2
## 884            15-Mar-17   8
## 885            15-Mar-18  23
## 886            15-Mar-19  21
## 887            15-Mar-20   7
## 888            15-Mar-21   6
## 889            15-May-16   1
## 890            15-May-17  12
## 891            15-May-18   6
## 892            15-May-19   7
## 893            15-May-20  15
## 894            15-May-21   3
## 895            15-Nov-16   4
## 896            15-Nov-17   5
## 897            15-Nov-18  15
## 898            15-Nov-19  24
## 899            15-Nov-20   9
## 900            15-Oct-16   9
## 901            15-Oct-17  23
## 902            15-Oct-18   4
## 903            15-Oct-19   3
## 904            15-Oct-20  11
## 905            15-Sep-15   1
## 906            15-Sep-16   3
## 907            15-Sep-17   9
## 908            15-Sep-18  15
## 909            15-Sep-19   9
## 910            15-Sep-20  10
## 911            15-Sep-21  22
## 912            16-Apr-15   1
## 913            16-Apr-17   1
## 914            16-Apr-18   2
## 915            16-Apr-19   5
## 916            16-Apr-20   8
## 917            16-Apr-21  15
## 918            16-Aug-17   1
## 919            16-Aug-18  22
## 920            16-Aug-19  14
## 921            16-Aug-20   3
## 922            16-Aug-21   2
## 923            16-Dec-16   6
## 924            16-Dec-17   2
## 925            16-Dec-18   9
## 926            16-Dec-19   3
## 927            16-Dec-20  11
## 928            16-Feb-14   1
## 929            16-Feb-17   2
## 930            16-Feb-18   5
## 931            16-Feb-19   3
## 932            16-Feb-20   6
## 933            16-Feb-21   4
## 934            16-Jan-17   2
## 935            16-Jan-18   3
## 936            16-Jan-19   2
## 937            16-Jan-20   9
## 938            16-Jan-21   3
## 939            16-Jul-19   6
## 940            16-Jul-20   3
## 941            16-Jul-21  14
## 942            16-Jun-17   5
## 943            16-Jun-19   2
## 944            16-Jun-20   2
## 945            16-Jun-21   9
## 946            16-Mar-16   1
## 947            16-Mar-17   6
## 948            16-Mar-18   5
## 949            16-Mar-19   1
## 950            16-Mar-20   1
## 951            16-Mar-21   4
## 952            16-May-17   2
## 953            16-May-18   2
## 954            16-May-19   4
## 955            16-May-20   2
## 956            16-May-21   1
## 957            16-Nov-17   1
## 958            16-Nov-18   7
## 959            16-Nov-19   4
## 960            16-Nov-20   2
## 961            16-Oct-15   3
## 962            16-Oct-16   1
## 963            16-Oct-17   7
## 964            16-Oct-18   2
## 965            16-Oct-19   7
## 966            16-Oct-20   8
## 967            16-Sep-16   5
## 968            16-Sep-18   2
## 969            16-Sep-19   1
## 970            16-Sep-20   9
## 971            16-Sep-21  12
## 972            17-Apr-15   1
## 973            17-Apr-16   1
## 974            17-Apr-18   3
## 975            17-Apr-19   5
## 976            17-Apr-20   8
## 977            17-Apr-21   8
## 978            17-Aug-17   1
## 979            17-Aug-18   5
## 980            17-Aug-20   3
## 981            17-Dec-14   1
## 982            17-Dec-15   1
## 983            17-Dec-18   3
## 984            17-Dec-19   1
## 985            17-Dec-20   9
## 986            17-Feb-17   5
## 987            17-Feb-18   1
## 988            17-Feb-19   2
## 989            17-Feb-20   2
## 990            17-Feb-21   4
## 991            17-Jan-14   1
## 992            17-Jan-17   4
## 993            17-Jan-18   2
## 994            17-Jan-20   5
## 995            17-Jul-15   1
## 996            17-Jul-17   1
## 997            17-Jul-18   1
## 998            17-Jul-19   3
## 999            17-Jul-20   5
## 1000           17-Jul-21   1
## 1001           17-Jun-17   1
## 1002           17-Jun-20   2
## 1003           17-Jun-21  11
## 1004           17-Mar-17   5
## 1005           17-Mar-19   2
## 1006           17-Mar-20   3
## 1007           17-Mar-21   3
## 1008           17-May-11   1
## 1009           17-May-15   1
## 1010           17-May-18   1
## 1011           17-May-19  11
## 1012           17-May-20   3
## 1013           17-Nov-16   1
## 1014           17-Nov-17   8
## 1015           17-Nov-18   3
## 1016           17-Nov-19   1
## 1017           17-Nov-20   4
## 1018           17-Oct-17   1
## 1019           17-Oct-18   2
## 1020           17-Oct-19   2
## 1021           17-Oct-20   1
## 1022           17-Sep-16   1
## 1023           17-Sep-17   1
## 1024           17-Sep-18   1
## 1025           17-Sep-19   6
## 1026           17-Sep-20   7
## 1027           17-Sep-21   7
## 1028           18-Apr-17   2
## 1029           18-Apr-18   1
## 1030           18-Apr-19   6
## 1031           18-Apr-20   3
## 1032           18-Aug-17   4
## 1033           18-Aug-18   3
## 1034           18-Aug-20   2
## 1035           18-Aug-21  11
## 1036           18-Dec-14   1
## 1037           18-Dec-15   1
## 1038           18-Dec-17   2
## 1039           18-Dec-18   2
## 1040           18-Dec-19   2
## 1041           18-Dec-20  10
## 1042           18-Feb-16   2
## 1043           18-Feb-21   5
## 1044           18-Jan-17   1
## 1045           18-Jan-18   2
## 1046           18-Jan-19  13
## 1047           18-Jan-20   1
## 1048           18-Jan-21   1
## 1049           18-Jul-17   3
## 1050           18-Jul-18   3
## 1051           18-Jul-19   3
## 1052           18-Jul-20   3
## 1053           18-Jun-16   1
## 1054           18-Jun-18   4
## 1055           18-Jun-19   8
## 1056           18-Jun-20  15
## 1057           18-Jun-21  10
## 1058           18-Mar-16   4
## 1059           18-Mar-17   2
## 1060           18-Mar-19   1
## 1061           18-Mar-20   5
## 1062           18-Mar-21   8
## 1063           18-May-17   1
## 1064           18-May-18   3
## 1065           18-May-19   2
## 1066           18-May-20   2
## 1067           18-May-21   2
## 1068           18-Nov-09   1
## 1069           18-Nov-15   1
## 1070           18-Nov-16   4
## 1071           18-Nov-17   1
## 1072           18-Nov-18   1
## 1073           18-Nov-20   1
## 1074           18-Oct-17   1
## 1075           18-Oct-18   1
## 1076           18-Oct-19  22
## 1077           18-Oct-20   3
## 1078           18-Sep-15   1
## 1079           18-Sep-17   5
## 1080           18-Sep-18   1
## 1081           18-Sep-19   2
## 1082           18-Sep-20   5
## 1083           19-Apr-17   2
## 1084           19-Apr-18   3
## 1085           19-Apr-19  14
## 1086           19-Apr-21   4
## 1087           19-Aug-16   1
## 1088           19-Aug-17   2
## 1089           19-Aug-18   3
## 1090           19-Aug-20   3
## 1091           19-Aug-21   2
## 1092           19-Dec-14   1
## 1093           19-Dec-16   2
## 1094           19-Dec-17   5
## 1095           19-Dec-18   1
## 1096           19-Dec-19   3
## 1097           19-Dec-20   1
## 1098           19-Feb-16   1
## 1099           19-Feb-17   3
## 1100           19-Feb-18   5
## 1101           19-Feb-19   2
## 1102           19-Feb-21   5
## 1103           19-Jan-17   1
## 1104           19-Jan-18   3
## 1105           19-Jan-19   1
## 1106           19-Jan-21   1
## 1107           19-Jul-17   1
## 1108           19-Jul-18   7
## 1109           19-Jul-19   5
## 1110           19-Jul-20   1
## 1111           19-Jul-21   1
## 1112           19-Jun-17   1
## 1113           19-Jun-18   2
## 1114           19-Jun-19   5
## 1115           19-Jun-20  12
## 1116           19-Jun-21  24
## 1117           19-Mar-16   1
## 1118           19-Mar-18   1
## 1119           19-Mar-19   3
## 1120           19-Mar-20   4
## 1121           19-Mar-21   6
## 1122           19-May-17   6
## 1123           19-May-18   1
## 1124           19-May-19   1
## 1125           19-May-20  13
## 1126           19-May-21   5
## 1127           19-Nov-14   1
## 1128           19-Nov-16   1
## 1129           19-Nov-19   2
## 1130           19-Nov-20  11
## 1131           19-Oct-17   1
## 1132           19-Oct-18  18
## 1133           19-Oct-19   3
## 1134           19-Oct-20  16
## 1135           19-Sep-16   7
## 1136           19-Sep-17   1
## 1137           19-Sep-18   2
## 1138           19-Sep-19   2
## 1139           19-Sep-20   6
## 1140           19-Sep-21   2
## 1141           20-Apr-16   1
## 1142           20-Apr-18   5
## 1143           20-Apr-19   3
## 1144           20-Apr-20   4
## 1145           20-Apr-21   7
## 1146           20-Aug-17   1
## 1147           20-Aug-18   1
## 1148           20-Aug-19   3
## 1149           20-Aug-20   5
## 1150           20-Aug-21   8
## 1151           20-Dec-15   3
## 1152           20-Dec-16   4
## 1153           20-Dec-17   3
## 1154           20-Dec-18   7
## 1155           20-Dec-19   7
## 1156           20-Dec-20   2
## 1157           20-Feb-17   1
## 1158           20-Feb-18   4
## 1159           20-Feb-19   2
## 1160           20-Feb-20   3
## 1161           20-Feb-21   4
## 1162           20-Jan-17   3
## 1163           20-Jan-18   1
## 1164           20-Jan-20   3
## 1165           20-Jan-21   4
## 1166           20-Jul-17   2
## 1167           20-Jul-18  10
## 1168           20-Jul-19   2
## 1169           20-Jul-21   3
## 1170           20-Jun-16   1
## 1171           20-Jun-17   4
## 1172           20-Jun-18   1
## 1173           20-Jun-19   9
## 1174           20-Jun-20   1
## 1175           20-Jun-21   1
## 1176           20-Mar-17   2
## 1177           20-Mar-18   2
## 1178           20-Mar-19   6
## 1179           20-Mar-20  12
## 1180           20-Mar-21   4
## 1181           20-May-19   2
## 1182           20-May-20   8
## 1183           20-May-21   7
## 1184           20-Nov-18   7
## 1185           20-Nov-19  30
## 1186           20-Nov-20   8
## 1187           20-Oct-17   6
## 1188           20-Oct-18   2
## 1189           20-Oct-20   3
## 1190           20-Sep-16   1
## 1191           20-Sep-18   3
## 1192           20-Sep-19  10
## 1193           20-Sep-20   8
## 1194           20-Sep-21   1
## 1195           21-Apr-17   5
## 1196           21-Apr-19   1
## 1197           21-Apr-20   3
## 1198           21-Apr-21   3
## 1199           21-Aug-17   5
## 1200           21-Aug-18   5
## 1201           21-Aug-19   6
## 1202           21-Aug-20   8
## 1203           21-Aug-21   1
## 1204           21-Dec-16   1
## 1205           21-Dec-17   1
## 1206           21-Dec-18  13
## 1207           21-Dec-19   2
## 1208           21-Dec-20   2
## 1209           21-Feb-12   1
## 1210           21-Feb-17   1
## 1211           21-Feb-18   3
## 1212           21-Feb-19   2
## 1213           21-Feb-20   9
## 1214           21-Feb-21   3
## 1215           21-Jan-20   2
## 1216           21-Jan-21   2
## 1217           21-Jul-16   1
## 1218           21-Jul-17   1
## 1219           21-Jul-18   2
## 1220           21-Jul-19   8
## 1221           21-Jul-20   3
## 1222           21-Jul-21   4
## 1223           21-Jun-17   2
## 1224           21-Jun-19  14
## 1225           21-Jun-20   2
## 1226           21-Jun-21   4
## 1227           21-Mar-17   4
## 1228           21-Mar-18   1
## 1229           21-Mar-19   9
## 1230           21-Mar-20   1
## 1231           21-May-19   2
## 1232           21-May-20  12
## 1233           21-May-21   8
## 1234           21-Nov-14   1
## 1235           21-Nov-16   1
## 1236           21-Nov-17   4
## 1237           21-Nov-18   2
## 1238           21-Nov-19   2
## 1239           21-Oct-14   1
## 1240           21-Oct-16   2
## 1241           21-Oct-17   1
## 1242           21-Oct-18   1
## 1243           21-Oct-19   1
## 1244           21-Oct-20   3
## 1245           21-Sep-18   6
## 1246           21-Sep-19   4
## 1247           21-Sep-20   1
## 1248           21-Sep-21   5
## 1249           22-Apr-15   3
## 1250           22-Apr-16   2
## 1251           22-Apr-17   6
## 1252           22-Apr-19   1
## 1253           22-Apr-20   7
## 1254           22-Apr-21   5
## 1255           22-Aug-17   2
## 1256           22-Aug-20   2
## 1257           22-Dec-17   2
## 1258           22-Dec-18   5
## 1259           22-Dec-19   2
## 1260           22-Dec-20   8
## 1261           22-Feb-17  11
## 1262           22-Feb-18   1
## 1263           22-Feb-19  11
## 1264           22-Feb-20   2
## 1265           22-Feb-21   1
## 1266           22-Jan-16   1
## 1267           22-Jan-18   4
## 1268           22-Jan-20   3
## 1269           22-Jan-21   6
## 1270           22-Jul-18   2
## 1271           22-Jul-19   4
## 1272           22-Jul-20   4
## 1273           22-Jul-21  25
## 1274           22-Jun-17   2
## 1275           22-Jun-18   6
## 1276           22-Jun-19   2
## 1277           22-Jun-20   3
## 1278           22-Jun-21   5
## 1279           22-Mar-19   9
## 1280           22-Mar-20   1
## 1281           22-Mar-21   1
## 1282           22-May-15   2
## 1283           22-May-16   1
## 1284           22-May-17   7
## 1285           22-May-18   2
## 1286           22-May-19   2
## 1287           22-May-20   5
## 1288           22-May-21   1
## 1289           22-Nov-16   2
## 1290           22-Nov-17   3
## 1291           22-Nov-18   2
## 1292           22-Nov-19  11
## 1293           22-Nov-20   2
## 1294           22-Oct-15   1
## 1295           22-Oct-17   7
## 1296           22-Oct-18   1
## 1297           22-Oct-19   6
## 1298           22-Oct-20   7
## 1299           22-Sep-15   1
## 1300           22-Sep-17   2
## 1301           22-Sep-18   2
## 1302           22-Sep-19   1
## 1303           22-Sep-20   2
## 1304           22-Sep-21   9
## 1305           23-Apr-17   1
## 1306           23-Apr-19   1
## 1307           23-Apr-20   6
## 1308           23-Apr-21  20
## 1309           23-Aug-17   1
## 1310           23-Aug-18   2
## 1311           23-Aug-19   7
## 1312           23-Aug-20   1
## 1313           23-Aug-21   5
## 1314           23-Dec-16   4
## 1315           23-Dec-17   2
## 1316           23-Dec-18   3
## 1317           23-Dec-20   3
## 1318           23-Feb-17   2
## 1319           23-Feb-18   5
## 1320           23-Feb-19   1
## 1321           23-Feb-20   2
## 1322           23-Feb-21   4
## 1323           23-Jan-15   1
## 1324           23-Jan-16   1
## 1325           23-Jan-17   1
## 1326           23-Jan-18   3
## 1327           23-Jan-19   1
## 1328           23-Jan-20   6
## 1329           23-Jul-18   1
## 1330           23-Jul-19   2
## 1331           23-Jul-20   3
## 1332           23-Jul-21  11
## 1333           23-Jun-15   1
## 1334           23-Jun-17   4
## 1335           23-Jun-18   6
## 1336           23-Jun-19   1
## 1337           23-Jun-20   2
## 1338           23-Jun-21   5
## 1339           23-Mar-17   1
## 1340           23-Mar-18   8
## 1341           23-Mar-19   3
## 1342           23-Mar-20   2
## 1343           23-Mar-21   3
## 1344           23-May-16   1
## 1345           23-May-17   2
## 1346           23-May-19   1
## 1347           23-May-20   3
## 1348           23-May-21   1
## 1349           23-Nov-17   1
## 1350           23-Nov-18   3
## 1351           23-Nov-19   5
## 1352           23-Nov-20   4
## 1353           23-Oct-15   1
## 1354           23-Oct-17   1
## 1355           23-Oct-18   4
## 1356           23-Oct-19   4
## 1357           23-Oct-20   7
## 1358           23-Sep-16   3
## 1359           23-Sep-19   2
## 1360           23-Sep-20   2
## 1361           23-Sep-21   2
## 1362           24-Apr-18   2
## 1363           24-Apr-19   2
## 1364           24-Apr-20   6
## 1365           24-Apr-21   2
## 1366           24-Aug-18  10
## 1367           24-Aug-19   2
## 1368           24-Aug-20   1
## 1369           24-Aug-21   3
## 1370           24-Dec-18   2
## 1371           24-Dec-19   4
## 1372           24-Dec-20   3
## 1373           24-Feb-16   1
## 1374           24-Feb-17   3
## 1375           24-Feb-19   3
## 1376           24-Feb-21   6
## 1377           24-Jan-14   1
## 1378           24-Jan-17   1
## 1379           24-Jan-18   4
## 1380           24-Jan-19   3
## 1381           24-Jan-20   6
## 1382           24-Jul-16   1
## 1383           24-Jul-17   2
## 1384           24-Jul-18   3
## 1385           24-Jul-19   1
## 1386           24-Jul-20   8
## 1387           24-Jul-21   1
## 1388           24-Jun-16   3
## 1389           24-Jun-17   2
## 1390           24-Jun-18   1
## 1391           24-Jun-19   1
## 1392           24-Jun-20   4
## 1393           24-Jun-21   5
## 1394           24-Mar-17   4
## 1395           24-Mar-18   2
## 1396           24-Mar-19   1
## 1397           24-Mar-20   1
## 1398           24-Mar-21   1
## 1399           24-May-18   1
## 1400           24-May-19   7
## 1401           24-May-20   1
## 1402           24-May-21   1
## 1403           24-Nov-17   5
## 1404           24-Nov-19   3
## 1405           24-Nov-20   7
## 1406           24-Oct-14   1
## 1407           24-Oct-17   3
## 1408           24-Oct-18   1
## 1409           24-Oct-19   3
## 1410           24-Oct-20   2
## 1411           24-Sep-17   2
## 1412           24-Sep-18   1
## 1413           24-Sep-19   2
## 1414           24-Sep-20   2
## 1415           24-Sep-21  10
## 1416           25-Apr-16   1
## 1417           25-Apr-17   4
## 1418           25-Apr-18   3
## 1419           25-Apr-19   7
## 1420           25-Apr-20  11
## 1421           25-Aug-16   2
## 1422           25-Aug-17   4
## 1423           25-Aug-18   4
## 1424           25-Aug-19   1
## 1425           25-Aug-20   2
## 1426           25-Aug-21  12
## 1427           25-Dec-15   1
## 1428           25-Dec-16   1
## 1429           25-Dec-17   3
## 1430           25-Dec-18   2
## 1431           25-Dec-19   6
## 1432           25-Dec-20   4
## 1433           25-Feb-17   2
## 1434           25-Feb-18   1
## 1435           25-Feb-19   3
## 1436           25-Feb-20   2
## 1437           25-Feb-21   4
## 1438           25-Jan-17   1
## 1439           25-Jan-18   1
## 1440           25-Jan-19   7
## 1441           25-Jan-20   1
## 1442           25-Jul-16   1
## 1443           25-Jul-17   1
## 1444           25-Jul-18   8
## 1445           25-Jul-19   1
## 1446           25-Jul-20   3
## 1447           25-Jun-17   1
## 1448           25-Jun-18   2
## 1449           25-Jun-19   2
## 1450           25-Jun-20   3
## 1451           25-Jun-21   4
## 1452           25-Mar-16   1
## 1453           25-Mar-19   2
## 1454           25-Mar-20   4
## 1455           25-Mar-21   4
## 1456           25-May-17   1
## 1457           25-May-18   5
## 1458           25-May-19   2
## 1459           25-May-20   5
## 1460           25-May-21   2
## 1461           25-Nov-16   3
## 1462           25-Nov-18   2
## 1463           25-Nov-19   2
## 1464           25-Nov-20   4
## 1465           25-Oct-15   1
## 1466           25-Oct-17   2
## 1467           25-Oct-18   4
## 1468           25-Oct-19  16
## 1469           25-Oct-20   1
## 1470           25-Sep-17   3
## 1471           25-Sep-18   1
## 1472           25-Sep-19   8
## 1473           25-Sep-20   6
## 1474           25-Sep-21   1
## 1475           26-Apr-17   1
## 1476           26-Apr-18   2
## 1477           26-Apr-19  12
## 1478           26-Apr-20   2
## 1479           26-Aug-16   4
## 1480           26-Aug-17   2
## 1481           26-Aug-18   1
## 1482           26-Aug-19   1
## 1483           26-Aug-20   5
## 1484           26-Aug-21   2
## 1485           26-Dec-15   1
## 1486           26-Dec-16   4
## 1487           26-Dec-17   3
## 1488           26-Dec-18   1
## 1489           26-Dec-19   3
## 1490           26-Dec-20   3
## 1491           26-Feb-16   2
## 1492           26-Feb-17   1
## 1493           26-Feb-18   3
## 1494           26-Feb-19   1
## 1495           26-Feb-20   8
## 1496           26-Feb-21  10
## 1497           26-Jan-17   1
## 1498           26-Jan-18   6
## 1499           26-Jan-19   2
## 1500           26-Jan-20   2
## 1501           26-Jan-21   4
## 1502           26-Jul-18  11
## 1503           26-Jul-19  13
## 1504           26-Jul-20   2
## 1505           26-Jul-21   2
## 1506           26-Jun-15   1
## 1507           26-Jun-17   2
## 1508           26-Jun-18   3
## 1509           26-Jun-19   5
## 1510           26-Jun-20  10
## 1511           26-Jun-21   2
## 1512           26-Mar-18   1
## 1513           26-Mar-19   1
## 1514           26-Mar-20   6
## 1515           26-Mar-21  11
## 1516           26-May-16   1
## 1517           26-May-17   5
## 1518           26-May-18   2
## 1519           26-May-19   2
## 1520           26-May-20   1
## 1521           26-May-21   5
## 1522           26-Nov-19   5
## 1523           26-Nov-20   4
## 1524           26-Oct-17   1
## 1525           26-Oct-18   8
## 1526           26-Oct-19   2
## 1527           26-Oct-20   1
## 1528           26-Sep-14   1
## 1529           26-Sep-17   3
## 1530           26-Sep-18   1
## 1531           26-Sep-19   3
## 1532           26-Sep-20   2
## 1533           27-Apr-17   1
## 1534           27-Apr-18   9
## 1535           27-Apr-19   1
## 1536           27-Apr-20   3
## 1537           27-Apr-21   5
## 1538           27-Aug-17   1
## 1539           27-Aug-18   2
## 1540           27-Aug-19   1
## 1541           27-Aug-20   6
## 1542           27-Aug-21  27
## 1543           27-Dec-16   2
## 1544           27-Dec-17   3
## 1545           27-Dec-18   1
## 1546           27-Dec-19   5
## 1547           27-Dec-20   2
## 1548           27-Feb-15   1
## 1549           27-Feb-17   1
## 1550           27-Feb-18   2
## 1551           27-Feb-19  15
## 1552           27-Feb-20   6
## 1553           27-Jan-17   3
## 1554           27-Jan-19   2
## 1555           27-Jan-20   2
## 1556           27-Jan-21   6
## 1557           27-Jul-18   6
## 1558           27-Jul-21   8
## 1559           27-Jun-17   1
## 1560           27-Jun-18   1
## 1561           27-Jun-19   3
## 1562           27-Jun-20   2
## 1563           27-Mar-18   2
## 1564           27-Mar-19   2
## 1565           27-Mar-20  12
## 1566           27-May-16   1
## 1567           27-May-18   1
## 1568           27-May-19   2
## 1569           27-May-20   1
## 1570           27-May-21   7
## 1571           27-Nov-17   2
## 1572           27-Nov-18   3
## 1573           27-Nov-19   5
## 1574           27-Nov-20   9
## 1575           27-Oct-15   1
## 1576           27-Oct-16   1
## 1577           27-Oct-17   2
## 1578           27-Oct-18   2
## 1579           27-Oct-19   1
## 1580           27-Oct-20   4
## 1581           27-Sep-11   1
## 1582           27-Sep-17   1
## 1583           27-Sep-18   1
## 1584           27-Sep-19   5
## 1585           27-Sep-20   1
## 1586           28-Apr-16   1
## 1587           28-Apr-17   8
## 1588           28-Apr-19   1
## 1589           28-Apr-20  12
## 1590           28-Apr-21   3
## 1591           28-Aug-17   1
## 1592           28-Aug-18   4
## 1593           28-Aug-19   1
## 1594           28-Aug-20   5
## 1595           28-Aug-21   4
## 1596           28-Dec-15   1
## 1597           28-Dec-16   1
## 1598           28-Dec-18  10
## 1599           28-Dec-19   1
## 1600           28-Dec-20   3
## 1601           28-Feb-17   3
## 1602           28-Feb-18   2
## 1603           28-Feb-19   3
## 1604           28-Feb-20   6
## 1605           28-Feb-21   1
## 1606           28-Jan-16   4
## 1607           28-Jan-19   6
## 1608           28-Jan-21   1
## 1609           28-Jul-17   3
## 1610           28-Jul-18   6
## 1611           28-Jul-20   1
## 1612           28-Jul-21   5
## 1613           28-Jun-17   1
## 1614           28-Jun-18   1
## 1615           28-Jun-19  11
## 1616           28-Jun-20   3
## 1617           28-Jun-21   4
## 1618           28-Mar-17   1
## 1619           28-Mar-18   1
## 1620           28-Mar-19   1
## 1621           28-Mar-20   1
## 1622           28-Mar-21   2
## 1623           28-May-19   2
## 1624           28-May-20   9
## 1625           28-May-21   5
## 1626           28-Nov-18   1
## 1627           28-Nov-19   6
## 1628           28-Oct-16   6
## 1629           28-Oct-17   1
## 1630           28-Oct-18   1
## 1631           28-Oct-19   2
## 1632           28-Oct-20   5
## 1633           28-Sep-17   1
## 1634           28-Sep-18  11
## 1635           28-Sep-19   3
## 1636           28-Sep-20  11
## 1637           29-Apr-16   2
## 1638           29-Apr-19   4
## 1639           29-Apr-20   8
## 1640           29-Apr-21   2
## 1641           29-Aug-17   2
## 1642           29-Aug-18   2
## 1643           29-Aug-19   4
## 1644           29-Aug-20   1
## 1645           29-Aug-21   2
## 1646           29-Dec-13   1
## 1647           29-Dec-17   5
## 1648           29-Dec-18   2
## 1649           29-Jan-17   1
## 1650           29-Jan-18   4
## 1651           29-Jan-19   6
## 1652           29-Jan-20   4
## 1653           29-Jan-21   4
## 1654           29-Jul-16   2
## 1655           29-Jul-18   1
## 1656           29-Jul-19   3
## 1657           29-Jul-20   6
## 1658           29-Jul-21   3
## 1659           29-Jun-15   1
## 1660           29-Jun-18   8
## 1661           29-Jun-19   2
## 1662           29-Jun-20   1
## 1663           29-Jun-21   1
## 1664           29-Mar-18   1
## 1665           29-Mar-19  14
## 1666           29-Mar-20   2
## 1667           29-Mar-21   1
## 1668           29-May-15   1
## 1669           29-May-17   2
## 1670           29-May-18   1
## 1671           29-May-20   4
## 1672           29-May-21   1
## 1673           29-Nov-19  11
## 1674           29-Nov-20   1
## 1675           29-Oct-16   1
## 1676           29-Oct-18   1
## 1677           29-Oct-19   3
## 1678           29-Oct-20   1
## 1679           29-Sep-15   1
## 1680           29-Sep-17   8
## 1681           29-Sep-18   2
## 1682           29-Sep-20   3
## 1683           30-Apr-18   4
## 1684           30-Apr-19  10
## 1685           30-Apr-20   7
## 1686           30-Apr-21   7
## 1687           30-Aug-18   1
## 1688           30-Aug-19   8
## 1689           30-Aug-20   2
## 1690           30-Dec-16   1
## 1691           30-Dec-17   1
## 1692           30-Dec-18   4
## 1693           30-Dec-19   1
## 1694           30-Dec-20   7
## 1695           30-Jan-18   4
## 1696           30-Jan-19   6
## 1697           30-Jan-20   4
## 1698           30-Jul-17   1
## 1699           30-Jul-18   5
## 1700           30-Jul-19   4
## 1701           30-Jul-20   4
## 1702           30-Jul-21  10
## 1703           30-Jun-16   2
## 1704           30-Jun-17   5
## 1705           30-Jun-18   5
## 1706           30-Jun-19   4
## 1707           30-Jun-20   4
## 1708           30-Jun-21  10
## 1709           30-Mar-17   3
## 1710           30-Mar-18  10
## 1711           30-Mar-19   2
## 1712           30-Mar-21   3
## 1713           30-May-17   2
## 1714           30-May-18   1
## 1715           30-May-19   3
## 1716           30-May-21   1
## 1717           30-Nov-16   1
## 1718           30-Nov-17   1
## 1719           30-Nov-18  13
## 1720           30-Nov-19   3
## 1721           30-Nov-20   4
## 1722           30-Oct-17   1
## 1723           30-Oct-18   5
## 1724           30-Oct-19   4
## 1725           30-Oct-20  10
## 1726           30-Sep-16   1
## 1727           30-Sep-17   2
## 1728           30-Sep-18   7
## 1729           30-Sep-19   2
## 1730           30-Sep-20   9
## 1731           31-Aug-17   1
## 1732           31-Aug-18  10
## 1733           31-Aug-19   1
## 1734           31-Aug-20   4
## 1735           31-Aug-21   3
## 1736           31-Dec-15   1
## 1737           31-Dec-16   2
## 1738           31-Dec-17  17
## 1739           31-Dec-18  27
## 1740           31-Dec-19  74
## 1741           31-Dec-20   6
## 1742           31-Jan-17   2
## 1743           31-Jan-18   1
## 1744           31-Jan-19   8
## 1745           31-Jan-20   8
## 1746           31-Jan-21   2
## 1747           31-Jul-15   1
## 1748           31-Jul-18   3
## 1749           31-Jul-19   3
## 1750           31-Jul-20   7
## 1751           31-Jul-21   3
## 1752           31-Mar-13   1
## 1753           31-Mar-16   1
## 1754           31-Mar-17  30
## 1755           31-Mar-18   8
## 1756           31-Mar-19   3
## 1757           31-Mar-20  13
## 1758           31-Mar-21   5
## 1759           31-May-17   1
## 1760           31-May-18   1
## 1761           31-May-19   7
## 1762           31-May-20   1
## 1763           31-May-21   1
## 1764           31-Oct-15   1
## 1765           31-Oct-17   2
## 1766           31-Oct-18   2
## 1767           31-Oct-19   4
## 1768           31-Oct-20   3
library(lubridate)
View(df)
df1<-df %>% filter(country=="United Kingdom") %>% mutate(ymd=dmy(date_added)) %>% filter(ymd>='2018-01-01'&ymd<='2018-12-31')
## Warning: There was 1 warning in `mutate()`.
## ℹ In argument: `ymd = dmy(date_added)`.
## Caused by warning:
## !  15 failed to parse.
df %>% filter(country=="United Kingdom") %>% mutate(ymd=dmy(date_added)) %>% filter(ymd>='2018-01-01'&ymd<='2018-12-31')
## Warning: There was 1 warning in `mutate()`.
## ℹ In argument: `ymd = dmy(date_added)`.
## Caused by warning:
## !  15 failed to parse.
##    show_id    type                                                    title
## 1    s4230   Movie                              Bill Hicks: One Night Stand
## 2    s4232   Movie                                   Bill Hicks: Relentless
## 3    s4233   Movie                                  Bill Hicks: Revelations
## 4    s4236   Movie                               Gina Yashere: Skinny B*tch
## 5    s4247   Movie              Tim Minchin And The Heritage Orchestra Live
## 6    s4248   Movie                             Tim Minchin: So F**king Rock
## 7    s4265 TV Show                                   People Just Do Nothing
## 8    s4297 TV Show                                                  Flowers
## 9    s4368 TV Show                                                Sick Note
## 10   s4502 TV Show                                               Wanderlust
## 11   s4509 TV Show                                            Stunt Science
## 12   s4533   Movie                                               Malevolent
## 13   s4543 TV Show                          Monty Python Best Bits (mostly)
## 14   s4545   Movie         Monty Python Live (Mostly): One Down, Five to Go
## 15   s4546   Movie                   Monty Python: Before the Flying Circus
## 16   s4548   Movie                 Monty Python: Live at The Hollywood Bowl
## 17   s4549   Movie                        Monty Python: The Meaning of Live
## 18   s4550 TV Show                          Monty Python's Almost the Truth
## 19   s4552 TV Show                             Monty Python's Flying Circus
## 20   s4553   Movie                             Monty Python's Life of Brian
## 21   s4555   Movie Parrot Sketch Not Included: Twenty Years of Monty Python
## 22   s4556   Movie                              The Meaning of Monty Python
## 23   s4609 TV Show                                  Three Wives One Husband
## 24   s4690 TV Show                                            The Innocents
## 25   s4759 TV Show                                        Amazing Interiors
## 26   s4778 TV Show                                            Baby Ballroom
## 27   s4807   Movie                                                  Calibre
## 28   s4808 TV Show       Churchill\xa1\xafs Secret Agents: The New Recruits
## 29   s4821   Movie                                    Derren Brown: Miracle
## 30   s4933   Movie                       Greg Davies: You Magnificent Beast
## 31   s4952 TV Show                                                   Loaded
## 32   s4958 TV Show                                            Doctor Foster
## 33   s4959   Movie                                                   Revolt
## 34   s4968 TV Show                                 Trump: An American Dream
## 35   s4969 TV Show                                James Acaster: Repertoire
## 36   s4974 TV Show                                                  Requiem
## 37   s4990   Movie                                  Ricky Gervais: Humanity
## 38   s5024   Movie                                   Derren Brown: The Push
## 39   s5031 TV Show                                  Hitler's Circle of Evil
## 40   s5033 TV Show                              The Frankenstein Chronicles
## 41   s5058 TV Show                                              Retribution
## 42   s5075   Movie                                      Bad Day for the Cut
## 43   s5098 TV Show                                                 Lovesick
## 44   s5968   Movie                                                       89
## 45   s5999   Movie                                      2036 Origin Unknown
## 46   s6006   Movie                                        27: Gone Too Soon
## 47   s6150   Movie                                                      Amy
## 48   s6342 TV Show                                           Blue Planet II
## 49   s6352   Movie                        Bobby Robson: More Than a Manager
## 50   s6399 TV Show                 Cabins in the Wild with Dick Strawbridge
## 51   s6491 TV Show                                            Civilizations
## 52   s6586   Movie                                                Deathgrip
## 53   s6717   Movie                                               Ex Machina
## 54   s6864   Movie                                        God's Own Country
## 55   s6919   Movie                              Hans Zimmer: Live in Prague
## 56   s7026   Movie                                               Hungerford
## 57   s7043   Movie                                           I Am Vengeance
## 58   s7077   Movie                                                   Influx
## 59   s7081 TV Show                                    Inside The Freemasons
## 60   s7084 TV Show                                              Inst@famous
## 61   s7167   Movie                                             Kaleidoscope
## 62   s7399   Movie               Manolo: The Boy Who Made Shoes for Lizards
## 63   s7634   Movie                                        Oasis: Supersonic
## 64   s7847   Movie                                                Red Trees
## 65   s7865 TV Show                                         Revolting Rhymes
## 66   s8202   Movie                                  The Bad Education Movie
## 67   s8251 TV Show                                                 The Code
## 68   s8269   Movie                                         The Darkest Dawn
## 69   s8332 TV Show               The Great British Baking Show: Masterclass
## 70   s8447   Movie                                       The Parole Officer
## 71   s8531   Movie                                   The Tigers of Scotland
## 72   s8620   Movie             Treasures from the Wreck of the Unbelievable
##                         director
## 1               John Fortenberry
## 2                    Chris Bould
## 3                    Chris Bould
## 4                               
## 5                     Matt Askem
## 6                     Matt Askem
## 7                               
## 8                               
## 9                               
## 10                              
## 11                              
## 12                 Olaf de Fleur
## 13                              
## 14                     Eric Idle
## 15                     Will Yapp
## 16 Terry Hughes, Ian MacNaughton
## 17      Roger Graef, James Rogan
## 18                              
## 19                              
## 20                   Terry Jones
## 21               Ian MacNaughton
## 22                 Albert Sharpe
## 23                              
## 24                              
## 25                              
## 26                              
## 27                   Matt Palmer
## 28                              
## 29                              
## 30                   Peter Orton
## 31                              
## 32                              
## 33                     Joe Miale
## 34                              
## 35                  Dan Lucchesi
## 36                              
## 37               John L. Spencer
## 38                              
## 39                              
## 40                              
## 41                              
## 42                   Chris Baugh
## 43                              
## 44                              
## 45                 Hasraf Dulull
## 46             Simon Napier-Bell
## 47                  Asif Kapadia
## 48                              
## 49 Gabriel Clarke, Torquil Jones
## 50                              
## 51                              
## 52                   Clay Porter
## 53                  Alex Garland
## 54                   Francis Lee
## 55               Tim Van Someren
## 56                   Drew Casson
## 57                   Ross Boyask
## 58                    Luca Vullo
## 59                              
## 60                              
## 61                  Rupert Jones
## 62               Michael Roberts
## 63                Mat Whitecross
## 64                 Marina Willer
## 65    Jani Lachauer, Jakob Schuh
## 66                Elliot Hegarty
## 67                              
## 68                              
## 69                              
## 70                   John Duigan
## 71                  Leanne Gater
## 72                 Sam Hobkinson
##                                                                                                                                                                                                                                                                                         cast
## 1                                                                                                                                                                                                                                                                                 Bill Hicks
## 2                                                                                                                                                                                                                                                                                 Bill Hicks
## 3                                                                                                                                                                                                                                                                                 Bill Hicks
## 4                                                                                                                                                                                                                                                                               Gina Yashere
## 5                                                                                                                                                                                                                                                                 Tim Minchin, Jules Buckley
## 6                                                                                                                                                                                                                                                                                Tim Minchin
## 7                                                                                                                                      Allan Mustafa, Hugo Chegwin, Asim Chaudhry, Lily Brazier, Olivia Jasmine Edwards, Dan Sylvester, Steve Stamp, Ruth Bratt, George Keywood, Maria Louis
## 8                                                                                                                                                                                 Olivia Colman, Julian Barratt, Daniel Rigby, Sophia Di Martino, Leila Hoffman, Will Sharpe, Harriet Walter
## 9                                                                                                      Rupert Grint, Nick Frost, Don Johnson, Lindsay Lohan, Pippa Bennett-Warner, Marama Corlett, Karl Theobald, Belinda Stewart-Wilson, Camilla Beeput, Dustin Demri-Burns, Tolu Ogunmefun
## 10                                                                                                        Toni Collette, Steven Mackintosh, Zawe Ashton, Joe Hurst, Emma D'Arcy, Celeste Dring, William Ash, Royce Pierreson, Jeremy Swift, Anastasia Hille, Isis Hainsworth, Sophie Okonedo
## 11                                                                                                                                                                                                                                                                                          
## 12                                                                                                                                                                                                 Florence Pugh, Ben Lloyd-Hughes, Celia Imrie, James Cosmo, Scott Chambers, Georgina Bevan
## 13                                                                                                                                                                                        Hugh Bonneville, Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin
## 14                                                                                                                                                                                                                         John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin
## 15                                                                                                                                                                                                         Graham Chapman, Eric Idle, Terry Jones, Michael Palin, Terry Gilliam, John Cleese
## 16                                                                                                                                                                            Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Neil Innes, Carol Cleveland
## 17                                                                                                                                                                            John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Mike Myers, Graham Chapman, Stephen Hawking
## 18                                                                                                                                                                                                         Graham Chapman, Eric Idle, John Cleese, Michael Palin, Terry Gilliam, Terry Jones
## 19                                                                                                                                                                                                         John Cleese, Graham Chapman, Terry Jones, Eric Idle, Michael Palin, Terry Gilliam
## 20                                                                                                                                                                        Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Terence Bayler, Carol Cleveland
## 21                                                                                                                                                            Steve Martin, John Cleese, Graham Chapman, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Carol Cleveland, Connie Booth
## 22                                                                                                                                                                                                                                                                                          
## 23                                                                                                                                                                                                                                                                                          
## 24                                                                            Sorcha Groundsell, Percelle Ascott, Guy Pearce, Sam Hazeldine, Nadine Marshall, J?hannes Haukur J?hannesson, Laura Birn, Ingunn Beate \xa8\xaayen, Arthur Hughes, Trond Fausa, Lise Risom Olsen, Philip Wright
## 25                                                                                                                                                                                                                                                                                          
## 26                                                                                                                                                                                                                                                              Warren Bullock, Jane Bullock
## 27                                                                                                                                                                                                                          Jack Lowden, Martin McCann, Tony Curran, Ian Pirie, Cameron Jack
## 28                                                                                                                                                                                                                                                                                          
## 29                                                                                                                                                                                                                                                                              Derren Brown
## 30                                                                                                                                                                                                                                                                               Greg Davies
## 31                                                                                                                                                                                   Jim Howick, Samuel Anderson, Jonny Sweet, Nick Helm, Mary McCormack, Aimee-Ffion Edwards, Lolly Adefope
## 32 Suranne Jones, Bertie Carvel, Clare-Hope Ashitey, Cheryl Campbell, Jodie Comer, Victoria Hamilton, Martha Howe-Douglas, Adam James, Thusitha Jayasundera, Sara Stewart, Neil Stuke, Tom Taylor, Robert Pugh, Shazia Nicholls, Cian Barry, Megan Roberts, Charlie Cunniffe, Navin Chowdhry
## 33                                                                                                                          Lee Pace, B?r?nice Marlohe, Jason Flemyng, Sibulele Gcilitshana, Wandile Molebatsi, Sekoati Sk Tsubane, Leroy Gopal, Welile Nzunza, Patrick Bakoba, Tom Fairfoot
## 34                                                                                                                                                                                                                                                                              Donald Trump
## 35                                                                                                                                                                                                                                                                             James Acaster
## 36                                                                                                                       Lydia Wilson, Joel Fry, Brendan Coyle, James Frecheville, Claire Rushbrook, Joanna Scanlan, Pippa Haywood, Tara Fitzgerald, Richard Harrington, Sian Reese-Williams
## 37                                                                                                                                                                                                                                                                             Ricky Gervais
## 38                                                                                                                                                                                                                                                                              Derren Brown
## 39                                                                                                                                                                                                        Alisdair Simpson, Henrik J\xa9\xaargensen, James Lowe, Blake Scott, Peter Turnbull
## 40                                                                                                             Sean Bean, Tom Ward, Richie Campbell, Vanessa Kirby, Ed Stoppard, Ryan Sampson, Robbie Gee, Anna Maxwell Martin, Elliot Cowan, Charlie Creed-Miles, Eloise Smyth, Samuel West
## 41                                                                                                                                     Georgina Campbell, Joe Dempsie, Adrian Edmondson, Steve Evets, Laura Fraser, Julie Graham, John Lynch, Gary Lewis, Juliet Stevenson, Joanna Vanderham
## 42                                                                                                                                    Nigel O'Neill, Susan Lynch, J?zef Pawlowski, Stuart Graham, David Pearse, Brian Milligan, Anna Prochniak, Stella McCusker, Ian McElhinney, Lalor Roddy
## 43                                                                                                                                                                              Johnny Flynn, Antonia Thomas, Daniel Ings, Hannah Britland, Joshua McGuire, Richard Thomson, Jessica Ellerby
## 44                                                                                                                                                                                                                                                        Lee Dixon, Ian Wright, Paul Merson
## 45                                                                                                                                                                                                          Katee Sackhoff, Ray Fearon, Julie Cox, Steven Cree, David Tse, Joe David Walters
## 46                                                                                                                                                                                                                      Janis Joplin, Jimi Hendrix, Amy Winehouse, Jim Morrison, Kurt Cobain
## 47                                                                                                                                                                                                                                                             Amy Winehouse, Lauren Gilbert
## 48                                                                                                                                                                                                                                                                        David Attenborough
## 49                                                                                                                                                                                                                                                                              Bobby Robson
## 50                                                                                                                                                                                                                                                          Dick Strawbridge, William Hardie
## 51                                                                                                                                                                                                                                                                                          
## 52                                                                                                                                                       Brendan Fairclough, Olly Wilkins, Kyle Jameson, Andrew Neethling, Nico Vink, Ryan Howard, Sam Hill, Josh Bryceland, Brandon Semenuk
## 53                                                                                                                 Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Claire Selby, Symara Templeman, Gana Bayarsaikhan, Tiffany Pisani, Corey Johnson, Evie Wray, Deborah Rosan
## 54                                                                                                                                                                                                                                      Josh O'Connor, Alec Secareanu, Ian Hart, Gemma Jones
## 55                                                                                                                                                                                                                                                                               Hans Zimmer
## 56                                                                                                                                                                                            Drew Casson, Georgia Bradley, Sam Carter, Tom Scarlett, Nigel Morgan, Colin Stark, Kitty Speed
## 57                                                                                                                                                                                                         Stu Bennett, Anna Shaffer, Mark Griffin, Bryan Larkin, Kevin Leslie, Gary Daniels
## 58                                                                                                                                                                                                                                                                                          
## 59                                                                                                                                                                                                                                                                                          
## 60                                                                                                                                                                                                                                                                                          
## 61                                                                                                                                                                   Toby Jones, Anne Reid, Sinead Matthews, Cecilia Noble, Karl Johnson, Frederick Schmidt, Deborah Findlay, Manjinder Virk
## 62                                                                                                             Manolo Blahnik, Anna Wintour, Andr? Leon Talley, Paloma Picasso, Candace Bushnell, Iman, Rihanna, Naomi Campbell, Isaac Mizrahi, Rupert Everett, Sofia Coppola, John Galliano
## 63                                                                                                                                                                                                                          Oasis, Alan McGee, Paul McGuigan, Liam Gallagher, Noel Gallagher
## 64                                                                                                                                                                                                                                                                         Tim Piggott-Smith
## 65                                                                                                                                                        Rob Brydon, Bertie Carvel, Gemma Chan, Dominic West, Isaac Hempstead Wright, Bel Powley, Tamsin Greig, Rose Leslie, David Walliams
## 66                                                                                                                                  Jack Whitehall, Joanna Scanlan, Iain Glen, Ethan Lawrence, Layton Williams, Kae Alexander, Weruche Opia, Nikki Runeckles, Charlie Wernham, Jack Binstead
## 67                                                                                                                                                                                                                                                                          Marcus du Sautoy
## 68                                                                                                                                                                                                                                                                                          
## 69                                                                                                                                                                                                                                                                Mary Berry, Paul Hollywood
## 70                                                                                                                                             Steve Coogan, Emma Gilmour, Susan Jane Tanner, Iain Mitchell, James Smith, Om Puri, Steven Waddington, Ben Miller, Lena Headey, Jenny Agutter
## 71                                                                                                                                                                                                                                                                                 Iain Glen
## 72                                                                                                                                                                                                                                                                                          
##           country date_added release_year rating  duration
## 1  United Kingdom  31-Dec-18         1991  TV-MA    28 min
## 2  United Kingdom  31-Dec-18         1992  TV-MA    61 min
## 3  United Kingdom  31-Dec-18         1993  TV-MA    56 min
## 4  United Kingdom  31-Dec-18         2008  TV-MA    58 min
## 5  United Kingdom  31-Dec-18         2011  TV-MA   146 min
## 6  United Kingdom  31-Dec-18         2008  TV-MA   127 min
## 7  United Kingdom  22-Dec-18         2018  TV-MA 5 Seasons
## 8  United Kingdom  15-Dec-18         2018  TV-MA 2 Seasons
## 9  United Kingdom  23-Nov-18         2018  TV-MA 2 Seasons
## 10 United Kingdom  19-Oct-18         2018  TV-MA  1 Season
## 11 United Kingdom  15-Oct-18         2018  TV-MA  1 Season
## 12 United Kingdom  05-Oct-18         2018  TV-MA    89 min
## 13 United Kingdom  02-Oct-18         2014  TV-MA  1 Season
## 14 United Kingdom  02-Oct-18         2014  TV-MA   137 min
## 15 United Kingdom  02-Oct-18         2000  TV-MA    56 min
## 16 United Kingdom  02-Oct-18         1982      R    80 min
## 17 United Kingdom  02-Oct-18         2014  TV-MA    94 min
## 18 United Kingdom  02-Oct-18         2009  TV-MA  1 Season
## 19 United Kingdom  02-Oct-18         1974  TV-14 4 Seasons
## 20 United Kingdom  02-Oct-18         1979      R    94 min
## 21 United Kingdom  02-Oct-18         1989  TV-14    72 min
## 22 United Kingdom  02-Oct-18         2013  TV-MA    60 min
## 23 United Kingdom  01-Oct-18         2018  TV-14  1 Season
## 24 United Kingdom  24-Aug-18         2018  TV-MA  1 Season
## 25 United Kingdom  20-Jul-18         2018  TV-PG  1 Season
## 26 United Kingdom  10-Jul-18         2018  TV-MA 2 Seasons
## 27 United Kingdom  29-Jun-18         2018  TV-MA   101 min
## 28 United Kingdom  29-Jun-18         2018  TV-MA  1 Season
## 29 United Kingdom  22-Jun-18         2018  TV-MA    74 min
## 30 United Kingdom  10-Apr-18         2018  TV-MA    66 min
## 31 United Kingdom  01-Apr-18         2017  TV-MA  1 Season
## 32 United Kingdom  31-Mar-18         2017  TV-MA 2 Seasons
## 33 United Kingdom  31-Mar-18         2017      R    87 min
## 34 United Kingdom  30-Mar-18         2018  TV-14  1 Season
## 35 United Kingdom  27-Mar-18         2018  TV-14  1 Season
## 36 United Kingdom  23-Mar-18         2018  TV-MA  1 Season
## 37 United Kingdom  13-Mar-18         2018  TV-MA    79 min
## 38 United Kingdom  27-Feb-18         2018  TV-MA    69 min
## 39 United Kingdom  22-Feb-18         2017  TV-14  1 Season
## 40 United Kingdom  20-Feb-18         2017  TV-MA 2 Seasons
## 41 United Kingdom  30-Jan-18         2016  TV-MA  1 Season
## 42 United Kingdom  18-Jan-18         2017  TV-MA    99 min
## 43 United Kingdom  01-Jan-18         2018  TV-MA 3 Seasons
## 44 United Kingdom  16-May-18         2017  TV-PG    87 min
## 45 United Kingdom  20-Dec-18         2018  TV-14    95 min
## 46 United Kingdom  01-May-18         2017  TV-MA    70 min
## 47 United Kingdom  26-Jul-18         2015      R   128 min
## 48 United Kingdom  03-Dec-18         2017   TV-G  1 Season
## 49 United Kingdom  01-Dec-18         2018  TV-14    99 min
## 50 United Kingdom  15-Sep-18         2017  TV-PG  1 Season
## 51 United Kingdom  01-Oct-18         2018  TV-14  1 Season
## 52 United Kingdom  01-Mar-18         2017  TV-MA    53 min
## 53 United Kingdom  26-Jul-18         2015      R   108 min
## 54 United Kingdom  01-May-18         2017  TV-MA   105 min
## 55 United Kingdom  01-Mar-18         2017   TV-G   138 min
## 56 United Kingdom  23-Jun-18         2014  TV-MA    79 min
## 57 United Kingdom  22-Dec-18         2018      R    93 min
## 58 United Kingdom  01-Apr-18         2016  TV-PG    90 min
## 59 United Kingdom  15-Sep-18         2017  TV-MA  1 Season
## 60 United Kingdom  31-Dec-18         2018  TV-MA  1 Season
## 61 United Kingdom  08-May-18         2016  TV-MA    99 min
## 62 United Kingdom  15-Jan-18         2017  TV-MA    89 min
## 63 United Kingdom  28-Dec-18         2016      R   122 min
## 64 United Kingdom  24-Mar-18         2017  TV-PG    80 min
## 65 United Kingdom  01-Feb-18         2017  TV-PG  1 Season
## 66 United Kingdom  15-Dec-18         2015  TV-MA    87 min
## 67 United Kingdom  01-Feb-18         2011  TV-PG  1 Season
## 68 United Kingdom  23-Jun-18         2016  TV-MA    75 min
## 69 United Kingdom  01-Dec-18         2018  TV-PG 4 Seasons
## 70 United Kingdom  01-Aug-18         2001      R    94 min
## 71 United Kingdom  01-Nov-18         2017   TV-G    58 min
## 72 United Kingdom  01-Jan-18         2017   TV-G    82 min
##                                                                 listed_in
## 1                                                         Stand-Up Comedy
## 2                                                         Stand-Up Comedy
## 3                                                         Stand-Up Comedy
## 4                                                         Stand-Up Comedy
## 5                                       Music & Musicals, Stand-Up Comedy
## 6                                       Music & Musicals, Stand-Up Comedy
## 7                                           British TV Shows, TV Comedies
## 8                   British TV Shows, International TV Shows, TV Comedies
## 9                   British TV Shows, International TV Shows, TV Comedies
## 10            British TV Shows, International TV Shows, Romantic TV Shows
## 11                   British TV Shows, International TV Shows, Reality TV
## 12                                               Horror Movies, Thrillers
## 13                              British TV Shows, Docuseries, TV Comedies
## 14                                                               Comedies
## 15                                                Comedies, Documentaries
## 16                                                               Comedies
## 17                                                          Documentaries
## 18                                           British TV Shows, Docuseries
## 19            British TV Shows, Classic & Cult TV, International TV Shows
## 20                                  Classic Movies, Comedies, Cult Movies
## 21                                                               Comedies
## 22                                                          Documentaries
## 23                   British TV Shows, International TV Shows, Reality TV
## 24            British TV Shows, International TV Shows, Romantic TV Shows
## 25                   British TV Shows, International TV Shows, Reality TV
## 26                   British TV Shows, International TV Shows, Reality TV
## 27                                Dramas, International Movies, Thrillers
## 28                   British TV Shows, International TV Shows, Reality TV
## 29                                                   International Movies
## 30                                                        Stand-Up Comedy
## 31                  British TV Shows, International TV Shows, TV Comedies
## 32            British TV Shows, International TV Shows, Romantic TV Shows
## 33                                   Action & Adventure, Sci-Fi & Fantasy
## 34                                                             Docuseries
## 35 British TV Shows, International TV Shows, Stand-Up Comedy & Talk Shows
## 36                    British TV Shows, International TV Shows, TV Dramas
## 37                                                        Stand-Up Comedy
## 38                                                                 Movies
## 39                   British TV Shows, Docuseries, International TV Shows
## 40               British TV Shows, Crime TV Shows, International TV Shows
## 41               British TV Shows, Crime TV Shows, International TV Shows
## 42                    Independent Movies, International Movies, Thrillers
## 43            British TV Shows, International TV Shows, Romantic TV Shows
## 44                                                          Sports Movies
## 45                                                       Sci-Fi & Fantasy
## 46                                                          Documentaries
## 47                  Documentaries, International Movies, Music & Musicals
## 48                      British TV Shows, Docuseries, Science & Nature TV
## 49                     Documentaries, International Movies, Sports Movies
## 50                   British TV Shows, International TV Shows, Reality TV
## 51                                           British TV Shows, Docuseries
## 52                                    International Movies, Sports Movies
## 53                       Dramas, Independent Movies, International Movies
## 54                       Dramas, Independent Movies, International Movies
## 55                                 International Movies, Music & Musicals
## 56                Horror Movies, Independent Movies, International Movies
## 57                                                     Action & Adventure
## 58                                    Documentaries, International Movies
## 59                   British TV Shows, Docuseries, International TV Shows
## 60                                                             Reality TV
## 61                                                              Thrillers
## 62                                    Documentaries, International Movies
## 63                  Documentaries, International Movies, Music & Musicals
## 64                                    Documentaries, International Movies
## 65                                             British TV Shows, Kids' TV
## 66                                                               Comedies
## 67                   British TV Shows, Docuseries, International TV Shows
## 68           Action & Adventure, Independent Movies, International Movies
## 69                                           British TV Shows, Reality TV
## 70                                           Action & Adventure, Comedies
## 71                                                          Documentaries
## 72                            Documentaries, Dramas, International Movies
##           ymd
## 1  2018-12-31
## 2  2018-12-31
## 3  2018-12-31
## 4  2018-12-31
## 5  2018-12-31
## 6  2018-12-31
## 7  2018-12-22
## 8  2018-12-15
## 9  2018-11-23
## 10 2018-10-19
## 11 2018-10-15
## 12 2018-10-05
## 13 2018-10-02
## 14 2018-10-02
## 15 2018-10-02
## 16 2018-10-02
## 17 2018-10-02
## 18 2018-10-02
## 19 2018-10-02
## 20 2018-10-02
## 21 2018-10-02
## 22 2018-10-02
## 23 2018-10-01
## 24 2018-08-24
## 25 2018-07-20
## 26 2018-07-10
## 27 2018-06-29
## 28 2018-06-29
## 29 2018-06-22
## 30 2018-04-10
## 31 2018-04-01
## 32 2018-03-31
## 33 2018-03-31
## 34 2018-03-30
## 35 2018-03-27
## 36 2018-03-23
## 37 2018-03-13
## 38 2018-02-27
## 39 2018-02-22
## 40 2018-02-20
## 41 2018-01-30
## 42 2018-01-18
## 43 2018-01-01
## 44 2018-05-16
## 45 2018-12-20
## 46 2018-05-01
## 47 2018-07-26
## 48 2018-12-03
## 49 2018-12-01
## 50 2018-09-15
## 51 2018-10-01
## 52 2018-03-01
## 53 2018-07-26
## 54 2018-05-01
## 55 2018-03-01
## 56 2018-06-23
## 57 2018-12-22
## 58 2018-04-01
## 59 2018-09-15
## 60 2018-12-31
## 61 2018-05-08
## 62 2018-01-15
## 63 2018-12-28
## 64 2018-03-24
## 65 2018-02-01
## 66 2018-12-15
## 67 2018-02-01
## 68 2018-06-23
## 69 2018-12-01
## 70 2018-08-01
## 71 2018-11-01
## 72 2018-01-01
#위에 수식은 몇개 데이트 형식이 달라서 오류가 난다 해결하는 아래 루브리 데이트 기능

df$y2<-parse_date_time(df$date_added,orders=c("mdy","dmy"),train = F)
df %>% filter(country=="United Kingdom") %>% filter(y2>='2018-01-01'&y2<='2018-12-31')
##    show_id    type                                                    title
## 1    s4265 TV Show                                   People Just Do Nothing
## 2    s4297 TV Show                                                  Flowers
## 3    s4368 TV Show                                                Sick Note
## 4    s4502 TV Show                                               Wanderlust
## 5    s4509 TV Show                                            Stunt Science
## 6    s4533   Movie                                               Malevolent
## 7    s4543 TV Show                          Monty Python Best Bits (mostly)
## 8    s4545   Movie         Monty Python Live (Mostly): One Down, Five to Go
## 9    s4546   Movie                   Monty Python: Before the Flying Circus
## 10   s4548   Movie                 Monty Python: Live at The Hollywood Bowl
## 11   s4549   Movie                        Monty Python: The Meaning of Live
## 12   s4550 TV Show                          Monty Python's Almost the Truth
## 13   s4552 TV Show                             Monty Python's Flying Circus
## 14   s4553   Movie                             Monty Python's Life of Brian
## 15   s4555   Movie Parrot Sketch Not Included: Twenty Years of Monty Python
## 16   s4556   Movie                              The Meaning of Monty Python
## 17   s4609 TV Show                                  Three Wives One Husband
## 18   s4690 TV Show                                            The Innocents
## 19   s4759 TV Show                                        Amazing Interiors
## 20   s4778 TV Show                                            Baby Ballroom
## 21   s4807   Movie                                                  Calibre
## 22   s4808 TV Show       Churchill\xa1\xafs Secret Agents: The New Recruits
## 23   s4821   Movie                                    Derren Brown: Miracle
## 24   s4933   Movie                       Greg Davies: You Magnificent Beast
## 25   s4952 TV Show                                                   Loaded
## 26   s4958 TV Show                                            Doctor Foster
## 27   s4959   Movie                                                   Revolt
## 28   s4968 TV Show                                 Trump: An American Dream
## 29   s4969 TV Show                                James Acaster: Repertoire
## 30   s4974 TV Show                                                  Requiem
## 31   s4990   Movie                                  Ricky Gervais: Humanity
## 32   s5024   Movie                                   Derren Brown: The Push
## 33   s5031 TV Show                                  Hitler's Circle of Evil
## 34   s5033 TV Show                              The Frankenstein Chronicles
## 35   s5058 TV Show                                              Retribution
## 36   s5075   Movie                                      Bad Day for the Cut
## 37   s5098 TV Show                                                 Lovesick
## 38   s5968   Movie                                                       89
## 39   s5999   Movie                                      2036 Origin Unknown
## 40   s6006   Movie                                        27: Gone Too Soon
## 41   s6150   Movie                                                      Amy
## 42   s6214 TV Show                                            Bad Education
## 43   s6342 TV Show                                           Blue Planet II
## 44   s6352   Movie                        Bobby Robson: More Than a Manager
## 45   s6399 TV Show                 Cabins in the Wild with Dick Strawbridge
## 46   s6491 TV Show                                            Civilizations
## 47   s6550 TV Show                                               Dad's Army
## 48   s6586   Movie                                                Deathgrip
## 49   s6717   Movie                                               Ex Machina
## 50   s6743 TV Show                                             Father Brown
## 51   s6864   Movie                                        God's Own Country
## 52   s6895 TV Show                          Great Interior Design Challenge
## 53   s6919   Movie                              Hans Zimmer: Live in Prague
## 54   s7026   Movie                                               Hungerford
## 55   s7043   Movie                                           I Am Vengeance
## 56   s7077   Movie                                                   Influx
## 57   s7081 TV Show                                    Inside The Freemasons
## 58   s7167   Movie                                             Kaleidoscope
## 59   s7399   Movie               Manolo: The Boy Who Made Shoes for Lizards
## 60   s7634   Movie                                        Oasis: Supersonic
## 61   s7847   Movie                                                Red Trees
## 62   s7865 TV Show                                         Revolting Rhymes
## 63   s8202   Movie                                  The Bad Education Movie
## 64   s8251 TV Show                                                 The Code
## 65   s8269   Movie                                         The Darkest Dawn
## 66   s8332 TV Show               The Great British Baking Show: Masterclass
## 67   s8358 TV Show                                         The Inbetweeners
## 68   s8447   Movie                                       The Parole Officer
## 69   s8531   Movie                                   The Tigers of Scotland
## 70   s8620   Movie             Treasures from the Wreck of the Unbelievable
##                         director
## 1                               
## 2                               
## 3                               
## 4                               
## 5                               
## 6                  Olaf de Fleur
## 7                               
## 8                      Eric Idle
## 9                      Will Yapp
## 10 Terry Hughes, Ian MacNaughton
## 11      Roger Graef, James Rogan
## 12                              
## 13                              
## 14                   Terry Jones
## 15               Ian MacNaughton
## 16                 Albert Sharpe
## 17                              
## 18                              
## 19                              
## 20                              
## 21                   Matt Palmer
## 22                              
## 23                              
## 24                   Peter Orton
## 25                              
## 26                              
## 27                     Joe Miale
## 28                              
## 29                  Dan Lucchesi
## 30                              
## 31               John L. Spencer
## 32                              
## 33                              
## 34                              
## 35                              
## 36                   Chris Baugh
## 37                              
## 38                              
## 39                 Hasraf Dulull
## 40             Simon Napier-Bell
## 41                  Asif Kapadia
## 42                              
## 43                              
## 44 Gabriel Clarke, Torquil Jones
## 45                              
## 46                              
## 47                              
## 48                   Clay Porter
## 49                  Alex Garland
## 50                    Ian Barber
## 51                   Francis Lee
## 52                              
## 53               Tim Van Someren
## 54                   Drew Casson
## 55                   Ross Boyask
## 56                    Luca Vullo
## 57                              
## 58                  Rupert Jones
## 59               Michael Roberts
## 60                Mat Whitecross
## 61                 Marina Willer
## 62    Jani Lachauer, Jakob Schuh
## 63                Elliot Hegarty
## 64                              
## 65                              
## 66                              
## 67                              
## 68                   John Duigan
## 69                  Leanne Gater
## 70                 Sam Hobkinson
##                                                                                                                                                                                                                                                                                         cast
## 1                                                                                                                                      Allan Mustafa, Hugo Chegwin, Asim Chaudhry, Lily Brazier, Olivia Jasmine Edwards, Dan Sylvester, Steve Stamp, Ruth Bratt, George Keywood, Maria Louis
## 2                                                                                                                                                                                 Olivia Colman, Julian Barratt, Daniel Rigby, Sophia Di Martino, Leila Hoffman, Will Sharpe, Harriet Walter
## 3                                                                                                      Rupert Grint, Nick Frost, Don Johnson, Lindsay Lohan, Pippa Bennett-Warner, Marama Corlett, Karl Theobald, Belinda Stewart-Wilson, Camilla Beeput, Dustin Demri-Burns, Tolu Ogunmefun
## 4                                                                                                         Toni Collette, Steven Mackintosh, Zawe Ashton, Joe Hurst, Emma D'Arcy, Celeste Dring, William Ash, Royce Pierreson, Jeremy Swift, Anastasia Hille, Isis Hainsworth, Sophie Okonedo
## 5                                                                                                                                                                                                                                                                                           
## 6                                                                                                                                                                                                  Florence Pugh, Ben Lloyd-Hughes, Celia Imrie, James Cosmo, Scott Chambers, Georgina Bevan
## 7                                                                                                                                                                                         Hugh Bonneville, Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin
## 8                                                                                                                                                                                                                          John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin
## 9                                                                                                                                                                                                          Graham Chapman, Eric Idle, Terry Jones, Michael Palin, Terry Gilliam, John Cleese
## 10                                                                                                                                                                            Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Neil Innes, Carol Cleveland
## 11                                                                                                                                                                            John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Mike Myers, Graham Chapman, Stephen Hawking
## 12                                                                                                                                                                                                         Graham Chapman, Eric Idle, John Cleese, Michael Palin, Terry Gilliam, Terry Jones
## 13                                                                                                                                                                                                         John Cleese, Graham Chapman, Terry Jones, Eric Idle, Michael Palin, Terry Gilliam
## 14                                                                                                                                                                        Graham Chapman, John Cleese, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Terence Bayler, Carol Cleveland
## 15                                                                                                                                                            Steve Martin, John Cleese, Graham Chapman, Terry Gilliam, Eric Idle, Terry Jones, Michael Palin, Carol Cleveland, Connie Booth
## 16                                                                                                                                                                                                                                                                                          
## 17                                                                                                                                                                                                                                                                                          
## 18                                                                            Sorcha Groundsell, Percelle Ascott, Guy Pearce, Sam Hazeldine, Nadine Marshall, J?hannes Haukur J?hannesson, Laura Birn, Ingunn Beate \xa8\xaayen, Arthur Hughes, Trond Fausa, Lise Risom Olsen, Philip Wright
## 19                                                                                                                                                                                                                                                                                          
## 20                                                                                                                                                                                                                                                              Warren Bullock, Jane Bullock
## 21                                                                                                                                                                                                                          Jack Lowden, Martin McCann, Tony Curran, Ian Pirie, Cameron Jack
## 22                                                                                                                                                                                                                                                                                          
## 23                                                                                                                                                                                                                                                                              Derren Brown
## 24                                                                                                                                                                                                                                                                               Greg Davies
## 25                                                                                                                                                                                   Jim Howick, Samuel Anderson, Jonny Sweet, Nick Helm, Mary McCormack, Aimee-Ffion Edwards, Lolly Adefope
## 26 Suranne Jones, Bertie Carvel, Clare-Hope Ashitey, Cheryl Campbell, Jodie Comer, Victoria Hamilton, Martha Howe-Douglas, Adam James, Thusitha Jayasundera, Sara Stewart, Neil Stuke, Tom Taylor, Robert Pugh, Shazia Nicholls, Cian Barry, Megan Roberts, Charlie Cunniffe, Navin Chowdhry
## 27                                                                                                                          Lee Pace, B?r?nice Marlohe, Jason Flemyng, Sibulele Gcilitshana, Wandile Molebatsi, Sekoati Sk Tsubane, Leroy Gopal, Welile Nzunza, Patrick Bakoba, Tom Fairfoot
## 28                                                                                                                                                                                                                                                                              Donald Trump
## 29                                                                                                                                                                                                                                                                             James Acaster
## 30                                                                                                                       Lydia Wilson, Joel Fry, Brendan Coyle, James Frecheville, Claire Rushbrook, Joanna Scanlan, Pippa Haywood, Tara Fitzgerald, Richard Harrington, Sian Reese-Williams
## 31                                                                                                                                                                                                                                                                             Ricky Gervais
## 32                                                                                                                                                                                                                                                                              Derren Brown
## 33                                                                                                                                                                                                        Alisdair Simpson, Henrik J\xa9\xaargensen, James Lowe, Blake Scott, Peter Turnbull
## 34                                                                                                             Sean Bean, Tom Ward, Richie Campbell, Vanessa Kirby, Ed Stoppard, Ryan Sampson, Robbie Gee, Anna Maxwell Martin, Elliot Cowan, Charlie Creed-Miles, Eloise Smyth, Samuel West
## 35                                                                                                                                     Georgina Campbell, Joe Dempsie, Adrian Edmondson, Steve Evets, Laura Fraser, Julie Graham, John Lynch, Gary Lewis, Juliet Stevenson, Joanna Vanderham
## 36                                                                                                                                    Nigel O'Neill, Susan Lynch, J?zef Pawlowski, Stuart Graham, David Pearse, Brian Milligan, Anna Prochniak, Stella McCusker, Ian McElhinney, Lalor Roddy
## 37                                                                                                                                                                              Johnny Flynn, Antonia Thomas, Daniel Ings, Hannah Britland, Joshua McGuire, Richard Thomson, Jessica Ellerby
## 38                                                                                                                                                                                                                                                        Lee Dixon, Ian Wright, Paul Merson
## 39                                                                                                                                                                                                          Katee Sackhoff, Ray Fearon, Julie Cox, Steven Cree, David Tse, Joe David Walters
## 40                                                                                                                                                                                                                      Janis Joplin, Jimi Hendrix, Amy Winehouse, Jim Morrison, Kurt Cobain
## 41                                                                                                                                                                                                                                                             Amy Winehouse, Lauren Gilbert
## 42                                                                                                  Jack Whitehall, Mathew Horne, Sarah Solemani, Michelle Gomez, Nikki Runeckles, Kae Alexander, Layton Williams, Ethan Lawrence, Charlie Wernham, Jack Binstead, Jack Bence, Harry Enfield
## 43                                                                                                                                                                                                                                                                        David Attenborough
## 44                                                                                                                                                                                                                                                                              Bobby Robson
## 45                                                                                                                                                                                                                                                          Dick Strawbridge, William Hardie
## 46                                                                                                                                                                                                                                                                                          
## 47                                                                                                                                                                             Arthur Lowe, John Le Mesurier, Clive Dunn, John Laurie, Arnold Ridley, Ian Lavender, James Beck, Bill Pertwee
## 48                                                                                                                                                       Brendan Fairclough, Olly Wilkins, Kyle Jameson, Andrew Neethling, Nico Vink, Ryan Howard, Sam Hill, Josh Bryceland, Brandon Semenuk
## 49                                                                                                                 Domhnall Gleeson, Alicia Vikander, Oscar Isaac, Sonoya Mizuno, Claire Selby, Symara Templeman, Gana Bayarsaikhan, Tiffany Pisani, Corey Johnson, Evie Wray, Deborah Rosan
## 50                                                                                                                                                                                           Mark Williams, Sorcha Cusack, Nancy Carroll, Alex Price, Hugo Speer, Tom Chambers, Keith Osborn
## 51                                                                                                                                                                                                                                      Josh O'Connor, Alec Secareanu, Ian Hart, Gemma Jones
## 52                                                                                                                                                                                                                                             Tom Dyckhoff, Daniel Hopwood, Sophie Robinson
## 53                                                                                                                                                                                                                                                                               Hans Zimmer
## 54                                                                                                                                                                                            Drew Casson, Georgia Bradley, Sam Carter, Tom Scarlett, Nigel Morgan, Colin Stark, Kitty Speed
## 55                                                                                                                                                                                                         Stu Bennett, Anna Shaffer, Mark Griffin, Bryan Larkin, Kevin Leslie, Gary Daniels
## 56                                                                                                                                                                                                                                                                                          
## 57                                                                                                                                                                                                                                                                                          
## 58                                                                                                                                                                   Toby Jones, Anne Reid, Sinead Matthews, Cecilia Noble, Karl Johnson, Frederick Schmidt, Deborah Findlay, Manjinder Virk
## 59                                                                                                             Manolo Blahnik, Anna Wintour, Andr? Leon Talley, Paloma Picasso, Candace Bushnell, Iman, Rihanna, Naomi Campbell, Isaac Mizrahi, Rupert Everett, Sofia Coppola, John Galliano
## 60                                                                                                                                                                                                                          Oasis, Alan McGee, Paul McGuigan, Liam Gallagher, Noel Gallagher
## 61                                                                                                                                                                                                                                                                         Tim Piggott-Smith
## 62                                                                                                                                                        Rob Brydon, Bertie Carvel, Gemma Chan, Dominic West, Isaac Hempstead Wright, Bel Powley, Tamsin Greig, Rose Leslie, David Walliams
## 63                                                                                                                                  Jack Whitehall, Joanna Scanlan, Iain Glen, Ethan Lawrence, Layton Williams, Kae Alexander, Weruche Opia, Nikki Runeckles, Charlie Wernham, Jack Binstead
## 64                                                                                                                                                                                                                                                                          Marcus du Sautoy
## 65                                                                                                                                                                                                                                                                                          
## 66                                                                                                                                                                                                                                                                Mary Berry, Paul Hollywood
## 67                                                                                                                                 Simon Bird, James Buckley, Blake Harrison, Joe Thomas, Greg Davies, Emily Head, Martin Trenaman, Belinda Stewart-Wilson, Robin Weaver, Henry Lloyd-Hughes
## 68                                                                                                                                             Steve Coogan, Emma Gilmour, Susan Jane Tanner, Iain Mitchell, James Smith, Om Puri, Steven Waddington, Ben Miller, Lena Headey, Jenny Agutter
## 69                                                                                                                                                                                                                                                                                 Iain Glen
## 70                                                                                                                                                                                                                                                                                          
##           country         date_added release_year rating   duration
## 1  United Kingdom          22-Dec-18         2018  TV-MA  5 Seasons
## 2  United Kingdom          15-Dec-18         2018  TV-MA  2 Seasons
## 3  United Kingdom          23-Nov-18         2018  TV-MA  2 Seasons
## 4  United Kingdom          19-Oct-18         2018  TV-MA   1 Season
## 5  United Kingdom          15-Oct-18         2018  TV-MA   1 Season
## 6  United Kingdom          05-Oct-18         2018  TV-MA     89 min
## 7  United Kingdom          02-Oct-18         2014  TV-MA   1 Season
## 8  United Kingdom          02-Oct-18         2014  TV-MA    137 min
## 9  United Kingdom          02-Oct-18         2000  TV-MA     56 min
## 10 United Kingdom          02-Oct-18         1982      R     80 min
## 11 United Kingdom          02-Oct-18         2014  TV-MA     94 min
## 12 United Kingdom          02-Oct-18         2009  TV-MA   1 Season
## 13 United Kingdom          02-Oct-18         1974  TV-14  4 Seasons
## 14 United Kingdom          02-Oct-18         1979      R     94 min
## 15 United Kingdom          02-Oct-18         1989  TV-14     72 min
## 16 United Kingdom          02-Oct-18         2013  TV-MA     60 min
## 17 United Kingdom          01-Oct-18         2018  TV-14   1 Season
## 18 United Kingdom          24-Aug-18         2018  TV-MA   1 Season
## 19 United Kingdom          20-Jul-18         2018  TV-PG   1 Season
## 20 United Kingdom          10-Jul-18         2018  TV-MA  2 Seasons
## 21 United Kingdom          29-Jun-18         2018  TV-MA    101 min
## 22 United Kingdom          29-Jun-18         2018  TV-MA   1 Season
## 23 United Kingdom          22-Jun-18         2018  TV-MA     74 min
## 24 United Kingdom          10-Apr-18         2018  TV-MA     66 min
## 25 United Kingdom          01-Apr-18         2017  TV-MA   1 Season
## 26 United Kingdom          31-Mar-18         2017  TV-MA  2 Seasons
## 27 United Kingdom          31-Mar-18         2017      R     87 min
## 28 United Kingdom          30-Mar-18         2018  TV-14   1 Season
## 29 United Kingdom          27-Mar-18         2018  TV-14   1 Season
## 30 United Kingdom          23-Mar-18         2018  TV-MA   1 Season
## 31 United Kingdom          13-Mar-18         2018  TV-MA     79 min
## 32 United Kingdom          27-Feb-18         2018  TV-MA     69 min
## 33 United Kingdom          22-Feb-18         2017  TV-14   1 Season
## 34 United Kingdom          20-Feb-18         2017  TV-MA  2 Seasons
## 35 United Kingdom          30-Jan-18         2016  TV-MA   1 Season
## 36 United Kingdom          18-Jan-18         2017  TV-MA     99 min
## 37 United Kingdom          01-Jan-18         2018  TV-MA  3 Seasons
## 38 United Kingdom          16-May-18         2017  TV-PG     87 min
## 39 United Kingdom          20-Dec-18         2018  TV-14     95 min
## 40 United Kingdom          01-May-18         2017  TV-MA     70 min
## 41 United Kingdom          26-Jul-18         2015      R    128 min
## 42 United Kingdom  December 15, 2018         2014  TV-MA  3 Seasons
## 43 United Kingdom          03-Dec-18         2017   TV-G   1 Season
## 44 United Kingdom          01-Dec-18         2018  TV-14     99 min
## 45 United Kingdom          15-Sep-18         2017  TV-PG   1 Season
## 46 United Kingdom          01-Oct-18         2018  TV-14   1 Season
## 47 United Kingdom     March 31, 2018         1977  TV-PG 10 Seasons
## 48 United Kingdom          01-Mar-18         2017  TV-MA     53 min
## 49 United Kingdom          26-Jul-18         2015      R    108 min
## 50 United Kingdom     March 31, 2018         2017  TV-14  6 Seasons
## 51 United Kingdom          01-May-18         2017  TV-MA    105 min
## 52 United Kingdom   December 1, 2018         2016  TV-PG  2 Seasons
## 53 United Kingdom          01-Mar-18         2017   TV-G    138 min
## 54 United Kingdom          23-Jun-18         2014  TV-MA     79 min
## 55 United Kingdom          22-Dec-18         2018      R     93 min
## 56 United Kingdom          01-Apr-18         2016  TV-PG     90 min
## 57 United Kingdom          15-Sep-18         2017  TV-MA   1 Season
## 58 United Kingdom          08-May-18         2016  TV-MA     99 min
## 59 United Kingdom          15-Jan-18         2017  TV-MA     89 min
## 60 United Kingdom          28-Dec-18         2016      R    122 min
## 61 United Kingdom          24-Mar-18         2017  TV-PG     80 min
## 62 United Kingdom          01-Feb-18         2017  TV-PG   1 Season
## 63 United Kingdom          15-Dec-18         2015  TV-MA     87 min
## 64 United Kingdom          01-Feb-18         2011  TV-PG   1 Season
## 65 United Kingdom          23-Jun-18         2016  TV-MA     75 min
## 66 United Kingdom          01-Dec-18         2018  TV-PG  4 Seasons
## 67 United Kingdom    January 1, 2018         2010  TV-MA  3 Seasons
## 68 United Kingdom          01-Aug-18         2001      R     94 min
## 69 United Kingdom          01-Nov-18         2017   TV-G     58 min
## 70 United Kingdom          01-Jan-18         2017   TV-G     82 min
##                                                                 listed_in
## 1                                           British TV Shows, TV Comedies
## 2                   British TV Shows, International TV Shows, TV Comedies
## 3                   British TV Shows, International TV Shows, TV Comedies
## 4             British TV Shows, International TV Shows, Romantic TV Shows
## 5                    British TV Shows, International TV Shows, Reality TV
## 6                                                Horror Movies, Thrillers
## 7                               British TV Shows, Docuseries, TV Comedies
## 8                                                                Comedies
## 9                                                 Comedies, Documentaries
## 10                                                               Comedies
## 11                                                          Documentaries
## 12                                           British TV Shows, Docuseries
## 13            British TV Shows, Classic & Cult TV, International TV Shows
## 14                                  Classic Movies, Comedies, Cult Movies
## 15                                                               Comedies
## 16                                                          Documentaries
## 17                   British TV Shows, International TV Shows, Reality TV
## 18            British TV Shows, International TV Shows, Romantic TV Shows
## 19                   British TV Shows, International TV Shows, Reality TV
## 20                   British TV Shows, International TV Shows, Reality TV
## 21                                Dramas, International Movies, Thrillers
## 22                   British TV Shows, International TV Shows, Reality TV
## 23                                                   International Movies
## 24                                                        Stand-Up Comedy
## 25                  British TV Shows, International TV Shows, TV Comedies
## 26            British TV Shows, International TV Shows, Romantic TV Shows
## 27                                   Action & Adventure, Sci-Fi & Fantasy
## 28                                                             Docuseries
## 29 British TV Shows, International TV Shows, Stand-Up Comedy & Talk Shows
## 30                    British TV Shows, International TV Shows, TV Dramas
## 31                                                        Stand-Up Comedy
## 32                                                                 Movies
## 33                   British TV Shows, Docuseries, International TV Shows
## 34               British TV Shows, Crime TV Shows, International TV Shows
## 35               British TV Shows, Crime TV Shows, International TV Shows
## 36                    Independent Movies, International Movies, Thrillers
## 37            British TV Shows, International TV Shows, Romantic TV Shows
## 38                                                          Sports Movies
## 39                                                       Sci-Fi & Fantasy
## 40                                                          Documentaries
## 41                  Documentaries, International Movies, Music & Musicals
## 42                                          British TV Shows, TV Comedies
## 43                      British TV Shows, Docuseries, Science & Nature TV
## 44                     Documentaries, International Movies, Sports Movies
## 45                   British TV Shows, International TV Shows, Reality TV
## 46                                           British TV Shows, Docuseries
## 47                       British TV Shows, Classic & Cult TV, TV Comedies
## 48                                    International Movies, Sports Movies
## 49                       Dramas, Independent Movies, International Movies
## 50                            British TV Shows, Crime TV Shows, TV Dramas
## 51                       Dramas, Independent Movies, International Movies
## 52                   British TV Shows, International TV Shows, Reality TV
## 53                                 International Movies, Music & Musicals
## 54                Horror Movies, Independent Movies, International Movies
## 55                                                     Action & Adventure
## 56                                    Documentaries, International Movies
## 57                   British TV Shows, Docuseries, International TV Shows
## 58                                                              Thrillers
## 59                                    Documentaries, International Movies
## 60                  Documentaries, International Movies, Music & Musicals
## 61                                    Documentaries, International Movies
## 62                                             British TV Shows, Kids' TV
## 63                                                               Comedies
## 64                   British TV Shows, Docuseries, International TV Shows
## 65           Action & Adventure, Independent Movies, International Movies
## 66                                           British TV Shows, Reality TV
## 67                                          British TV Shows, TV Comedies
## 68                                           Action & Adventure, Comedies
## 69                                                          Documentaries
## 70                            Documentaries, Dramas, International Movies
##            y2
## 1  2018-12-22
## 2  2018-12-15
## 3  2018-11-23
## 4  2018-10-19
## 5  2018-10-15
## 6  2018-10-05
## 7  2018-10-02
## 8  2018-10-02
## 9  2018-10-02
## 10 2018-10-02
## 11 2018-10-02
## 12 2018-10-02
## 13 2018-10-02
## 14 2018-10-02
## 15 2018-10-02
## 16 2018-10-02
## 17 2018-10-01
## 18 2018-08-24
## 19 2018-07-20
## 20 2018-07-10
## 21 2018-06-29
## 22 2018-06-29
## 23 2018-06-22
## 24 2018-04-10
## 25 2018-04-01
## 26 2018-03-31
## 27 2018-03-31
## 28 2018-03-30
## 29 2018-03-27
## 30 2018-03-23
## 31 2018-03-13
## 32 2018-02-27
## 33 2018-02-22
## 34 2018-02-20
## 35 2018-01-30
## 36 2018-01-18
## 37 2018-01-01
## 38 2018-05-16
## 39 2018-12-20
## 40 2018-05-01
## 41 2018-07-26
## 42 2018-12-15
## 43 2018-12-03
## 44 2018-12-01
## 45 2018-09-15
## 46 2018-10-01
## 47 2018-03-31
## 48 2018-03-01
## 49 2018-07-26
## 50 2018-03-31
## 51 2018-05-01
## 52 2018-12-01
## 53 2018-03-01
## 54 2018-06-23
## 55 2018-12-22
## 56 2018-04-01
## 57 2018-09-15
## 58 2018-05-08
## 59 2018-01-15
## 60 2018-12-28
## 61 2018-03-24
## 62 2018-02-01
## 63 2018-12-15
## 64 2018-02-01
## 65 2018-06-23
## 66 2018-12-01
## 67 2018-01-01
## 68 2018-08-01
## 69 2018-11-01
## 70 2018-01-01
library(plyr)
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
## 
## 다음의 패키지를 부착합니다: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
gen<-read.csv("Data1.csv")
gen$Gender<-as.factor(gen$Gender)
gen$Gender<-revalue(gen$Gender,replace = c("0"="female","1"="male"))
glimpse(gen)
## Rows: 1,925
## Columns: 27
## $ X         <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 1…
## $ Q1        <int> 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, …
## $ Q2        <int> 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 4, 2, 4, 4, 2, 4, 2, 2, …
## $ Q3        <int> 2, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 2, 4, 4, 4, 4, 4, 3, 2, 3, …
## $ Q4        <int> 3, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 2, 4, 4, 4, 2, 2, 4, …
## $ Q5        <int> 4, 4, 2, 4, 4, 4, 4, 4, 2, 4, 4, 2, 4, 4, 4, 4, 4, 3, 1, 2, …
## $ Q6        <int> 2, 3, 4, 4, 4, 4, 4, 4, 1, 2, 2, 2, 4, 4, 3, 5, 2, 2, 1, 4, …
## $ Q7        <int> 2, 2, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 5, 4, 4, 5, 4, 3, 4, 4, …
## $ Q8        <int> 4, 4, 4, 4, 4, 4, 5, 5, 2, 2, 4, 4, 4, 4, 3, 5, 4, 2, 4, 4, …
## $ Q9        <int> 4, 4, 4, 4, 2, 4, 5, 5, 3, 4, 4, 4, 2, 2, 4, 5, 2, 4, 2, 4, …
## $ Q10       <int> 4, 4, 2, 4, 4, 4, 5, 5, 2, 4, 2, 4, 4, 4, 3, 4, 4, 3, 2, 3, …
## $ Q11       <int> 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 3, 4, 4, 4, 4, 5, 4, 3, 3, …
## $ Q12       <int> 4, 4, 4, 4, 4, 4, 5, 5, 3, 4, 4, 3, 4, 3, 3, 4, 5, 4, 4, 2, …
## $ Q13       <int> 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4, 4, 2, 4, 4, 4, 5, 4, 4, 4, …
## $ Q14       <int> 4, 4, 4, 4, 4, 4, 5, 5, 5, 4, 4, 4, 3, 4, 5, 4, 5, 4, 4, 4, …
## $ Q15       <int> 4, 4, 3, 4, 4, 4, 4, 2, 3, 4, 4, 3, 1, 4, 4, 4, 5, 4, 4, 4, …
## $ Q16       <int> 4, 4, 4, 4, 4, 4, 5, 2, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 4, 4, …
## $ Q17       <int> 4, 3, 4, 4, 4, 4, 2, 2, 4, 4, 4, 4, 3, 2, 4, 5, 4, 4, 3, 4, …
## $ Q18       <int> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 2, 4, 4, 4, …
## $ Q19       <int> 4, 2, 4, 4, 4, 4, 4, 2, 4, 2, 4, 4, 1, 4, 4, 4, 5, 4, 2, 3, …
## $ Q20       <int> 4, 1, 3, 4, 4, 4, 4, 2, 4, 2, 4, 4, 4, 2, 4, 5, 5, 4, 2, 4, …
## $ Gender    <fct> female, female, female, female, female, female, female, fema…
## $ EDU       <int> 1, 1, 2, 1, 2, 1, 1, 1, 4, 3, 2, 1, 1, 3, 3, 2, 1, 1, 1, 4, …
## $ BF        <dbl> 3.4, 4.0, 3.6, 4.2, 4.0, 4.0, 3.6, 3.6, 3.6, 3.2, 4.0, 3.2, …
## $ BM        <dbl> 3.2, 3.4, 3.6, 4.0, 3.6, 4.0, 4.6, 4.6, 2.2, 3.2, 3.2, 3.6, …
## $ Happiness <dbl> 4.0, 4.0, 3.8, 4.0, 4.0, 4.0, 4.8, 4.4, 3.8, 4.0, 4.0, 3.4, …
## $ Peace     <dbl> 4.0, 2.8, 3.8, 4.0, 4.0, 4.0, 3.8, 2.4, 4.0, 3.2, 4.0, 3.9, …
table(gen$Gender)
## 
## female   male 
##   1136    789
count(gen$Gender)
##        x freq
## 1 female 1136
## 2   male  789
colSums(is.na(gen))
##         X        Q1        Q2        Q3        Q4        Q5        Q6        Q7 
##         0         0         0         0         0         0         0         0 
##        Q8        Q9       Q10       Q11       Q12       Q13       Q14       Q15 
##         0         0         0         0         0         0         0         0 
##       Q16       Q17       Q18       Q19       Q20    Gender       EDU        BF 
##         0         0         0         0         0         0         0         0 
##        BM Happiness     Peace 
##         0         0         0
#결측치를 확인해보는 과정

library(caret)
library(mlbench) 

set.seed(300)
genint<- createDataPartition(y = gen$Gender,p = .7, list = FALSE) 
gentraining <- gen[ genint,]
gentesting <- gen[-genint,]
nrow(gentraining)
## [1] 1349
nrow(gentesting)
## [1] 576
gencontrol <- trainControl(method="repeatedcv", number=5)
#전처리(표준화)해서 10-fold 방식, "knn" 트레이닝(학습)시키고 model에 넣는 것
genmodel <- train(Gender~., data=gentraining, method="rf",preProcess=c("center","scale"),trControl=gencontrol)
genmodel
## Random Forest 
## 
## 1349 samples
##   26 predictor
##    2 classes: 'female', 'male' 
## 
## Pre-processing: centered (26), scaled (26) 
## Resampling: Cross-Validated (5 fold, repeated 1 times) 
## Summary of sample sizes: 1079, 1080, 1078, 1079, 1080 
## Resampling results across tuning parameters:
## 
##   mtry  Accuracy   Kappa    
##    2    0.6234236  0.1686706
##   14    0.6323070  0.2054445
##   26    0.6337747  0.2091242
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 26.
genmodel1 <- train(Gender~., data=gentraining, method="knn",preProcess=c("center","scale"),trControl=gencontrol)
genmodel1
## k-Nearest Neighbors 
## 
## 1349 samples
##   26 predictor
##    2 classes: 'female', 'male' 
## 
## Pre-processing: centered (26), scaled (26) 
## Resampling: Cross-Validated (5 fold, repeated 1 times) 
## Summary of sample sizes: 1079, 1079, 1080, 1079, 1079 
## Resampling results across tuning parameters:
## 
##   k  Accuracy   Kappa    
##   5  0.6071320  0.1834477
##   7  0.6041884  0.1748207
##   9  0.5952857  0.1521919
## 
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was k = 5.
predict(genmodel,newdata=gentesting) %>% confusionMatrix(gentesting$Gender)
## Confusion Matrix and Statistics
## 
##           Reference
## Prediction female male
##     female    260  138
##     male       80   98
##                                           
##                Accuracy : 0.6215          
##                  95% CI : (0.5805, 0.6613)
##     No Information Rate : 0.5903          
##     P-Value [Acc > NIR] : 0.0686310       
##                                           
##                   Kappa : 0.187           
##                                           
##  Mcnemar's Test P-Value : 0.0001131       
##                                           
##             Sensitivity : 0.7647          
##             Specificity : 0.4153          
##          Pos Pred Value : 0.6533          
##          Neg Pred Value : 0.5506          
##              Prevalence : 0.5903          
##          Detection Rate : 0.4514          
##    Detection Prevalence : 0.6910          
##       Balanced Accuracy : 0.5900          
##                                           
##        'Positive' Class : female          
## 
predict(genmodel1,newdata=gentesting) %>% confusionMatrix(gentesting$Gender)
## Confusion Matrix and Statistics
## 
##           Reference
## Prediction female male
##     female    240  123
##     male      100  113
##                                           
##                Accuracy : 0.6128          
##                  95% CI : (0.5717, 0.6528)
##     No Information Rate : 0.5903          
##     P-Value [Acc > NIR] : 0.1447          
##                                           
##                   Kappa : 0.1875          
##                                           
##  Mcnemar's Test P-Value : 0.1407          
##                                           
##             Sensitivity : 0.7059          
##             Specificity : 0.4788          
##          Pos Pred Value : 0.6612          
##          Neg Pred Value : 0.5305          
##              Prevalence : 0.5903          
##          Detection Rate : 0.4167          
##    Detection Prevalence : 0.6302          
##       Balanced Accuracy : 0.5923          
##                                           
##        'Positive' Class : female          
## 
#genmodel이 정확도 상대적으로 높음