load("./data/wine150_tidy")
wine150_tidy %>%
select(points, country, winery, variety, points_avg_variety, points_avg_winery) %>%
filter(country == "US") %>%
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 = "US Wineries"),
yaxis = list(title = "Wine Points"),
title = "Top 20 US 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 US wineries, we have shown the top 20 US wineries with the highest average wine points, with Sloan being No.1 (100). 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 == "US") %>%
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 = "US Wineries"),
yaxis = list(title = "Wine Points"),
title = "Bottom 20 US Wineries: Lowest Professional Recognition")
We have also shown the bottom 20 US wineries with the lowest average wine points. From the box plot, we could see that all of them have received average wine points which are lower than or equal to 81. In addition, nearly half of them have 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 == "US") %>%
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 US Wines"),
yaxis = list(title = "Wine Points"),
title = "Most Favorable 10 Grapes for US 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 US wines, we have found out the top 10 grapes for US wines with the highest median wine points, with Trousseau Gris 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 == "US") %>%
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 US Wines"),
yaxis = list(title = "Wine Points"),
title = "Least Favorable 10 Grapes for US Wines: Lowest Professional Recognition")
We have also shown the bottom 10 kinds of grapes for US wines with the lowest median wine points. It is clear that Chambourcin and Chardonelle have received the lowest median wine points (82). In addition, the quartiles of wine points for each kind of grape have also been provided with violin plot.