Question
R/R Studio Coding assignment on how to set up Problem Statement Use the attached dataset with information on Billboard Top 100 songs beginning in the
R/R Studio Coding assignment on how to set up
Problem Statement Use the attached dataset with information on Billboard Top 100 songs beginning in the mid- 1960s. The variable descriptions are provided below. Use tidytext package in R to answer the questions that follow. Data Description: rank: the rank of a song on Billboard Year-End Hot 100 song: the title of the song artist: the recording artist year: the year the song reached the ranking lyrics: the lyrics of the song 1. Tokenize the lyrics variable, count the number of words in each song, and merge the total number of words in each song with the data (this will add a new column to the data). Print a few rows of the updated data set showing the total number of words in each song. 2. Create sentiment scores using bing lexicon and count the number of sentiment words (number of positive and number of negative sentiment words, separately) in each song. Print two separate tables: (i) songs with the highest percentage of positive words; (ii) songs with the highest percentage of negative words.
Attaching screenshot of the data set:
Y Filter rank song artist year 1 1 2 3 2 1 wooly bully 2 i cant help myself sugar pie honey bunch 4 you were on my mind 5 youve lost that lovin feelin 3 4 5 5 6 downtown 6 7 help sam the sham and the pharaohs four tops we five the righteous brothers petula Clark the beatles hermans hermits elvis presley the temptations the beach boys roger miller jewel akens 7 7 8 00 10 mel carter 14 15 16 18 lyrics 1965 sam the sham miscellaneous wooly bully wooly bully sam th... 1965 sugar pie honey bunch you know that i love you i cant help.... 1965 when i woke up this morning you were on my mind and you... 1965 you never close your eyes anymore when i kiss your lips and... 1965 when youre alone and life is making you lonely you can alv... 1965 help i need somebody help not just anybody help you know. 1965 carterlewis every time i see you lookin my way baby baby ca... 1965 you saw me crying in the chapel the tears i shed were tears... 1965 ive got sunshine on a cloudy day when its cold outside ive .... 1965 well since she put me down ive been out doin in my head c... 1965 trailer for sale or rent rooms to let fifty cents no phone no p... 1965 let me tell ya bout the birds and the bees and the flowers ... 1965 hold me hold me never let me go until youve told me toid.... 1965 i said shotgun shoot em for he runs now do the jerk baby ... 1965 they say were young and we dont know we wont find out ... 1965 who wants to buy this diamond ring she took it off her finge... 1965 mrs brown youve got a lovely daughter girls as sharp as her... 1965 stop in the name of love before you break my heartbaby ba... 1965 oh my love my darling ive hungered for your touch a long ... 1965 saycrewetook a walk and passed your house late last night... 1965 theres a new world somewhere they call the promised land... 1965 mantovani cara mia why must we say goodbye each time w... 1965 hey mr tambourine man play a song for me im not sleepy ... 1965 a month of nights a year of days octobers drifting into mays... 1965 are you ready yes in ready are you ready yes im ready i don... 1965 whats new pussycat woah woah whats new pussycat woah ... 1965 the eastern world it is explodin violence flarin bullets loadin... 1965 hang on sloopy sloopy hang on hang on sloopy sloopy han... 1965 i think im gonna be sad i think its today yeah the girl thats d... 1965 i want some red roses for a blue tady mister florist take my ... 1965 come here sister papas in the swing he aint too hip about th... 1965 the purpose of a man is to love a woman and the purpose ... 8 cant you hear my heart beat 9 crying in the chapel 9 10 my girl 11 help me rhonda 11 12 king of the road 12 13 the birds and the bees 13 14 hold me thrill me kiss me 15 shotgun 16 i got you babe 17 this diamond ring 17 19 mrs brown youve got a lovely daughter 20 stop in the name of love 19 21 unchained melody 22 silhouettes 21 23 ill never find another you 22 24 cara mia 23 25 mrtambourine man 26 cast your fate to the wind 27 yes im ready 26 28 whats new pussycat 27 29 eve of destruction 28 30 hang on sloopy 29 31 ticket to ride 30 32 red roses for a blue lady 31 33 papas got a brand new bag 32 34 game of love Showing 1 to 33 of 4,831 entries, 5 total columns 20 junior walker the all stars sonny cher gary lewis the playboys hermans hermits the supremes the righteous brothers hermans hermits the seekers jay and the americans the byrds sounds orchestral barbara mason tom jones barry mcguire the mccoys the beatles bert kaempfert james brown 24 25 wayne fontana the mindbenders Y Filter rank song artist year 1 1 2 3 2 1 wooly bully 2 i cant help myself sugar pie honey bunch 4 you were on my mind 5 youve lost that lovin feelin 3 4 5 5 6 downtown 6 7 help sam the sham and the pharaohs four tops we five the righteous brothers petula Clark the beatles hermans hermits elvis presley the temptations the beach boys roger miller jewel akens 7 7 8 00 10 mel carter 14 15 16 18 lyrics 1965 sam the sham miscellaneous wooly bully wooly bully sam th... 1965 sugar pie honey bunch you know that i love you i cant help.... 1965 when i woke up this morning you were on my mind and you... 1965 you never close your eyes anymore when i kiss your lips and... 1965 when youre alone and life is making you lonely you can alv... 1965 help i need somebody help not just anybody help you know. 1965 carterlewis every time i see you lookin my way baby baby ca... 1965 you saw me crying in the chapel the tears i shed were tears... 1965 ive got sunshine on a cloudy day when its cold outside ive .... 1965 well since she put me down ive been out doin in my head c... 1965 trailer for sale or rent rooms to let fifty cents no phone no p... 1965 let me tell ya bout the birds and the bees and the flowers ... 1965 hold me hold me never let me go until youve told me toid.... 1965 i said shotgun shoot em for he runs now do the jerk baby ... 1965 they say were young and we dont know we wont find out ... 1965 who wants to buy this diamond ring she took it off her finge... 1965 mrs brown youve got a lovely daughter girls as sharp as her... 1965 stop in the name of love before you break my heartbaby ba... 1965 oh my love my darling ive hungered for your touch a long ... 1965 saycrewetook a walk and passed your house late last night... 1965 theres a new world somewhere they call the promised land... 1965 mantovani cara mia why must we say goodbye each time w... 1965 hey mr tambourine man play a song for me im not sleepy ... 1965 a month of nights a year of days octobers drifting into mays... 1965 are you ready yes in ready are you ready yes im ready i don... 1965 whats new pussycat woah woah whats new pussycat woah ... 1965 the eastern world it is explodin violence flarin bullets loadin... 1965 hang on sloopy sloopy hang on hang on sloopy sloopy han... 1965 i think im gonna be sad i think its today yeah the girl thats d... 1965 i want some red roses for a blue tady mister florist take my ... 1965 come here sister papas in the swing he aint too hip about th... 1965 the purpose of a man is to love a woman and the purpose ... 8 cant you hear my heart beat 9 crying in the chapel 9 10 my girl 11 help me rhonda 11 12 king of the road 12 13 the birds and the bees 13 14 hold me thrill me kiss me 15 shotgun 16 i got you babe 17 this diamond ring 17 19 mrs brown youve got a lovely daughter 20 stop in the name of love 19 21 unchained melody 22 silhouettes 21 23 ill never find another you 22 24 cara mia 23 25 mrtambourine man 26 cast your fate to the wind 27 yes im ready 26 28 whats new pussycat 27 29 eve of destruction 28 30 hang on sloopy 29 31 ticket to ride 30 32 red roses for a blue lady 31 33 papas got a brand new bag 32 34 game of love Showing 1 to 33 of 4,831 entries, 5 total columns 20 junior walker the all stars sonny cher gary lewis the playboys hermans hermits the supremes the righteous brothers hermans hermits the seekers jay and the americans the byrds sounds orchestral barbara mason tom jones barry mcguire the mccoys the beatles bert kaempfert james brown 24 25 wayne fontana the mindbendersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started