Replicate a case study of marketing analytics: https://www.linkedin.com/learning/the-data-science-of-marketing/cluster-analysis-with-r?u=2232593

Q1 Import data

myClusterData <- read.csv("cluster-r.csv")

Q2 Review data

head(myClusterData)
##                                    Email Behavior.3 Brand.Preference CTA
## 1                nisl@adipiscingelit.org         16               12   9
## 2                 dui.Fusce.diam@non.edu         25                8   6
## 3   nisl.Maecenas@vitaeorciPhasellus.org         23               11   4
## 4                   justo.nec@Aenean.edu          4               12  11
## 5 neque.Morbi.quis@AeneanmassaInteger.ca         29               10   2
## 6                          elit@erat.org         16                6  13
##   Demo.Age
## 1       48
## 2       41
## 3       50
## 4       34
## 5       59
## 6       57

Q3 Standardize data

myClusterDataStandardized <- scale(myClusterData[-1])

Q4 What is the standardization for?

Standardization is to get more in depth with the data then the regular data.

Q5 Find kmeans. What is kmeans for?

ourGroups <- kmeans(myClusterDataStandardized, 3)

Q6 Visualize clusters

library(cluster)

Q7 Summarize

ourGroups$size
## [1]  93  95 112

Q8 Hide the messages, but display the code and its results on the webpage.

Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.

Q9 Display the title and your name correctly at the top of the webpage.

Q10 Use the correct slug.