Tidyverse Packages
“Using one or more TidyVerse packages, and any dataset from fivethirtyeight.com or Kaggle, create a programming sample”vignette" that demonstrates how to use one or more of the capabilities of the selected TidyVerse package with your selected dataset."
The tidyverse package we will be using here is dplyr
Overview of dplyr
“dplyr is a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges:
mutate() adds new variables that are functions of existing variables select() picks variables based on their names. filter() picks cases based on their values. summarise() reduces multiple values down to a single summary. arrange() changes the ordering of the rows."
This assignment was accomplished by utilizing these packages for both data analysis and visualizations.
library(tidyverse)
library(knitr)
library(kableExtra)The Google play store dataset used is retrived from kaggle Dataset.
“While many public datasets (on Kaggle and the like) provide Apple App Store data, there are not many counterpart datasets available for Google Play Store apps anywhere on the web.”
StoreApps <- read_csv("https://raw.githubusercontent.com/DataScienceAR/Cuny-Assignments/master/Data-607/Data-Sets/googleplaystore.csv")## Parsed with column specification:
## cols(
## App = col_character(),
## Category = col_character(),
## Rating = col_double(),
## Reviews = col_double(),
## Size = col_character(),
## Installs = col_character(),
## Type = col_character(),
## Price = col_character(),
## `Content Rating` = col_character(),
## Genres = col_character(),
## `Last Updated` = col_character(),
## `Current Ver` = col_character(),
## `Android Ver` = col_character()
## )
tibble(StoreApps)## # A tibble: 10,841 x 1
## StoreApps$App $Category $Rating $Reviews $Size $Installs $Type $Price
## <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <chr>
## 1 Photo Editor~ ART_AND_~ 4.1 159 19M 10,000+ Free 0
## 2 Coloring boo~ ART_AND_~ 3.9 967 14M 500,000+ Free 0
## 3 U Launcher L~ ART_AND_~ 4.7 87510 8.7M 5,000,00~ Free 0
## 4 Sketch - Dra~ ART_AND_~ 4.5 215644 25M 50,000,0~ Free 0
## 5 Pixel Draw -~ ART_AND_~ 4.3 967 2.8M 100,000+ Free 0
## 6 Paper flower~ ART_AND_~ 4.4 167 5.6M 50,000+ Free 0
## 7 Smoke Effect~ ART_AND_~ 3.8 178 19M 50,000+ Free 0
## 8 Infinite Pai~ ART_AND_~ 4.1 36815 29M 1,000,00~ Free 0
## 9 Garden Color~ ART_AND_~ 4.4 13791 33M 1,000,00~ Free 0
## 10 Kids Paint F~ ART_AND_~ 4.7 121 3.1M 10,000+ Free 0
## # ... with 10,831 more rows, and 5 more variables: $`Content
## # Rating` <chr>, $Genres <chr>, $`Last Updated` <chr>, $`Current
## # Ver` <chr>, $`Android Ver` <chr>
Steps involved in data manipulations are
clean_set<-StoreApps %>%
select(Rating,Reviews,Genres) %>% # Filtering the columns
filter(Rating>=4.7) %>% # Filtering the rows for Rating equal or above 4.7
group_by(Genres,Rating) %>%
summarise(Average_Reviews=mean(Reviews))
kable(clean_set) %>%
kable_styling(bootstrap_options = c("striped", "hover"))| Genres | Rating | Average_Reviews |
|---|---|---|
| Action | 4.7 | 8.958499e+05 |
| Action | 5.0 | 4.000000e+00 |
| Adventure | 4.7 | 1.500000e+01 |
| Arcade | 4.7 | 9.602313e+05 |
| Arcade | 4.8 | 2.970865e+05 |
| Arcade | 5.0 | 7.375000e+00 |
| Arcade;Action & Adventure | 4.7 | 8.508000e+03 |
| Art & Design | 4.7 | 2.807050e+04 |
| Art & Design | 4.8 | 3.500000e+02 |
| Art & Design | 5.0 | 1.000000e+00 |
| Art & Design;Creativity | 4.7 | 9.197500e+03 |
| Auto & Vehicles | 4.8 | 2.495480e+04 |
| Auto & Vehicles | 4.9 | 4.431040e+04 |
| Beauty | 4.7 | 1.070350e+04 |
| Beauty | 4.8 | 1.040000e+02 |
| Beauty | 4.9 | 4.979000e+04 |
| Board | 4.7 | 8.513917e+04 |
| Board | 4.8 | 4.228000e+03 |
| Board;Brain Games | 4.7 | 1.190000e+03 |
| Board;Brain Games | 4.8 | 9.700000e+01 |
| Board;Pretend Play | 4.8 | 4.000000e+00 |
| Books & Reference | 4.7 | 1.494706e+05 |
| Books & Reference | 4.8 | 6.336818e+04 |
| Books & Reference | 4.9 | 2.315680e+05 |
| Books & Reference | 5.0 | 8.500000e+00 |
| Books & Reference;Education | 4.7 | 4.290000e+02 |
| Business | 4.7 | 4.018263e+04 |
| Business | 4.8 | 1.708080e+04 |
| Business | 4.9 | 2.100000e+01 |
| Business | 5.0 | 4.444444e+00 |
| Card | 4.7 | 3.197320e+05 |
| Card | 4.9 | 3.730200e+04 |
| Casino | 4.7 | 4.798025e+04 |
| Casual | 4.7 | 3.100000e+01 |
| Casual | 4.8 | 4.998247e+05 |
| Casual | 4.9 | 1.500000e+01 |
| Casual | 5.0 | 1.800000e+01 |
| Casual;Brain Games | 4.7 | 1.294800e+04 |
| Casual;Brain Games | 4.8 | 6.100000e+01 |
| Casual;Creativity | 4.7 | 2.941800e+04 |
| Casual;Pretend Play | 4.7 | 3.948420e+05 |
| Comics | 4.7 | 1.294020e+04 |
| Comics | 4.8 | 3.378300e+04 |
| Comics | 5.0 | 2.450000e+01 |
| Comics;Creativity | 4.8 | 5.160000e+02 |
| Communication | 4.7 | 5.730000e+02 |
| Communication | 4.8 | 4.537900e+04 |
| Communication | 5.0 | 3.600000e+00 |
| Dating | 4.7 | 2.101429e+02 |
| Dating | 4.8 | 8.424286e+02 |
| Dating | 4.9 | 7.760000e+02 |
| Dating | 5.0 | 4.333333e+00 |
| Education | 4.7 | 1.417271e+05 |
| Education | 4.8 | 1.230658e+04 |
| Education | 4.9 | 2.198750e+02 |
| Education | 5.0 | 1.166667e+01 |
| Education;Education | 4.7 | 4.404920e+06 |
| Education;Education | 4.9 | 1.331360e+05 |
| Education;Education | 5.0 | 1.000000e+00 |
| Education;Pretend Play | 4.7 | 1.643075e+04 |
| Education;Pretend Play | 4.9 | 1.100000e+01 |
| Educational | 4.7 | 1.424000e+03 |
| Educational;Education | 4.7 | 3.000000e+01 |
| Educational;Education | 4.8 | 2.300000e+01 |
| Entertainment | 4.7 | 2.311154e+03 |
| Entertainment | 4.8 | 4.048800e+03 |
| Entertainment | 4.9 | 9.447000e+03 |
| Entertainment | 5.0 | 5.526316e+00 |
| Entertainment;Brain Games | 4.8 | 2.691940e+05 |
| Entertainment;Creativity | 4.7 | 4.127440e+05 |
| Entertainment;Music & Video | 4.7 | 6.188000e+03 |
| Events | 4.7 | 7.500000e+01 |
| Events | 4.8 | 2.400000e+01 |
| Events | 4.9 | 6.900000e+01 |
| Events | 5.0 | 5.333333e+00 |
| February 11, 2018 | 19.0 | NA |
| Finance | 4.7 | 9.203152e+04 |
| Finance | 4.8 | 1.605250e+03 |
| Finance | 4.9 | 7.500000e+00 |
| Finance | 5.0 | 1.662500e+01 |
| Food & Drink | 4.7 | 2.936496e+05 |
| Food & Drink | 4.8 | 6.340000e+02 |
| Food & Drink | 5.0 | 1.500000e+00 |
| Health & Fitness | 4.7 | 2.675179e+04 |
| Health & Fitness | 4.8 | 2.922425e+05 |
| Health & Fitness | 4.9 | 1.130642e+05 |
| Health & Fitness | 5.0 | 4.500000e+00 |
| Health & Fitness;Education | 4.7 | 9.856000e+03 |
| House & Home | 4.7 | 1.200000e+02 |
| House & Home | 4.8 | 3.167000e+03 |
| Libraries & Demo | 4.7 | 1.172667e+03 |
| Libraries & Demo | 5.0 | 2.050000e+01 |
| Lifestyle | 4.7 | 1.094835e+05 |
| Lifestyle | 4.8 | 6.493000e+03 |
| Lifestyle | 4.9 | 1.157750e+03 |
| Lifestyle | 5.0 | 1.662069e+01 |
| Maps & Navigation | 4.7 | 6.830833e+04 |
| Maps & Navigation | 4.8 | 1.586500e+04 |
| Maps & Navigation | 4.9 | 8.650000e+01 |
| Medical | 4.7 | 2.107786e+04 |
| Medical | 4.8 | 3.007143e+04 |
| Medical | 4.9 | 1.432143e+04 |
| Medical | 5.0 | 2.785714e+00 |
| Music | 4.7 | 2.792915e+05 |
| Music;Music & Video | 4.7 | 1.430000e+02 |
| News & Magazines | 4.7 | 4.731723e+04 |
| News & Magazines | 4.8 | 1.785000e+02 |
| News & Magazines | 4.9 | 6.240000e+01 |
| News & Magazines | 5.0 | 1.271429e+01 |
| Parenting | 4.7 | 1.168302e+05 |
| Parenting | 4.8 | 4.787667e+03 |
| Parenting | 4.9 | 7.170000e+02 |
| Parenting | 5.0 | 1.000000e+00 |
| Parenting;Music & Video | 4.7 | 2.470000e+02 |
| Parenting;Music & Video | 4.8 | 1.940000e+03 |
| Personalization | 4.7 | 7.718046e+04 |
| Personalization | 4.8 | 4.772000e+02 |
| Personalization | 4.9 | 5.110000e+02 |
| Personalization | 5.0 | 4.100000e+00 |
| Photography | 4.7 | 3.029524e+05 |
| Photography | 4.8 | 5.481500e+04 |
| Photography | 4.9 | 7.000000e+00 |
| Photography | 5.0 | 1.066667e+01 |
| Productivity | 4.7 | 1.210892e+05 |
| Productivity | 4.8 | 1.494500e+03 |
| Productivity | 4.9 | 2.950000e+01 |
| Productivity | 5.0 | 9.250000e+00 |
| Puzzle | 4.7 | 8.394315e+05 |
| Puzzle | 4.8 | 1.854500e+04 |
| Puzzle | 4.9 | 1.058700e+04 |
| Puzzle | 5.0 | 5.000000e+00 |
| Puzzle;Brain Games | 4.7 | 1.887400e+05 |
| Racing | 4.7 | 4.328000e+03 |
| Racing | 5.0 | 3.000000e+00 |
| Role Playing | 4.7 | 2.452618e+05 |
| Role Playing | 4.8 | 5.192907e+05 |
| Role Playing;Action & Adventure | 4.7 | 1.920900e+04 |
| Shopping | 4.7 | 3.930279e+05 |
| Shopping | 4.8 | 1.400000e+01 |
| Shopping | 5.0 | 6.333333e+00 |
| Simulation | 4.7 | 2.615710e+05 |
| Simulation | 4.8 | 2.748620e+05 |
| Simulation | 4.9 | 4.625300e+04 |
| Simulation | 5.0 | 2.000000e+00 |
| Simulation;Action & Adventure | 4.7 | 4.864367e+04 |
| Simulation;Pretend Play | 4.8 | 1.213700e+04 |
| Social | 4.7 | 9.425320e+04 |
| Social | 4.8 | 2.329576e+05 |
| Social | 4.9 | 2.223500e+03 |
| Social | 5.0 | 1.112500e+01 |
| Sports | 4.7 | 1.768190e+05 |
| Sports | 4.8 | 3.837483e+04 |
| Sports | 4.9 | 3.743800e+03 |
| Sports | 5.0 | 1.525000e+01 |
| Strategy | 4.7 | 2.376767e+05 |
| Strategy | 4.8 | 1.304467e+06 |
| Tools | 4.7 | 2.310618e+06 |
| Tools | 4.8 | 4.007636e+04 |
| Tools | 4.9 | 6.050000e+01 |
| Tools | 5.0 | 1.017647e+01 |
| Travel & Local | 4.7 | 6.508008e+05 |
| Travel & Local | 4.8 | 2.034167e+04 |
| Travel & Local | 5.0 | 4.000000e+00 |
| Trivia | 4.7 | 1.910000e+02 |
| Trivia | 4.8 | 3.500000e+01 |
| Trivia | 5.0 | 5.000000e+00 |
| Video Players & Editors | 4.7 | 1.264593e+05 |
| Video Players & Editors | 4.8 | 5.740483e+05 |
| Video Players & Editors | 4.9 | 2.300000e+01 |
| Weather | 4.7 | 1.505667e+04 |
| Weather | 4.8 | 5.928000e+04 |
| Word | 4.7 | 1.773764e+05 |
| Word | 4.8 | 2.307533e+05 |
| Word | 4.9 | 5.900000e+01 |