<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/lyric-analysis-with-nlp-and-machine-learning-using-r-part-one-text-mining/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://r-posts.com/lyric-analysis-with-nlp-and-machine-learning-using-r-part-one-text-mining/"> R-posts.com</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><em>June 22</em><br>
<em>By Debbie Liske</em></p>
<p>This is Part One of a three part tutorial series originally published on the DataCamp online learning platform in which you will use R to perform a variety of analytic tasks on a case study of musical lyrics by the legendary artist, Prince. The three tutorials cover the following:</p>
<ul>
<li><strong>Part One</strong>: <a rel="nofollow" href="https://www.datacamp.com/community/tutorials/R-nlp-machine-learning?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Text Mining and Exploratory Analysis</a> (beginner)</li>
<li><strong>Part Two</strong>: <a rel="nofollow" href="https://www.datacamp.com/community/tutorials/sentiment-analysis-R?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Sentiment Analysis</a> and <a rel="nofollow" href="https://www.datacamp.com/community/tutorials/ML-NLP-lyric-analysis?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">Topic Modeling with NLP</a> (intermediate)</li>
<li><strong>Part Three</strong>: Predictive Analytics using Machine Learning (intermediate -advanced)</li>
</ul>
<p></p>
<p>Musical lyrics may represent an artist’s perspective, but popular songs reveal what society wants to hear. Lyric analysis is no easy task. Because it is often structured so differently than prose, it requires caution with assumptions and a uniquely discriminant choice of analytic techniques. Musical lyrics permeate our lives and influence our thoughts with subtle ubiquity. The concept of<span> </span><em>Predictive Lyrics</em><span> </span>is beginning to buzz and is more prevalent as a subject of research papers and graduate theses. This case study will just touch on a few pieces of this emerging subject.</p>
<p><img data-orig-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/06/princeWordCloud.jpg?fit=1075%2C167" data-orig-size="1075,167" data-medium-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/06/princeWordCloud.jpg?fit=450%2C70" data-attachment-id="548" data-image-meta="{" data-image-description="" src="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/06/princeWordCloud.jpg?resize=450%2C70" data-permalink="http://r-posts.com/lyric-analysis-with-nlp-and-machine-learning-using-r-part-one-text-mining/princewordcloud/" data-large-file="https://i1.wp.com/r-posts.com/wp-content/uploads/2018/06/princeWordCloud.jpg?fit=450%2C70" alt="" data-image-title="princeWordCloud" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-548" data-recalc-dims="1" height="70"></p>
<p><strong>Prince: The Artist
<p></p></strong>
<p>To celebrate the inspiring and diverse body of work left behind by Prince, you will explore the sometimes obvious, but often hidden, messages in his lyrics. However, you don’t have to like Prince’s music to appreciate the influence he had on the development of many genres globally. Rolling Stone magazine<span> </span><a rel="nofollow" href="http://www.rollingstone.com/music/lists/100-greatest-songwriters" target="_blank">listed</a><span> </span>Prince as the 18th best songwriter of all time, just behind the likes of Bob Dylan, John Lennon, Paul Simon, Joni Mitchell and Stevie Wonder. Lyric analysis is slowly finding its way into data science communities as the possibility of predicting “Hit Songs” approaches reality.</p>
<blockquote><p>
Prince was a man bursting with music – a wildly prolific songwriter, a virtuoso on guitars, keyboards and drums and a master architect of funk, rock, R&amp;B and pop, even as his music defied genres. – Jon Pareles (NY Times)
</p></blockquote>
<p>In this tutorial, Part One of the series, you’ll utilize text mining techniques on a set of lyrics using the tidy text framework. Tidy datasets have a specific structure in which each variable is a column, each observation is a row, and each type of observational unit is a table. After cleaning and conditioning the dataset, you will create descriptive statistics and exploratory visualizations while looking at different aspects of Prince’s lyrics.</p>
<p>Check out the article <a rel="nofollow" href="https://www.datacamp.com/community/tutorials/R-nlp-machine-learning?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">here</a>!</p>
<p>
<img data-orig-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/06/guitarWordCloud.jpg?fit=1332%2C614" data-orig-size="1332,614" data-medium-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/06/guitarWordCloud.jpg?fit=450%2C207" data-attachment-id="547" data-image-meta="{" data-image-description="" src="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/06/guitarWordCloud.jpg?resize=450%2C207" data-permalink="http://r-posts.com/lyric-analysis-with-nlp-and-machine-learning-using-r-part-one-text-mining/guitarwordcloud/" data-large-file="https://i2.wp.com/r-posts.com/wp-content/uploads/2018/06/guitarWordCloud.jpg?fit=450%2C207" alt="" data-image-title="guitarWordCloud" sizes="(max-width: 450px) 100vw, 450px" width="450" data-comments-opened="1" class="wp-image-547" data-recalc-dims="1" height="207"></p>
<p>(reprint by permission of <a rel="nofollow" href="http://www.datacamp.com/?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">DataCamp</a> online learning platform)</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="http://r-posts.com/lyric-analysis-with-nlp-and-machine-learning-using-r-part-one-text-mining/"> R-posts.com</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 alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/n02wdTX5SEc" height="1"></a></div>