For this assignment, we’ll be working through with data from the Recording Industry Association of America (RIAA) in an attempt to recreate an image similar to this one:

The columns other than year measure the amount of sales for that music format in millions of dollars.

Question 1) Manipulate the data

Change the data to be in the proper format to create the graph. You’ll also need to reorder the music formats to be ordered as:

Streaming/Download/CD/Cassette/Vinyl/Other

Save the result as music2, then show the first 12 rows

## # A tibble: 12 × 3
##     year format     sales
##    <int> <fct>      <dbl>
##  1  1973 Vinyl     1925  
##  2  1973 Cassette    91.6
##  3  1973 CD           0  
##  4  1973 Download     0  
##  5  1973 Streaming    0  
##  6  1973 Other        0  
##  7  1974 Vinyl     2099. 
##  8  1974 Cassette   100. 
##  9  1974 CD           0  
## 10  1974 Download     0  
## 11  1974 Streaming    0  
## 12  1974 Other        0

Question 2) Graph 1

Create the basic graph seen in the Brightspace. To get the area between the lines, use geom_line() and to have the lines stacked on top of one another, use the position = argument along with the correct value for it.

In addition to the two geometries, add coord_cartesian() along with an additional argument to remove the extra space on the 4 sides of the graph.

Once you have the graph that matches what is in blackboard, save it as gg_music2. Make sure this graph appears in the knitted document!

Question 3: Updating the scales

Update gg_music2 by using the appropriate scale functions for the 3 different aesthetics to match what is seen for question 3 in Brightspace. The colors don’t need to be identical, just close!

Once you have the graph that matches what is in blackboard, save it as gg_music3. Make sure this graph appears in the knitted document!

Question 4: Changing the themes

Using the theme() function, make the appropriate updates to gg_music3. Save the result as gg_music4 and have it appear in your knitted document

Question 5: Adding text

Use one of the methods seen in class to add the music medium to the corresponding areas in the graph. They don’t need to match the spots exactly, just need to be close. You don’t need to save this one since it is the last graph!