![]() # 1 Tie Let Me Paul Revere & the Raid… 1969 NA We also create another variable, rank, which is a more descriptive word than no.īillboard_raw %>% mutate ( rank = as.numeric ( no ), year = as.numeric ( year )) %>% filter ( is.na ( rank )) # Warning in evalq(as.numeric(no), ): NAs introduced by coercion OK, so we can see that no and year are characters, but really they should be numeric, as they aren’t written as “Number One” and “Nineteen Sixty”, so let’s coerce them into numbers with as.numeric. This is nice because it means you don’t have to consciously think about what might happen when you want to view the data - it doesn’t just vomit out the ENTIRE dataframe when you type wiki_hot_100s. # 7 7 It's Now or Never Elvis Presley 1960 # 3 3 Cathy's Clown The Everly Brothers 1960 # 1 1 Theme from A Summer Place Percy Faith 1960 visdat, which helps assist in pre-exploratory data analysis.tidyverse, to provide the nice tools we need to clean up and visualise the data.So, first things first, we’re going to load up our packages: This means that we don’t start with a perfectly clean dataset, and I try to take a bit of time to walk through some of the code. ![]() I also wanted to avoid the “draw the rest of the fucking owl” problem. So, this blogpost walks through how you might start to unpack the data, clean it, and draw some interesting conclusions. This seemed like a really cool dataset to look at, so last weekend I started to have a dig around and noticed that it had some nice examples of data munging with tidyverse packages and friends, and it seemed like it would make a nice blogpost case study, of sorts. … data sets regarding songs on the Billboard Hot 100 list from 1960 to 2016, including ranks for the given year, musical features, and lyrics. ![]() I was reading Joe Rickert’s R views blogpost about data packages in R, and saw the billboard package by Mikkel Krogsholm, which provides: Tidyverse Case Study: Exploring the Billboard Chartsĭata packages are something that have been on my mind a bit lately, having recently worked on the ozroaddeaths data access package at the rOpenSci ozunconf.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |