class: center, middle, inverse, title-slide # Level Up 03: Self-learning with spotifyr --- class: inverse # 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, '.bold.pink[pretty]' R Markdown, inline code, debugging... ### *Level Up* - Focused on more advanced programming skills & applying these skills to new .bold.orange[fun] topics - Covering: Papaja, advanced wrangling & manipulation of data, '.bold.italic.pink[even prettier]' R Markdown, spotifyR... <br> *Session topics are not fixed - use the [Padlet](https://uofsussex.padlet.org/de84/seminrs) for suggestions!* --- class: inverse # 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 .orange[#] comment their meaning and usage as you go through seminRs, practicals, tutorials etc. ### .orange[Task]: Open/create your seminRs project #### .orange[Reminder]: File > New Project... New Directory > New Project > *Give your project a name & location* --- class: inverse # 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 <br> ### Tips - Use the package documentation in the help pane .orange[?function or ?package] - Find package documentation using help search .orange[??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!! --- class: inverse # 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.](https://and.netlify.app/seminr/03/level_up/levelup_03.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! --- class: inverse # Some Suggested Tasks 1. Find out what functions exist in the spotifyr package (hint: use ??package_name or search online) 1. Pick a spotifyr function & describe the inputs and function to us (hint: use ?function_name) 1. 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 1. Use the get_user_playlists() function to see your playlists 1. Use the get_playlist_audio_features() on a playlist 1. Use get_my_currently_playing() to see what you are playing right now, & skip the song with skip_my_playback() 1. Create a playlist using create_playlist() 1. 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!! ### .orange[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 --- class: center, middle <div class="padlet-embed" style="border:1px solid rgba(0,0,0,0.1);border-radius:2px;box-sizing:border-box;overflow:hidden;position:relative;width:100%;background:#F4F4F4"><p style="padding:0;margin:0"><iframe src="https://uofsussex.padlet.org/embed/nrud4gk8x63gbfdc" frameborder="0" allow="camera;microphone;geolocation" style="width:100%;height:608px;display:block;padding:0;margin:0"></iframe></p><div style="padding:8px;text-align:right;margin:0;"><a href="https://padlet.com?ref=embed" style="padding:0;margin:0;border:none;display:block;line-height:1;height:16px" target="_blank"><img src="https://padlet.net/embeds/made_with_padlet.png" width="86" height="16" style="padding:0;margin:0;background:none;border:none;display:inline;box-shadow:none" alt="Made with Padlet"></a></div></div>