<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/visualizing-wine-reviews/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://nycdatascience.com/blog/student-works/visualizing-wine-reviews/"> R – NYC Data Science Academy Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><img sizes="(max-width: 1024px) 100vw, 1024px" src="https://i2.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/wine_store-1024x683.jpg?w=450&ssl=1" alt="Wine shopping..." class="wp-post-image" data-recalc-dims="1"></p>
<p> </p>
<p>Have you ever been wine shopping and wondered if the ratings actually mean anything? Do only high-priced wines get good reviews? This analysis attempts to demystify some of the confusion behind these ratings by examining a wide range of wines reviewed by a popular wine publication and showing ways to choose a wine based on other factors such as country of origin and varietal.</p>
<h3>Background</h3>
<p>I obtained a data set of reviews for over 110,000 different wines published by <a rel="nofollow" href="https://www.winemag.com/" target="_blank">Wine Enthusiast</a> magazine between 1999 and 2017. <span>The wines reviewed originated from 42 different countries and ranged in price from $4 to $3300. Reviews were written by at least 20 different professional wine tasters (some anonymous) and included a rating of the wine on a 100-point scale. Only wines with a rating of 80 or higher are reviewed and included in the database. The rating scale used by Wine Enthusiast magazine is provided below. A “Classic” rating is extremely rare – in fact, only 115 wines among the 110,000 reviewed received a rating of 98 or higher.</span></p>
<table border="2">
<tbody>
<tr>
<td>Classic</td>
<td>98-100</td>
<td>The pinnacle of quality.</td>
</tr>
<tr>
<td>Superb</td>
<td>94-97</td>
<td>A great achievement.</td>
</tr>
<tr>
<td>Excellent</td>
<td>90-93</td>
<td>Highly recommended.</td>
</tr>
<tr>
<td>Very Good</td>
<td>87-89</td>
<td>Often good value; well recommended.</td>
</tr>
<tr>
<td>Good</td>
<td>83-86</td>
<td>Suitable for everyday consumption; often good value.</td>
</tr>
<tr>
<td>Acceptable</td>
<td>80-82</td>
<td> Can be employed in casual, less-critical circumstances.</td>
</tr>
</tbody>
</table>
<p> </p>
<h3><strong>Wine Ratings vs. Price</strong></h3>
<p><span>One of the first questions you may have when shopping for a wine and see its rating is to ask whether the wine will be good enough for the occasion or if it’s better to spend more money and get a better wine. To better visualize the relationship between price and rating, I’ve plotted the rating against the wine price for 5000 wines sampled from the data set. It’s no surprise that yes, higher-priced wines do tend to have higher ratings. However, the extremely high-priced wines graphed on a linear scale make it difficult to see the relationship for the majority of the wines reviewed, so I’ve also plotted the price on a logarithmic scale, which shows a much more direct relationship between price and wine rating. </span></p>
<p><span><a rel="nofollow" href="https://i0.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/PricePointsComparison.png" target="_blank"><img sizes="(max-width: 782px) 100vw, 782px" src="https://i1.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/PricePointsComparison-300x173.png?w=450" alt="" class="wp-image-35049" data-recalc-dims="1"></a></span></p>
<p><span>The good news for (frugal) wine lovers is that the spread in the data for many of the wines in the $10 to $100 range reveals that there are still </span><span>many</span><span> wines with “Excellent” ratings of 90 and above within reach. Using the linear regression line in the Rating vs. log(Price) graph allows us to determine that wines plotted several points above the line are better values compared to others in its price range or rating category.</span></p>
<h3>Varietal Ratings and Prices by Country</h3>
<p><span>Next I was interested in finding out if the ratings and prices for different varietals varied by country and if there was a significant difference in price and rating. These bar charts, which compared the average rating and median price for several varietals from the 5 countries with the most wines reviewed, showed some surprising insights as well. For example, Bordeaux Red-blends from Portugal, on average, were more highly-rated than the other four countries and had a much lower significant median selling price. On the other hand, Spanish Rieslings were rated lower than the other four countries shown, but sold for a similar price. Comparing favorite wine varietals in this manner enables consumers to find better deals on higher-rated wines and encourage them be more adventurous in trying different wines.</span></p>
<p><a rel="nofollow" href="https://i1.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/CompareVarietalsByCountry.png" target="_blank"><img sizes="(max-width: 682px) 100vw, 682px" src="https://i0.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/CompareVarietalsByCountry-300x146.png?w=450" alt="" class="wp-image-35050" data-recalc-dims="1"></a></p>
<h3>Wine Selector</h3>
<p><span>Finally, I also put together a few tools to help explore the full database of wines reviewed and find the best values on wines specified by varietal and price range. The user can also choose a desired rating category and search for the wines Idetermined were the “Best Values” from my wine rating vs. price analysis. Another tool allows the user to see the most popular wine varietal from different countries around the world and each of the U.S. states that produce wines. This may be useful for travelers wishing to find the best type of wine to drink when visiting or to buy as a memorable souvenir.</span></p>
<p><span><a rel="nofollow" href="https://i0.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/WineSelector.png" target="_blank"><img sizes="(max-width: 586px) 100vw, 586px" src="https://i0.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/WineSelector-300x201.png?w=450" alt="" class="wp-image-35052" data-recalc-dims="1"></a></span></p>
<h3>Most Popular Wine  by Region<span><a rel="nofollow" href="https://i1.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/WorldWineMap.png" target="_blank"><img sizes="(max-width: 647px) 100vw, 647px" src="https://i2.wp.com/nycdatascience.com/blog/wp-content/uploads/2018/07/WorldWineMap-300x184.png?w=450" alt="" class="wp-image-35051" data-recalc-dims="1"></a></span></h3>
<h3>Conclusion</h3>
<h3><span>Overall we can see that higher-priced wines tend to have higher ratings, however more can be learned when comparing these two variables. Using these tools, we can discover new wines and find the best values for wines we love. Additional work includes the ability to filter out wines that are currently available, using today’s prices, since many of the reviews may date back up to 17 years, and links to the full text of each wine’s review.</span></h3>
<p><span>Cheers!</span></p>
<p> </p>
<p><span>Data source: </span><a rel="nofollow" href="https://www.kaggle.com/zynicide/wine-reviews" target="_blank"><span>Kaggle Dataset: Wine Reviews</span></a></p>
<p><span>Data analysis and interactive charts were developed with R and Shiny and can be found </span><a rel="nofollow" href="https://erindugan.shinyapps.io/WineReviews/" target="_blank"><span>here</span></a><span>. </span></p>
<p><a rel="nofollow" href="https://github.com/erinldugan/shiny_project" target="_blank"><span>Github code</span></a></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://nycdatascience.com/blog/student-works/visualizing-wine-reviews/"> R – NYC Data Science Academy Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/XDFOAj3ZUJs" height="1"></a></div>