load("./data/wine150_tidy")
wine150_tidy %>%
select(country, points_avg_country) %>%
filter(country %in% c("Albania", "Austria", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "England", "France", "Germany", "Greece", "Hungary", "Italy", "Lithuania", "Luxembourg", "Macedonia", "Moldova", "Montenegro", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia", "Spain", "Switzerland", "Ukraine")) %>%
mutate(country = fct_reorder(country, desc(points_avg_country))) %>%
unique() %>%
mutate(text_label = str_c("Country: ", country, "\nAverage Points: ", points_avg_country)) %>%
plot_ly(
x = ~country, y = ~points_avg_country, color = ~factor(country), text = ~text_label,
type = "bar", colors = "viridis") %>%
layout(
xaxis = list(title = "European Countries"),
yaxis = list(title = "Average Wine Points", range = (c(80,92))),
title = "Average Wine Points of European Countries")
After calculating average wine points for each of the 26 European countries, we find out that England has the highest average wine points (92.89) and Montenegro has the lowest average wine points (82). Generally speaking, we could see a trend from the bar plot: the richer West European countries have relatively higher average wine points and the less wealthy East European countries have relatively lower average wine points.
load("./data/wine150_tidy")
wine150_tidy %>%
select(points, country, winery, variety, points_avg_variety, points_avg_winery) %>%
filter(country %in% c("Albania", "Austria", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "England", "France", "Germany", "Greece", "Hungary", "Italy", "Lithuania", "Luxembourg", "Macedonia", "Moldova", "Montenegro", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia", "Spain", "Switzerland", "Ukraine")) %>%
mutate(winery = fct_reorder(winery, desc(points_avg_winery))) %>%
filter(as.numeric(winery) <= 20) %>%
arrange(winery) %>%
plot_ly(
x = ~winery, y = ~points, color = ~factor(winery),
type = "box", colors = "viridis") %>%
layout(
xaxis = list(title = "European Wineries"),
yaxis = list(title = "Wine Points"),
title = "Top 20 European Wineries: Highest Professional Recognition")
One of the most important factors of wines is the producer. Usually, the high reputations of prestigious wineries serve as guarantees of great wine qualities. After calculating average wine points for European wineries, we have shown the top 20 European wineries with the highest average wine points, with Mascarello Giuseppe e Figlio being No.1 (99). The box plot has also provided quartiles of wine points for each winery.
load("./data/wine150_tidy")
wine150_tidy %>%
select(points, country, winery, variety, points_avg_variety, points_avg_winery) %>%
filter(country %in% c("Albania", "Austria", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "England", "France", "Germany", "Greece", "Hungary", "Italy", "Lithuania", "Luxembourg", "Macedonia", "Moldova", "Montenegro", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia", "Spain", "Switzerland", "Ukraine")) %>%
mutate(winery = fct_reorder(winery, points_avg_winery)) %>%
filter(as.numeric(winery) <= 20) %>%
arrange(winery) %>%
plot_ly(
x = ~winery, y = ~points, color = ~factor(winery),
type = "box", colors = "viridis") %>%
layout(
xaxis = list(title = "European Wineries"),
yaxis = list(title = "Wine Points"),
title = "Bottom 20 European Wineries: Lowest Professional Recognition")
We have also shown the bottom 20 European wineries with the lowest average wine points. From the box plot, we could see that all of them have received the same lowest average wine points (80).
load("./data/wine150_tidy")
wine150_tidy %>%
select(points, country, winery, variety, points_med_variety, points_med_winery) %>%
filter(country %in% c("Albania", "Austria", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "England", "France", "Germany", "Greece", "Hungary", "Italy", "Lithuania", "Luxembourg", "Macedonia", "Moldova", "Montenegro", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia", "Spain", "Switzerland", "Ukraine")) %>%
mutate(variety = fct_reorder(variety, desc(points_med_variety))) %>%
filter(as.numeric(variety) <= 10) %>%
arrange(variety) %>%
plot_ly(
x = ~variety, y = ~points, color = ~factor(variety),
type = "violin", colors = "viridis") %>%
layout(
xaxis = list(title = "Grapes for European Wines"),
yaxis = list(title = "Wine Points"),
title = "Most Favorable 10 Grapes for European Wines: Highest Professional Recognition")
Wines’ qualities are predominantly determined by their raw materials: different grapes. Therefore, by calculating the median wine points of all kind of grapes for European wines, we have found out the top 10 grapes for European wines with the highest median wine points, with Blauburgunder being No.1 (93). The violin plot has also provided quartiles of wine points for each kind of grape.
load("./data/wine150_tidy")
wine150_tidy %>%
select(points, country, winery, variety, points_med_variety, points_med_winery) %>%
filter(country %in% c("Albania", "Austria", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "England", "France", "Germany", "Greece", "Hungary", "Italy", "Lithuania", "Luxembourg", "Macedonia", "Moldova", "Montenegro", "Portugal", "Romania", "Serbia", "Slovakia", "Slovenia", "Spain", "Switzerland", "Ukraine")) %>%
mutate(variety = fct_reorder(variety, points_med_variety)) %>%
filter(as.numeric(variety) <= 10) %>%
arrange(variety) %>%
plot_ly(
x = ~variety, y = ~points, color = ~factor(variety),
type = "violin", colors = "viridis") %>%
layout(
xaxis = list(title = "Grapes for European Wines"),
yaxis = list(title = "Wine Points"),
title = "Least Favorable 10 Grapes for European Wines: Lowest Professional Recognition")
We have also shown the bottom 10 kinds of grapes for European wines with the lowest median wine points. It is clear that Parraleta has received the lowest median wine points (80). In addition, the quartiles of wine points for each kind of grape have also been provided with violin plot.