Skip to content

Commit 3a3088d

Browse files
authored
Added plots for frequency_of_download_apps and apps categories
1 parent 09310ad commit 3a3088d

8 files changed

+802
-0
lines changed

Diff for: analysis/frequency_of_download_apps_plots/analysis.r

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Download Range
2+
3+
my_vector1=c(8,10,44,35,140,65,131,62,104,37,37,9,27,2,6,2,2,1)
4+
pdf(paste("./", "downloadapps_barplot", ".pdf", sep=""), width=11, height=7)
5+
par(mgp=c(2,1,0),mar=c(12,12,5,5)+0.1)
6+
xx1 <- barplot(my_vector1, col = "#B2BEB5", ylim = c( 0 , 200 ), names.arg=c("1-5","5-10","10-50","50-100","100-500","500-1000","1000-5000","5000-10000","10000-50000","50000-100000","100000-500000","500000-1000000","1000000-5000000","5000000-10000000","10000000-50000000","50000000-100000000","100000000-500000000","1000000000-5000000000"), las=2, cex.axis = 0.8, cex.names=0.8)
7+
title(ylab="Frequency", line = 3)
8+
title(xlab="Download Range", line = 8)
9+
text(x = xx1, y = my_vector1, label = my_vector1, pos = 3, cex = 0.8, col = "black")
10+
dev.off()
11+
12+
# App Categories
13+
14+
my_vector1=c(11,10,2,34,21,53,33,20,84,15,16,24,17,4,22,14,12,80,5,18,171,26,25,6)
15+
pdf(paste("./", "appcategories_barplot", ".pdf", sep=""), width=11, height=7)
16+
par(mgp=c(2,1,0),mar=c(12,12,5,5)+0.1)
17+
xx1 <- barplot(my_vector1, col = "#B2BEB5", ylim = c( 0 , 200 ), names.arg=c("Books&Reference","Business","Comics","Communication","Customization","Education","Entertainment","Finance","Games","HealthandFitness","Libraries&Demo","Lifestyle","Media&Video","Medicine","Musicandaudio","News&Magazines","Photography","Productivity","Shopping","Social","Tools","Transportation","Travel&Local","Weather"), las=2, cex.axis = 0.8, cex.names=0.8)
18+
title(ylab="Frequency", line = 3)
19+
title(xlab="App Categories", line = 8)
20+
text(x = xx1, y = my_vector1, label = my_vector1, pos = 3, cex = 0.8, col = "black")
21+
dev.off()
22+
23+
24+
#commits
25+
inputdata <- read.csv("./targetedApps.csv")
26+
toPlot <- boxplot(inputdata$Commits)
27+
toPlot$out <- NULL
28+
toPlot$group <- NULL
29+
pdf(paste("./", "forcommits_boxplot", ".pdf", sep=""), width=3, height = 4)
30+
bxp(toPlot, xlab="", ylab="Commits per repository", ylim = c(0, 500), col = "#B2BEB5")
31+
dev.off()
32+
33+
# contributors
34+
35+
toPlot <- boxplot(inputdata$Contributors)
36+
toPlot$out <- NULL
37+
toPlot$group <- NULL
38+
pdf(paste("./", "forcontributors_boxplot", ".pdf", sep=""), width=3, height = 4)
39+
bxp(toPlot, xlab="", ylab="Contributors per repository", ylim = c(0, 10), col = "#B2BEB5")
40+
dev.off()
41+
42+
43+
# java files
44+
45+
toPlot <- boxplot(inputdata$JavaFiles)
46+
toPlot$out <- NULL
47+
# toPlot$group <- NULL
48+
pdf(paste("./", "forjavafiles_boxplot", ".pdf", sep=""), width=3, height = 4)
49+
bxp(toPlot, xlab="", ylab="Java files", col = "#B2BEB5")
50+
dev.off()
51+
52+
# loc
53+
54+
toPlot <- boxplot(inputdata$LinesOfCodesJava)
55+
toPlot$out <- NULL
56+
# toPlot$group <- NULL
57+
pdf(paste("./", "forloc_boxplot", ".pdf", sep=""), width=3, height = 4)
58+
bxp(toPlot, xlab="", ylab="Lines of Java code", col = "#B2BEB5")
59+
dev.off()
60+
61+
62+
# Download Range
63+
64+
df <- data.frame(dose=c("1-5","5-10","10-50","50-100","100-500","500-1000","1000-5000","5000-10000","10000-50000","50000-100000","100000-500000","500000-1000000","1000000-5000000","5000000-10000000","10000000-50000000","50000000-100000000","100000000-500000000","1000000000-5000000000"), len=c(8,10,44,35,140,65,131,62,104,37,37,9,27,2,6,2,2,1))
65+
ggplot(data=df, aes(x=dose, y=len)) +
66+
geom_bar(stat="identity", fill="steelblue")+
67+
geom_text(aes(label=len), vjust=-0.3, size=3.5)+
68+
theme_minimal() + labs(x = "Download Range", y = "Frequency") + theme(axis.text.x = element_text(angle = 70, hjust = 1))
69+
ggsave("./download__range.pdf", scale = 0.8, height = 10)
70+
71+
# App categories
72+
73+
df <- data.frame(dose=c("Books&Reference","Business","Comics","Communication","Customization","Education","Entertainment","Finance","Games","HealthandFitness","Libraries&Demo","Lifestyle","Media&Video","Medicine","Musicandaudio","News&Magazines","Photography","Productivity","Shopping","Social","Tools","Transportation","Travel&Local","Weather"),len=c(11,10,2,34,21,53,33,20,84,15,16,24,17,4,22,14,12,80,5,18,171,26,25,6))
74+
ggplot(data=df, aes(x=dose, y=len)) +
75+
geom_bar(stat="identity", fill="steelblue")+
76+
geom_text(aes(label=len), vjust=-0.3, size=3.5)+ theme_minimal() + labs(x = "Apps Categories", y = "Frequency") + theme(axis.text.x = element_text(angle = 70, hjust = 1))
77+
ggsave("./apps_categories.pdf", scale = 0.8, height = 10)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4.24 KB
Binary file not shown.

Diff for: analysis/frequency_of_download_apps_plots/targetedApps.csv

+725
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)