+ - 0:00:00
Notes for current slide
Notes for next slide

Level Up 03: Self-learning with spotifyr

1 / 7

SeminRs

  • Informal, optional weekly sessions to help build a 'portfolio of skills'

  • 1-2 hours of instruction, demos, walk throughs & activities to try out

Essentials

  • Focused on the fundRmental skills to help you get started with learning R
  • Covering: basic wrangling & visualising data, 'pretty' R Markdown, inline code, debugging...

Level Up

  • Focused on more advanced programming skills & applying these skills to new fun topics
  • Covering: Papaja, advanced wrangling & manipulation of data, 'even prettier' R Markdown, spotifyR...


Session topics are not fixed - use the Padlet for suggestions!

2 / 7

Setup & Suggested Workflow

  • Create one R project file for all seminR sessions, create an r_docs & data folder & save all Rmds and datasets to these folders respectively

  • Make a cheat sheet of useful functions and # comment their meaning and usage as you go through seminRs, practicals, tutorials etc.

Task:

Open/create your seminRs project

Reminder:

File > New Project... New Directory > New Project > Give your project a name & location

3 / 7

Session Objectives

Self-learning with spotifyr

  • Self-learning is a key skill when learning to code
  • Need to develop good problem-solving skills to advance your knowledge independently
  • spotifyr is a fun package to develop these skills with


Tips

  • Use the package documentation in the help pane ?function or ?package
  • Find package documentation using help search ??function or ??package
  • Search questions/solutions online - ensure you can understand other people's code before copying it
  • Break down/change each line of code to understand it's function - play around!!
4 / 7

spotifyr

  • spotifyr is a package for pulling information from Spotify’s Web API
  • Used for accessing data relating to artists/tracks/playlists
  • Can create & follow playlists, get recommendations, pause/skip songs
  • Generally just contains lots of cool functions..

Setup

All the information you need to get started can be found in the setup .Rmd. Make sure to download this file to your seminRs Rproj directory or move it there manually.

Read the entire document first, then work through each step & ask any questions if you get stuck with accessing your data!

5 / 7

Some Suggested Tasks

  1. Find out what functions exist in the spotifyr package (hint: use ??package_name or search online)
  2. Pick a spotifyr function & describe the inputs and function to us (hint: use ?function_name)
  3. Have a look at the commands given in the .Rmd, look at the function arguments in the documentation & try changing some of the values to see how the output changes
  4. Use the get_user_playlists() function to see your playlists
  5. Use the get_playlist_audio_features() on a playlist
  6. Use get_my_currently_playing() to see what you are playing right now, & skip the song with skip_my_playback()
  7. Create a playlist using create_playlist()
  8. Add tracks to playlist using add_tracks_to_playlist()

Ultimately, just play around, see what information you can find out and what you can do!!

Tips

Try to figure it out yourself first before asking for help - look at package documentation/search online

Remember to give all relevant information whenever you get an error & need help (in any class) - we need the entire code that generated the error & the full error message

6 / 7

Made with Padlet
7 / 7

SeminRs

  • Informal, optional weekly sessions to help build a 'portfolio of skills'

  • 1-2 hours of instruction, demos, walk throughs & activities to try out

Essentials

  • Focused on the fundRmental skills to help you get started with learning R
  • Covering: basic wrangling & visualising data, 'pretty' R Markdown, inline code, debugging...

Level Up

  • Focused on more advanced programming skills & applying these skills to new fun topics
  • Covering: Papaja, advanced wrangling & manipulation of data, 'even prettier' R Markdown, spotifyR...


Session topics are not fixed - use the Padlet for suggestions!

2 / 7
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow