| d.whisky | R Documentation |
86 malt whiskies are scored between 0-4 for 12 different taste categories including sweetness, smoky, nutty etc. Additionally, coordinates of distilleries allow us to obtain pairwise distance information. Using a combination of these variables it is possible to look for correlations between particular attributes of taste and physical location, for example does a shared local resource have a significant effect on nearby whiskies.
By using correlation analysis it may be possible to provide whisky recommendations based upon an individual's particular preferences.
By computing the Pearson correlation coefficient and specifying a threshold value between 0 and 1, we can establish an adjacency matrix where each node is a malt whisky and an edge represents a level of similarity above the threshold.
data("d.whisky")
A data frame with 86 observations on the following 16 variables.
distillerya character Aberfeldy, Aberlour, AnCnoc, Ardbeg, ...
branda grouping factor to separate the better known distilleries (A) from the lesser known ones (B).
regiona factor with levels campbeltown, highland, islands, islay, lowland, speyside.
bodya numeric vector
sweetnessa numeric vector
smokya numeric vector
medicinala numeric vector
tobaccoa numeric vector
honeya numeric vector
spicya numeric vector
wineya numeric vector
nuttya numeric vector
maltya numeric vector
fruitya numeric vector
florala numeric vector
postcodea character AB30 1YE, AB35 5TB, ...
latitudea numeric vector, coordinate pairs of distilleries.
longitudea numeric vector, coordinate pairs of distilleries.
http://www.mathstat.strath.ac.uk/outreach/nessie/nessie_whisky.html
http://www.mathstat.strath.ac.uk/outreach/nessie/index.html
head(d.whisky)
opar <- par(mfrow=c(3,3), cex.main=1.8)
for(i in 1:9)
PlotPolar(d.whisky[i, 4:15], rlim=4, type="l", col=DescTools::hecru,
lwd=2, fill=SetAlpha(DescTools::hecru, 0.4),
panel.first=PolarGrid(
ntheta=ncol(d.whisky[i, 2:13]), nr = NA, col="grey",
lty="dotted", las=1, cex=1.4, alabels=StrCap(colnames(d.whisky[i, 3:14])),
lblradians=TRUE),
main=d.whisky[i, "distillery"])
par(mfrow=c(3,3), cex.main=1.8, xpd=NA)
id <- d.whisky$distillery %in% c("Ardbeg","Caol Ila","Cragganmore","Lagavulin","Laphroig",
"Macallan","Mortlach","Talisker","Tobermory")
PlotFaces(d.whisky[id, 4:15], nr=3, nc=3, col=hecru, scale=TRUE, fill=TRUE,
labels=d.whisky$distillery[id])
par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.