d.whisky {DescTools} | R Documentation |
Classification of Scotch Single Malts
Description
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.
Usage
data("d.whisky")
Format
A data frame with 86 observations on the following 16 variables.
distillery
a character
Aberfeldy
,Aberlour
,AnCnoc
,Ardbeg
, ...brand
a grouping factor to separate the better known distilleries (
A
) from the lesser known ones (B
).region
a factor with levels
campbeltown
,highland
,islands
,islay
,lowland
,speyside
.body
a numeric vector
sweetness
a numeric vector
smoky
a numeric vector
medicinal
a numeric vector
tobacco
a numeric vector
honey
a numeric vector
spicy
a numeric vector
winey
a numeric vector
nutty
a numeric vector
malty
a numeric vector
fruity
a numeric vector
floral
a numeric vector
postcode
a character
AB30 1YE
,AB35 5TB
, ...latitude
a numeric vector, coordinate pairs of distilleries.
longitude
a numeric vector, coordinate pairs of distilleries.
Source
http://www.mathstat.strath.ac.uk/outreach/nessie/nessie_whisky.html
References
http://www.mathstat.strath.ac.uk/outreach/nessie/index.html
Examples
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)