1) Acquire Your Streaming Data
- Open up open.spotify.com in your web browser.
- Click on your name in the top right corner and then click on “Account.”
- Navigate to the left side of the page and click on “Privacy Settings.”
- Scroll down to the section labeled “Download Your Data” and look toward “Account Data.” Make sure to check the box next to “Select Account data.”
- (Optional) If you would like to look at your streaming data to date, you can also request your “Extended Streaming Data” by additionally checking the box next to “Select Extended streaming data.”
- After checking the applicable boxes, scroll down to the bottom of the page and click “Request Data.”
You might be asked to verify your data request via your email inbox. After confirming, you should receive your account data from the previous year within the next 7 days. Your Extended Streaming Data may take up to 30 days to get compiled and sent to your inbox.
1.5) (Optional) Convert Milliseconds to Hours
When you download your Spotify data, the time measure they use is milliseconds, written as ms. While converting milliseconds to hours is an optional step, it makes your final viz easier to understand and digest. Feel free to skip down to the next section if you don’t want to translate the time. If you would like to change the units to hours, read below to learn how.
- The first step will be to combine your streaming history files if you received more than one. You may have more than one depending on how much music you listened to. You will find these files after opening the .zip file that Spotify sent you.
- Next, merge however many streaming history files you have into one. I use this site to combine my JSON-type files.
- After combining them, you should have one JSON-type file that contains all of your streaming history.
- Now, you’ll want to convert that combined streaming history file into an Excel or CSV file. Head to this website and scroll down until you see “Step 1,” upload your file, then convert it to an Excel file.
- We need to add the “Hours played” column to this new file. Open up the file in whatever spreadsheet editor you use.
- Create a new column in your data and label it “Hours played.”
- Underneath the title in the next row, input a formula that converts milliseconds (taken from the “msPlayed” column) to hours. This will be the quantity under “msPlayed” multiplied by 0.000000277778. My formula looked like “=E2*0.000000277778,” where E2 is the first value in the “msPlayed” column.
- Select the first box with the formula in it and press command+D if you have a Mac or Ctrl+D if you have a Windows computer. This will apply the formula to the entire column. If using sheets, drag the yellow circle all the way down the entire column to apply the formula.
- Finally, we’ll convert our file with the “Hours played” column back into a JSON file to make it compatible with the rest of the original files. You can do so by uploading your new file to this website and converting it to a JSON file.
This new JSON file will replace the “Streaming History File” referred to in the instructions below. The “Hours played” column and measure will replace any measures related to milliseconds or “msPlayed” in the instructions.
2) Load Your Data into Tableau
- Open up the .zip file that Spotify sent you. Your data should open in a folder titled “My Data.” Depending on how long your streaming history is, there might be multiple Streaming History files which will need to be put in a union later on.
- For now, open up Tableau and, in the Connect Pane, click “JSON file.” Open up your streaming history file (if you have more than one, click on the first).
- Ensure all of the schema levels are selected and click OK. You should see the file in the canvas. You should see on the left side of the program, under “Files,” other JSON files within the MyData folder. If you have additional streaming history files, we will need to make a union with the additional streaming history files.
- Drag and drop the second streaming history file underneath the primary file on the canvas so that it highlights and shows “union.” A union has now been created between the two streaming history files.
- Ensure that the schema is entirely selected by clicking the arrow next to the file name and selecting “Select schema level.” Make sure everything is checked.
- Repeat step 4 until all of your streaming history files are incorporated.
- Now, we’ll incorporate a different file titled “Playlist1.” Hover over “data” in the menu and click “New Data Source.” Alternatively, click on the Tableau logo in the top left.
- In the Connect pane, click “JSON file” to then open the “Playlist1” file.
- Ensure all of the schema levels are selected and click OK.
At this point in time, both data files have been successfully uploaded and we can start exploring our data!
Creating a union in Tableau 2022.2.2
3) Explore Your Data in Tableau
Switch over to Sheet 1 in the sheets tab on the bottom and start making different visuals! We’ll walk through some useful features in Tableau and how to make a sheet for your most played artists, then hand over the reins for you to draw your own insights.
Making Groups
To highlight specific metrics on our charts and graphs, we’ll need to learn how to make groups. Just select all of the values you want to be included in a group then right-click on the metric and select “Group.” It should have a paperclip icon. You can rename the group by right clicking on its name in the legend on the right and select “Edit Alias…” Now that the group is created, you can go to the Color mark and select your color preference.
Select points to make a group and rename them to make your worksheet easier to understand in the legend.
Using Tooltips
Tooltips are created automatically in Tableau but you can also edit them to say exactly what you want it to say! You can change labels or wording to make it easier to understand by clicking on the Tooltip square in the Marks pane. This will open up a text editor where you can add and edit text describing points on your worksheet. Texts in a gray box are drawing statistics directly from the sheet mentioned.
Make changes to tooltips by selecting the tooltip card and editing within the text box.
Making Worksheets
- Rename the worksheet by right-clicking the tab on the bottom and click rename.
- Drag the “Artist Name” dimension to the Rows shelf.
- Drag the “Ms Played per Document” (or “Hours Played”) measure to the Columns shelf. Confirm that this appears as the Sum of Ms played by looking at the green pill. It should read SUM(Ms Played per Document).
- Reorganize the graph to sort descending in the toolbar.
- Apply any filters you would like by going to the Analysis menu, hovering over filters, and then filtering either axis (Ms preferred).
-
Follow the same process as above to make the following suggested charts or make your own to explore any questions you might have of your own data! Feel free to rename any labels or values on the charts to make the data easier to understand.
Follow the same process as above to make the following suggested charts or make your own to explore any questions you might have of your own data! Feel free to rename any labels or values on the charts to make the data easier to understand.
Recommended Charts
chart title | rows shelf | columns shelf | filters | Marks |
---|---|---|---|---|
Most Played Artists (Bar chart) |
Artist Name |
SUM(Ms Played per Document) |
SUM(Ms Played per Document) | |
Most Played Tracks (Bar chart) |
Track Name |
SUM(Ms Played per Document) |
SUM(Ms Played per Document)) |
Artist Name on Tooltip |
Playlists with the Most Tracks (Bar chart) |
Playlist Name |
SUM(Number of Records per Playlist1) |
SUM(Number of Records per Playlist) |
SUM(Number of Records per Playlist) on Label – Min/Max only |
Tracks w/ Most Listening Sessions (Bar chart) |
Track Name |
CNT(End Time) |
CNT(End Time) |
Artist Name on Tooltip |
Listening Session End Times (Line Graph) |
CNT(End Time) |
HOUR(End Time) |
CNT(End Time) on Tooltip and Label – Min/Max only |
|
Hours Played by Month (Line Graph) |
SUM(MS Played per Document) |
MONTH(End Time) |
Show Mark Labels – Min/Max only | |
Most followed playlists (stacked Bar) |
SUM(Number of Followers per Playlist) |
Playlist Name (Groups) |
CNT(Number of Followers per Playlist) | SUM(Number of Tracks per Playlist) on Tooltip |