library(RCurl)
## Loading required package: bitops
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyr)
## 
## Attaching package: 'tidyr'
## The following object is masked from 'package:RCurl':
## 
##     complete
library(useful)
## Loading required package: ggplot2
URL <- getURL("https://raw.githubusercontent.com/DanielBrooks39/IS607/master/Project%202/App%20Download%20Data.csv")
AppData <- read.csv(text = URL, header = TRUE)
tbl_df(AppData)
## Source: local data frame [24 x 11]
## 
##          Store                   App.Name   Type Paid.Free Release.Date
##         (fctr)                     (fctr) (fctr)    (fctr)       (fctr)
## 1  Apple Store           Candy Crush Saga   Game      Free    4/12/2012
## 2  Apple Store                Fruit Ninja   Game      Free    4/21/2010
## 3  Apple Store                Angry Birds   Game      Free   12/11/2009
## 4  Apple Store             Subway Surfers   Game      Free    5/24/2012
## 5  Apple Store Despicable Me: Minion Rush   Game      Free    6/10/2013
## 6  Apple Store             Clash of Clans   Game      Free     8/2/2012
## 7  Apple Store                 Temple Run   Game      Free     8/4/2011
## 8  Apple Store            Angry Birds Rio   Game      Free    3/22/2011
## 9  Apple Store               Temple Run 2   Game      Free    1/16/2013
## 10 Apple Store         Words With Friends   Game      Free     7/9/2016
## ..         ...                        ...    ...       ...          ...
## Variables not shown: X2010 (int), X2011 (int), X2012 (int), X2013 (int),
##   X2014 (int), X2015 (int)
names(AppData) <- c("Store", "Name", "Type", "Paid/Free", "Release Date", "2010", "2011", "2012", "2013", "2014", "2015")
TidyData <- gather(AppData, "Year", "Downloads", 6:11)

Bar Graph for total number of Dwnloads by Store

ggplot(TidyData, aes(x=Store, y=Downloads, fill = Name)) + geom_bar(stat = "identity", position ="dodge") + theme(axis.text.x=element_text(face="bold", size=10), axis.text.y=element_text(face="bold", size=10)) + theme(axis.title.x=element_text(face="bold", size=20) , axis.title.y=element_text(face="bold", size=20)) + ggtitle("Total Number App Downloads by Store") + theme(plot.title=element_text(face="bold", size=15)) + theme(legend.title=element_text(face="bold", size=15,color="white"), legend.background=element_rect(fill="black"), legend.text=element_text(face="bold", color="white", size=10))

* This is a bar graph that shows the total times each app was downloaded broken aprat by the APple and Google store. We can see that the top download was Angry Birds (Shocker) for both stores, but it was downloaded more by the google store. The app that came ine second was words with friends


ggplot(TidyData, aes(x=Store, y=Downloads, fill = Name)) + geom_bar(stat ="identity", position ="dodge") + facet_grid(Year~.) + theme(panel.background = element_rect(fill = "black"), panel.grid.minor = element_line(color = "black")) + theme(strip.text.y=element_text(color="white", face="bold", size=15), strip.background=element_rect(fill="black")) + theme(axis.text.y=element_text(angle=30, face="bold", size=12), axis.text.x=element_text(face="bold", size=12), axis.title=element_text(face="bold", size=15)) + ggtitle("#App Downloads by Store (2010-2015)") + theme(plot.title=element_text(face="bold", size=15)) + theme(legend.title=element_text(face="bold", size=10,color="white"), legend.background=element_rect(fill="black"), legend.text=element_text(face="bold", color="white", size=8))

* This is a Facet graph. It compares the number of downloads to the store that it was downloaded in, and it breaks apart the downloads by the years. It shows that back in 2010, Words With Friends was the big game to download, but as we get closer to 2015, ANgry Birds becomes the top download and Wrds With Friends drops sown to one of the lowest downloads.