Project is about data analysis of android and iOS apps . With the help of result we found in analysis we make the apps of those type which attract more users.
from csv import reader
opened_file1=open("AppleStore.csv")
opened_file2=open("googleplaystore.csv")
read_file1=reader(opened_file1)
read_file2=reader(opened_file2)
apple=list(read_file1)
android=list(read_file2)
def explore_data(dataset, start, end, rows_and_columns=False):
dataset_slice=dataset[start:end]
for i in dataset_slice:
print(i)
print("\n")
if rows_and_columns:
print("No. of rows: {}".format(len(dataset)))
print("No. of columns: {}".format(len(dataset[0])))
explore_data(apple,0,4,True)
print("\n")
explore_data(android,0,4)
['id', 'track_name', 'size_bytes', 'currency', 'price', 'rating_count_tot', 'rating_count_ver', 'user_rating', 'user_rating_ver', 'ver', 'cont_rating', 'prime_genre', 'sup_devices.num', 'ipadSc_urls.num', 'lang.num', 'vpp_lic'] ['284882215', 'Facebook', '389879808', 'USD', '0.0', '2974676', '212', '3.5', '3.5', '95.0', '4+', 'Social Networking', '37', '1', '29', '1'] ['389801252', 'Instagram', '113954816', 'USD', '0.0', '2161558', '1289', '4.5', '4.0', '10.23', '12+', 'Photo & Video', '37', '0', '29', '1'] ['529479190', 'Clash of Clans', '116476928', 'USD', '0.0', '2130805', '579', '4.5', '4.5', '9.24.12', '9+', 'Games', '38', '5', '18', '1'] No. of rows: 7198 No. of columns: 16 ['App', 'Category', 'Rating', 'Reviews', 'Size', 'Installs', 'Type', 'Price', 'Content Rating', 'Genres', 'Last Updated', 'Current Ver', 'Android Ver'] ['Photo Editor & Candy Camera & Grid & ScrapBook', 'ART_AND_DESIGN', '4.1', '159', '19M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design', 'January 7, 2018', '1.0.0', '4.0.3 and up'] ['Coloring book moana', 'ART_AND_DESIGN', '3.9', '967', '14M', '500,000+', 'Free', '0', 'Everyone', 'Art & Design;Pretend Play', 'January 15, 2018', '2.0.0', '4.0.3 and up'] ['U Launcher Lite – FREE Live Cool Themes, Hide Apps', 'ART_AND_DESIGN', '4.7', '87510', '8.7M', '5,000,000+', 'Free', '0', 'Everyone', 'Art & Design', 'August 1, 2018', '1.2.4', '4.0.3 and up']
android_header=android[0]
print(len(android))
del android[10472]
print(len(android))
10842 10841
for app in android:
name=app[0]
if name=="Instagram":
print(app)
['Instagram', 'SOCIAL', '4.5', '66577313', 'Varies with device', '1,000,000,000+', 'Free', '0', 'Teen', 'Social', 'July 31, 2018', 'Varies with device', 'Varies with device'] ['Instagram', 'SOCIAL', '4.5', '66577446', 'Varies with device', '1,000,000,000+', 'Free', '0', 'Teen', 'Social', 'July 31, 2018', 'Varies with device', 'Varies with device'] ['Instagram', 'SOCIAL', '4.5', '66577313', 'Varies with device', '1,000,000,000+', 'Free', '0', 'Teen', 'Social', 'July 31, 2018', 'Varies with device', 'Varies with device'] ['Instagram', 'SOCIAL', '4.5', '66509917', 'Varies with device', '1,000,000,000+', 'Free', '0', 'Teen', 'Social', 'July 31, 2018', 'Varies with device', 'Varies with device']
unique_android=[]
duplicate_android=[]
for app in android[1:]:
name=app[0]
if name in unique_android:
duplicate_android.append(name)
else:
unique_android.append(name)
print("No. of duplicate rows: {}".format(len(duplicate_android)))
print("\n")
print(unique_android[1:15])
No. of duplicate rows: 1181 ['Coloring book moana', 'U Launcher Lite – FREE Live Cool Themes, Hide Apps', 'Sketch - Draw & Paint', 'Pixel Draw - Number Art Coloring Book', 'Paper flowers instructions', 'Smoke Effect Photo Maker - Smoke Editor', 'Infinite Painter', 'Garden Coloring Book', 'Kids Paint Free - Drawing Fun', 'Text on Photo - Fonteee', 'Name Art Photo Editor - Focus n Filters', 'Tattoo Name On My Photo Editor', 'Mandala Coloring Book', '3D Color Pixel by Number - Sandbox Art Coloring']
reviews_max={}
del android[10472]
for app in android[1:]:
name=app[0]
n_reviews=float(app[3])
if name in reviews_max and (reviews_max[name]<n_reviews):
reviews_max[name]=n_reviews
else:
reviews_max[name]=n_reviews
print(len(reviews_max))
print(len(android[1:])-1181)
print(len(reviews_max))
9658 9658 9658
android_clean=[]
already_added=[]
for app in android[1:]:
name=app[0]
n_reviews=float(app[3])
if n_reviews==reviews_max[name] and name not in already_added:
android_clean.append(app)
already_added.append(name)
print(len(android_clean))
9658
def check_english(string):
count=0
for i in string:
if ord(i)>127:
count+=1
if count>3:
return False
else:
return True
english_android=[]
english_apple=[]
for app in android_clean:
name=app[0]
if check_english(name):
english_android.append(app)
for app in apple[1:]:
name=app[1]
if check_english(name):
english_apple.append(app)
explore_data(english_android,0,4,True)
explore_data(english_apple,0,4,True)
['Photo Editor & Candy Camera & Grid & ScrapBook', 'ART_AND_DESIGN', '4.1', '159', '19M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design', 'January 7, 2018', '1.0.0', '4.0.3 and up'] ['U Launcher Lite – FREE Live Cool Themes, Hide Apps', 'ART_AND_DESIGN', '4.7', '87510', '8.7M', '5,000,000+', 'Free', '0', 'Everyone', 'Art & Design', 'August 1, 2018', '1.2.4', '4.0.3 and up'] ['Sketch - Draw & Paint', 'ART_AND_DESIGN', '4.5', '215644', '25M', '50,000,000+', 'Free', '0', 'Teen', 'Art & Design', 'June 8, 2018', 'Varies with device', '4.2 and up'] ['Pixel Draw - Number Art Coloring Book', 'ART_AND_DESIGN', '4.3', '967', '2.8M', '100,000+', 'Free', '0', 'Everyone', 'Art & Design;Creativity', 'June 20, 2018', '1.1', '4.4 and up'] No. of rows: 9613 No. of columns: 13 ['284882215', 'Facebook', '389879808', 'USD', '0.0', '2974676', '212', '3.5', '3.5', '95.0', '4+', 'Social Networking', '37', '1', '29', '1'] ['389801252', 'Instagram', '113954816', 'USD', '0.0', '2161558', '1289', '4.5', '4.0', '10.23', '12+', 'Photo & Video', '37', '0', '29', '1'] ['529479190', 'Clash of Clans', '116476928', 'USD', '0.0', '2130805', '579', '4.5', '4.5', '9.24.12', '9+', 'Games', '38', '5', '18', '1'] ['420009108', 'Temple Run', '65921024', 'USD', '0.0', '1724546', '3842', '4.5', '4.0', '1.6.2', '9+', 'Games', '40', '5', '1', '1'] No. of rows: 6183 No. of columns: 16
free_android=[]
free_apple=[]
for app in english_android:
price=app[7]
if price=='0':
free_android.append(app)
for app in english_apple:
price=app[4]
if price=='0.0':
free_apple.append(app)
print(len(free_android))
print(len(free_apple))
8863 3222
def freq_table(dataset,index):
genre={}
total=0
for row in dataset:
total+=1
value=row[index]
if value in genre:
genre[value]+=1
else:
genre[value]=1
genre_per={}
for app in genre:
per=(genre[app] / total)*100
genre_per[app]=per
return genre_per
def display_table(dataset, index):
table = freq_table(dataset, index)
table_display = []
for key in table:
key_val_as_tuple = (table[key], key)
table_display.append(key_val_as_tuple)
table_sorted = sorted(table_display, reverse = True)
for entry in table_sorted:
print(entry[1], ':', entry[0])
display_table(free_android,1)
print("\n")
display_table(free_apple,-5)
FAMILY : 19.225995712512695 GAME : 9.511452104253639 TOOLS : 8.462146000225657 BUSINESS : 4.580841701455489 LIFESTYLE : 3.9038700214374367 PRODUCTIVITY : 3.8925871601038025 FINANCE : 3.7007785174320205 MEDICAL : 3.542818458761142 SPORTS : 3.4187069840911652 PERSONALIZATION : 3.3058783707548236 COMMUNICATION : 3.2494640640866526 HEALTH_AND_FITNESS : 3.068938282748505 PHOTOGRAPHY : 2.944826808078529 NEWS_AND_MAGAZINES : 2.798149610741284 SOCIAL : 2.6627552747376737 TRAVEL_AND_LOCAL : 2.335552296062281 SHOPPING : 2.245289405393208 BOOKS_AND_REFERENCE : 2.1437436533904997 DATING : 1.8616721200496444 VIDEO_PLAYERS : 1.7826920907142052 MAPS_AND_NAVIGATION : 1.399074805370642 FOOD_AND_DRINK : 1.241114746699763 EDUCATION : 1.128286133363421 LIBRARIES_AND_DEMO : 0.9364774906916393 AUTO_AND_VEHICLES : 0.9251946293580051 ENTERTAINMENT : 0.8800631840234684 HOUSE_AND_HOME : 0.8236488773552973 WEATHER : 0.8010831546880289 EVENTS : 0.7108202640189552 PARENTING : 0.6544059573507841 ART_AND_DESIGN : 0.6431230960171499 COMICS : 0.6205573733498815 BEAUTY : 0.5979916506826132 Games : 58.16263190564867 Entertainment : 7.883302296710118 Photo & Video : 4.9658597144630665 Education : 3.662321539416512 Social Networking : 3.2898820608317814 Shopping : 2.60707635009311 Utilities : 2.5139664804469275 Sports : 2.1415270018621975 Music : 2.0484171322160147 Health & Fitness : 2.0173805090006205 Productivity : 1.7380509000620732 Lifestyle : 1.5828677839851024 News : 1.3345747982619491 Travel : 1.2414649286157666 Finance : 1.1173184357541899 Weather : 0.8690254500310366 Food & Drink : 0.8069522036002483 Reference : 0.5586592178770949 Business : 0.5276225946617008 Book : 0.4345127250155183 Navigation : 0.186219739292365 Medical : 0.186219739292365 Catalogs : 0.12414649286157665
The most genre in iOS is Gaming and runner-up is Entertainment. General impression is most of the apps genres is gaming.
The most common genre in Play Store is Family followed by games and tools
genres_android=freq_table(free_android,-4)
for genre in genres_android:
total=0
len_category=0
for app in free_android:
category_app=app[-4]
if category_app==genre:
n_installs=app[5]
n_installs=n_installs.replace('+','')
n_installs=float(n_installs.replace(',',''))
total+=n_installs
len_category+=1
print(" {1}: {0}".format((total/len_category),genre))
Trivia;Education: 100.0 Puzzle;Action & Adventure: 18366666.666666668 Lifestyle: 1412998.3449275363 Art & Design;Creativity: 285000.0 Role Playing;Brain Games: 10000000.0 Business: 1704192.3399014778 Casual;Pretend Play: 6957142.857142857 Beauty: 513151.88679245283 Educational;Pretend Play: 9375000.0 Casual;Education: 1000000.0 Comics;Creativity: 50000.0 Entertainment;Creativity: 4000000.0 Educational;Action & Adventure: 17016666.666666668 Board;Brain Games: 407142.85714285716 Role Playing;Action & Adventure: 7000000.0 Simulation;Pretend Play: 550000.0 Travel & Local;Action & Adventure: 100000.0 Health & Fitness: 4167457.3602941176 Puzzle: 8302861.91 Racing;Action & Adventure: 8816666.666666666 Simulation: 3475484.08839779 Food & Drink: 1924897.7363636363 Racing;Pretend Play: 1000000.0 Libraries & Demo: 638503.734939759 Parenting: 467977.5 Education;Brain Games: 5333333.333333333 Entertainment: 5602792.775092937 Trivia: 3475712.7027027025 Casual;Creativity: 5333333.333333333 Role Playing;Pretend Play: 5275000.0 Music: 9445583.333333334 Art & Design: 2122850.9433962265 Books & Reference: 8767811.894736841 Tools;Education: 10000000.0 Art & Design;Pretend Play: 500000.0 Adventure: 4922785.333333333 Casual;Music & Video: 10000000.0 Action: 12603588.872727273 Photography: 17840110.40229885 Education;Music & Video: 2033333.3333333333 Adventure;Action & Adventure: 35333333.333333336 Entertainment;Education: 1000000.0 Communication: 38326063.197916664 Music;Music & Video: 5050000.0 Education;Pretend Play: 1800000.0 Educational;Education: 1737143.142857143 Books & Reference;Education: 1000.0 Events: 253542.22222222222 Puzzle;Creativity: 750000.0 Education;Education: 4759517.0 Strategy;Education: 500000.0 Shopping: 7036877.311557789 Parenting;Music & Video: 1118333.3333333333 Maps & Navigation: 4056941.7741935486 Word: 9094458.695652174 Health & Fitness;Education: 100000.0 Racing: 15910645.681818182 Adventure;Education: 10000000.0 Communication;Creativity: 500000.0 Card;Action & Adventure: 10000000.0 House & Home: 1331540.5616438356 Casual;Brain Games: 1425916.6666666667 Sports: 4596842.615635179 Video Players & Editors;Music & Video: 7500000.0 Medical: 123064.7898089172 Music & Audio;Music & Video: 500000.0 Auto & Vehicles: 647317.8170731707 Entertainment;Action & Adventure: 2333333.3333333335 Puzzle;Brain Games: 9280666.666666666 Arcade: 22779951.151515152 Role Playing: 3965645.421686747 Tools: 10802461.246995995 Casual;Action & Adventure: 12916666.666666666 Educational;Brain Games: 4433333.333333333 Travel & Local: 14051476.145631067 Art & Design;Action & Adventure: 100000.0 Entertainment;Pretend Play: 3000000.0 Card;Brain Games: 100000.0 Board;Action & Adventure: 3000000.0 Parenting;Education: 452857.14285714284 Educational: 411184.8484848485 Arcade;Pretend Play: 1000000.0 Comics: 831873.1481481482 Simulation;Education: 500.0 Lifestyle;Education: 100000.0 Personalization: 5218893.815699658 Educational;Creativity: 2333333.3333333335 Weather: 5074486.197183099 Strategy: 11199902.530864198 Arcade;Action & Adventure: 3190909.1818181816 Dating: 854028.8303030303 Productivity: 16772838.591304347 Entertainment;Music & Video: 6413333.333333333 Social: 23253652.127118643 Education: 550185.4430379746 News & Magazines: 9549178.467741935 Video Players & Editors: 24790074.17721519 Strategy;Action & Adventure: 1000000.0 Simulation;Action & Adventure: 4857142.857142857 Strategy;Creativity: 1000000.0 Card: 3656884.6153846155 Education;Action & Adventure: 1000000.0 Sports;Action & Adventure: 5050000.0 Action;Action & Adventure: 5888888.888888889 Lifestyle;Pretend Play: 10000000.0 Casual: 19630958.51612903 Finance: 1387692.475609756 Entertainment;Brain Games: 3314285.714285714 Board: 4759209.117647059 Casino: 3427910.5263157897 Health & Fitness;Action & Adventure: 1000000.0 Education;Creativity: 2875000.0 Puzzle;Education: 100000.0 Parenting;Brain Games: 1000000.0