3  Inclass2

Author

Melih Can Akgül

Published

October 26, 2023

library(dplyr)
library(ggplot2)

wine_data <- read.csv("C:/Users/Melih/Documents/GitHub/mef07-meakgul/wine.csv")
head(wine_data)
  Wine Alcohol Malic.acid  Ash  Acl  Mg Phenols Flavanoids Nonflavanoid.phenols
1    1   14.23       1.71 2.43 15.6 127    2.80       3.06                 0.28
2    1   13.20       1.78 2.14 11.2 100    2.65       2.76                 0.26
3    1   13.16       2.36 2.67 18.6 101    2.80       3.24                 0.30
4    1   14.37       1.95 2.50 16.8 113    3.85       3.49                 0.24
5    1   13.24       2.59 2.87 21.0 118    2.80       2.69                 0.39
6    1   14.20       1.76 2.45 15.2 112    3.27       3.39                 0.34
  Proanth Color.int  Hue   OD Proline
1    2.29      5.64 1.04 3.92    1065
2    1.28      4.38 1.05 3.40    1050
3    2.81      5.68 1.03 3.17    1185
4    2.18      7.80 0.86 3.45    1480
5    1.82      4.32 1.04 2.93     735
6    1.97      6.75 1.05 2.85    1450
ggplot(wine_data, aes(x = Flavanoids, y = Phenols, color = factor(Wine))) +
  geom_point() +
  labs(title = "Flavanoids vs Phenols by Wine",
       x = "Flavanoids",
       y = "Phenols",
       color = "Wine Class") +
  theme_minimal()

In the wine industry, flavonoids and phenols play a crucial role. Phenols encompass many components naturally found in plants. Flavonoids, specifically those found in grape skins during the wine production process, contribute color and character to the wine. In the wine industry, particularly in grapes and the wine production process, phenolic and flavonoid components play a significant role. As seen in the graph, the quality of the wine class increases as the values of phenols and flavonoids rise.

ggplot(wine_data, aes(x = factor(Wine), y = Hue, fill = factor(Wine))) +
  geom_bar(stat = "identity") +
  labs(title = "Bar Chart: Hue by Wine",
       x = "Wine",
       y = "Hue",
       fill = "Wine") +
  theme_minimal()

Hue (Color Tone): It is a measure indicating the color tone of wine, commonly used for red wines, evaluating whether the wine exhibits hues of blue, purple, orange, or red. The color tone can vary depending on factors such as grape variety, ripeness level, and fermentation process. As seen from the graph, wines of good quality tend to have high Hue values