# Songs dataset: exercises

```{r}
library(tidyverse) # Just to be sure it's the first thing that is done...
```


From the **songs** dataset:

0. **load** the data.
1. **find** the songs with popularity (strictly) above 95.  
2. **find** the songs from Kanye West.    
3. **create** a **pivot table** over **artists** that **counts** how many **songs** they have in the dataset and sort the result in descending order (the first line corresponds to the artist with the most songs).  
4. **create** a **pivot table** over artists that averages the popularity of their songs and sort the results in descending order (the first line corresponds to the artist that has the most popular songs on average).    
5. in the above pivot table, the best artists are those with only one (good) song. That's not fair! In order to take this into account, **create** a **pivot table** with the two indicators (number of songs and average popularity), filter the artists with at least 10 songs and then rank them in descending average popularity.


# Movies dataset: exercises

From the **movies** dataset:

0. **load** the data.
1. **find** the **movies** with **imdb score** strictly above 8.8 (those are the great movies).   
2. **find** the movies from **Tim Burton**.  
3. **compute** the number of different directors in the dataset.  
4. **create** a **pivot table** over **directors** that **counts** how many **films** they have in the dataset and sort the result in descending order (the first line corresponds to the director with the most films).  
5. **create** a **pivot table** over directors that averages the imdb score of their films and sort the results in descending order (the first line corresponds to the director that has the most popular films on average).  
6. in the above pivot table, the best directors are those with only one (good) film That's not fair! In order to take this into account, **create** a pivot table with the two indicators (number of songs and average popularity), filter the directors with at least 10 films and then rank them in descending average imdb score.  
7. **create** a **new column** that compute the **earnings/budget ratio**. Perform the same analysis as question 6. but on this ratio.
