Everything has beauty, but not everyone sees it.
In the remaining of the blog post, we analyze different interesting aspects of the data. We also invite readers to explore the data and submit their observations.
A Bird's-Eye View
- Number of Attendees: 240
- Percentage of Picks (by Position): 55% (1) - 49.1% (2) - 43.7% (3) - 37.5% (4) - 34.1% (5)
Distribution of Votes
require(ggplot2) #Load data dance <- read.csv("[path_to_file]/dance.csv") #Produce count of votes per person counts <- as.data.frame(table(dance$voted)) #Count voters that were not voted None <- as.data.frame(setdiff(dance$voter, dance$voted)) colnames(None) <- c("Var1") None$Freq <- 0 #Combine tables counts <- rbind(counts,None) #Produce plot ggplot(data.frame(counts), aes(x=factor(Freq))) + geom_histogram(fill="grey", color="grey50") + xlab("Number of votes") + ylab("Frequency") + ggtitle("Histogram of attractiveness") + theme_bw()
I could have concluded this post with the line above and left a very inspiring message. However, data is also inspiring and there is much more we can learn from it.
Imagine Me and You, I do (Listen)
ggplot(dance, aes(x=Freq, fill=as.factor(Position))) + geom_histogram(color="black", position="identity", binwidth=1, origin = -0.5) + facet_grid(Position ~ ., labeller="label_both") + scale_x_continuous(breaks=seq(1, max(data$Freq), by = 1)) + theme_bw() + theme(legend.position="none") + xlab("Number of votes") + ylab("Frequency") + ggtitle("Distribution of votes")
|Figure 2: Histogram of votes by position.|
Is There a Match?
The analysis that I have performed above is by no means comprehensive. In fact, I would love to see other observations that you can extract from this valuable data. I have uploaded the anonymized data (dance.csv and dance-edge-list.csv), so feel free to download it and start experimenting with it. Once you find something worth sharing, go ahead and post it in a comment in the comment section below!
Observation 5 (Bonus Track): I do not want to end this post without pointing out something in Figure 3 that made me smile. If you look in the far left of the graph, there are two guests that have unequivocally picked each other. I do not know if they planned it like this; I do not know if they this is 100% chance; What I know is that these two guests enjoyed the party very, very much.