Overveiw

In this project we will be looking at genres of music and if we will be listen to all genres of music or will we still have a large percentage of genres that still need to be listened to.

Essential question: Do the genres you hear played on shuffle represent the genres of the songs in our class playlist?

Import PLaylist Data

We collected this data by having our class pick their 5 favorite songs and artist and decide what genre they are in based off the tone of the song. We than entered that into a google survey. Our teacher then had us all figure out ways we could organize the data that had been collected the class before and we removed doubles, put them in order by genre. After that we made copies of everything and we had clean data. We than began the actual project.

I learned durning this project that for one my class has a very wide spread of music taste and also that there are more genres of music than I thought with just a very few people in one class.

head(DF)
## # A tibble: 6 × 3
##   genre                artist             title               
##   <chr>                <chr>              <chr>               
## 1 Genre 1 - hiphop/rap Alesso             When I'm Gone       
## 2 Genre 1 - hiphop/rap Aliyah's Interlude It Girl             
## 3 Genre 1 - hiphop/rap Big Sean           Beware              
## 4 Genre 1 - hiphop/rap Clipse             Ma, I don't love her
## 5 Genre 1 - hiphop/rap Common             Be                  
## 6 Genre 1 - hiphop/rap Drake              Nice for what
DF$genre<-as.factor(DF$genre)
DF %>% count(genre)
## # A tibble: 6 × 2
##   genre                        n
##   <fct>                    <int>
## 1 Genre 1 - hiphop/rap        26
## 2 Genre 2 - pop/kpop/Latin    22
## 3 Genre 3 -  house/ska         5
## 4 Genre 4 -  rnb/soul         43
## 5 Genre 5 - alt/indie/folk    34
## 6 Genre 6 - country/rock      14
DF2<-DF %>% count(genre)
DF2 %>% mutate( Probibility = n/sum(n))
## # A tibble: 6 × 3
##   genre                        n Probibility
##   <fct>                    <int>       <dbl>
## 1 Genre 1 - hiphop/rap        26      0.181 
## 2 Genre 2 - pop/kpop/Latin    22      0.153 
## 3 Genre 3 -  house/ska         5      0.0347
## 4 Genre 4 -  rnb/soul         43      0.299 
## 5 Genre 5 - alt/indie/folk    34      0.236 
## 6 Genre 6 - country/rock      14      0.0972
DF3<-DF2 %>% mutate( Probibility = n/sum(n))
Sample<-sample_n(DF, 10)
Sample
## # A tibble: 10 × 3
##    genre                    artist             title        
##    <fct>                    <chr>              <chr>        
##  1 Genre 5 - alt/indie/folk Taylor Swift       Ivy          
##  2 Genre 4 -  rnb/soul      Amerie             Can't Let Go 
##  3 Genre 5 - alt/indie/folk Fleetwood Mac      Everywhere   
##  4 Genre 1 - hiphop/rap     Aliyah's Interlude It Girl      
##  5 Genre 2 - pop/kpop/Latin ariana grande      everytime    
##  6 Genre 4 -  rnb/soul      Thee sacred souls  For now      
##  7 Genre 6 - country/rock   Kacey Musgraves    Die Fun      
##  8 Genre 3 -  house/ska     Sublime            Garden Grove 
##  9 Genre 1 - hiphop/rap     Big Sean           Beware       
## 10 Genre 1 - hiphop/rap     Alesso             When I'm Gone
Sample<-Sample %>% count(genre) %>% mutate( Probibility = n/sum(n))
Sample
## # A tibble: 6 × 3
##   genre                        n Probibility
##   <fct>                    <int>       <dbl>
## 1 Genre 1 - hiphop/rap         3         0.3
## 2 Genre 2 - pop/kpop/Latin     1         0.1
## 3 Genre 3 -  house/ska         1         0.1
## 4 Genre 4 -  rnb/soul          2         0.2
## 5 Genre 5 - alt/indie/folk     2         0.2
## 6 Genre 6 - country/rock       1         0.1
Sample<-sample_n(DF, 23)%>% count(genre) %>% mutate( Probibility = n/sum(n))
Sample
## # A tibble: 5 × 3
##   genre                        n Probibility
##   <fct>                    <int>       <dbl>
## 1 Genre 1 - hiphop/rap         3      0.130 
## 2 Genre 2 - pop/kpop/Latin     5      0.217 
## 3 Genre 4 -  rnb/soul          6      0.261 
## 4 Genre 5 - alt/indie/folk     7      0.304 
## 5 Genre 6 - country/rock       2      0.0870
Sample<-sample_n(DF, 60)%>% count(genre) %>% mutate( Probibility = n/sum(n))
Sample
## # A tibble: 6 × 3
##   genre                        n Probibility
##   <fct>                    <int>       <dbl>
## 1 Genre 1 - hiphop/rap        13      0.217 
## 2 Genre 2 - pop/kpop/Latin     7      0.117 
## 3 Genre 3 -  house/ska         1      0.0167
## 4 Genre 4 -  rnb/soul         18      0.3   
## 5 Genre 5 - alt/indie/folk    16      0.267 
## 6 Genre 6 - country/rock       5      0.0833