This project is an study of the most profitable apps in Google Play and Apple Store, the objective is identify the most downloaded apps, the apps with more ratings, and how much these apps cost.
##Google play dataset##
opened_file = open('googleplaystore.csv')
from csv import reader
read_file = reader(opened_file)
android = list(read_file)
android_header = android[0]
android = android[1:]
##Apple Store dataset##
opened_file = open('AppleStore.csv')
from csv import reader
read_file = reader(opened_file)
ios = list(read_file)
ios_header = ios[0]
ios = ios[1:]
Next, we go to explore the data, we are going to define a function called explore data.
This function calls four parameters:
dataset
: is to be expected a lists of listsStart an End
: are integers and represent the starting and ending indice from the data set.rows and columns
: is a boolean (True
or False
)def explore_data(dataset, start, end, rows_and_columns=False):
dataset_slice = dataset[start:end]
for row in dataset_slice:
print(row)
print('\n') # adds a new empty line after each row
if rows_and_columns:
print('Number of rows: ', len(dataset))
print('Number of columns: ', len(dataset[0]))
return '\n' # add this empty line to avoid the "none" result
Next we are going to print the first few rows of each data set, first the android dat set.
print(android_header)
print('\n')
print(explore_data(android, 0, 3, True))
['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'] Number of rows: 10841 Number of columns: 13
The google play counts with 10841 apps and 13 columns, the information of the columns could be seen in the source of the dataset.
Next we do the same with the Apple Store data set.
print(ios_header)
print('\n')
print(explore_data(ios, 0, 3, True))
['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'] Number of rows: 7197 Number of columns: 16
Apple store counts a total of 7197 apps and 16 columns, the explanation of the columns could be seen in the documentation
for row in android:
if len(row) != len(android_header):
print(row) # This print the row with different lenght
print('\n')
print(android.index(row))# This print the number of thw row
print(len(row))# We verify the len of the row
print('\n')
print(android_header)# This print the header
print(len(android_header)) #Verify the len of the header
print('\n')
['Life Made WI-Fi Touchscreen Photo Frame', '1.9', '19', '3.0M', '1,000+', 'Free', '0', 'Everyone', '', 'February 11, 2018', '1.0.19', '4.0 and up'] 10472 12 ['App', 'Category', 'Rating', 'Reviews', 'Size', 'Installs', 'Type', 'Price', 'Content Rating', 'Genres', 'Last Updated', 'Current Ver', 'Android Ver'] 13
Once verified, we will delete this row:
print(len(android))
del (android[10472]) # This function deletes a given row
print (len(android))
10841 10840
Now we are going to explore if we have duplicated entries. We create two list for the android dat set to explore which apps have duplicates.
duplicate_apps = []
unique_apps = []
for app in android:
name = app[0]
if name in unique_apps:
duplicate_apps.append(name)
else:
unique_apps.append(name)
print('Number of duplicate apps: ', len(duplicate_apps))
print('\n')
print('Examples of duplicate apps:', duplicate_apps[:15])
print('\n')
Number of duplicate apps: 1181 Examples of duplicate apps: ['Quick PDF Scanner + OCR FREE', 'Box', 'Google My Business', 'ZOOM Cloud Meetings', 'join.me - Simple Meetings', 'Box', 'Zenefits', 'Google Ads', 'Google My Business', 'Slack', 'FreshBooks Classic', 'Insightly CRM', 'QuickBooks Accounting: Invoicing & Expenses', 'HipChat - Chat Built for Teams', 'Xero Accounting Software']
We need to see how the duplicated apps appear in the data set, so we are going to print an example:
for app in android:
name = app[0]
if name == 'Quick PDF Scanner + OCR FREE':
print(app)
['Quick PDF Scanner + OCR FREE', 'BUSINESS', '4.2', '80805', 'Varies with device', '5,000,000+', 'Free', '0', 'Everyone', 'Business', 'February 26, 2018', 'Varies with device', '4.0.3 and up'] ['Quick PDF Scanner + OCR FREE', 'BUSINESS', '4.2', '80805', 'Varies with device', '5,000,000+', 'Free', '0', 'Everyone', 'Business', 'February 26, 2018', 'Varies with device', '4.0.3 and up'] ['Quick PDF Scanner + OCR FREE', 'BUSINESS', '4.2', '80804', 'Varies with device', '5,000,000+', 'Free', '0', 'Everyone', 'Business', 'February 26, 2018', 'Varies with device', '4.0.3 and up']
We don't want to remove all the duplicate entries, we need to get almost one entry. We can use a filter, in this case the number of reviews, if an app
entry have a greater number of reviews, this would be and older version, so we are going to use this criterion:
In this step we need first to identify the version of the duplicate app that has the most reviews:
print ('Expected length: ', len(android) - 1181)
reviews_max = {}
for app in android:
name = app[0]
n_reviews = float(app[3])
if name in reviews_max and reviews_max[name] < n_reviews:
reviews_max[name] = n_reviews
elif name not in reviews_max:
reviews_max[name] = n_reviews
print('Result length:', len(reviews_max))
Expected length: 9659 Result length: 9659
Now, we are going to use the dictionary to remove the duplicated rows.
Use the dictionary you created above to remove the duplicate rows. Into the loop use an If statement:
android_clean = [] #Create first two empty list
already_added = []
for app in android:
name = app[0] # Assign the app name to a variable
n_reviews = float(app[3]) # Convert the number of reviews to float and assig to a variable
if (n_reviews == reviews_max[name]) and (name not in already_added):
android_clean.append(app)
already_added.append(name)
We now must explore the android_clean
dataset to check the result:
explore_data(android_clean, 0, 3, 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'] Number of rows: 9659 Number of columns: 13
'\n'
Now we need to confirm that in the Apple Store data does not have duplicates:
duplicate_apps_ios = []
unique_apps_ios = []
for app_id in ios:
id_ios = app_id[0]
if id_ios in unique_apps_ios:
duplicate_apps_ios.append(id_ios)
else:
unique_apps_ios.append(id_ios)
print('Number of duplicate apps: ', len(duplicate_apps_ios))
print('\n')
print('Examples of duplicate apps:', duplicate_apps_ios[:15])
print('\n')
Number of duplicate apps: 0 Examples of duplicate apps: []
To remove the non-english apps we need to find a criteria to verify that all the string have english characters. In this case we are going to use the ord()
function, this function return us the number of the character according ASCII clasification. If the number is greatre than 127 the character is not part of the common used characters on english.
def name_str(string):
for character in string:
if ord(character) > 127:
return False
return True
print(name_str('Instagram'))
print(name_str('爱奇艺PPS -《欢乐颂2》电视剧热播'))
print(name_str('Docs To Go™ Free Office Suite'))
print(name_str('Instachat 😜'))
True False False False
Since we are going to exclude using this system apps that are in english but with special characters, we are going to use another additional criteria to review the code.
def name_str_eng(string):
ascii_n = 0
for character in string:
if ord(character) > 127:
ascii_n += 1
if ascii_n > 3:
return False
return True
print(name_str_eng('爱奇艺PPS -《欢乐颂2》电视剧热播'))
print(name_str_eng('Docs To Go™ Free Office Suite'))
print(name_str_eng('Instachat 😜'))
False True True
Now we are going to use the new function to filter the name of the apps. We are going to use the function in two loops, one for android apps other for apple apps.
android_eng = []
ios_eng = []
for app in android_clean:
name = app [0]
if name_str_eng(name):
android_eng.append(app)
for app in ios:
name = app [1]
if name_str_eng(name):
ios_eng.append(app)
print(explore_data(ios_eng, 0, 3, True))
print('\n')
print(explore_data(android_eng, 0, 3, True))
['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'] Number of rows: 6183 Number of columns: 16 ['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'] Number of rows: 9614 Number of columns: 13
Original in android we have 10841, in ios 7197. Noe in Android we have 9614 apps, and in Ios we have 6183 apps.
We are going to work only with free apps. So we are going to use the same loops of the previous step, but in this case we are put the criteria of price 0.
android_free = []
ios_free = []
for app in android_eng:
price = app [7]
if price == '0':
android_free.append(app)
for app in ios_eng:
price = app [4]
if price == '0.0':
ios_free.append(app)
print(explore_data(ios_free, 0, 3, True))
print('\n')
print(explore_data(android_free, 0, 3, True))
['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'] Number of rows: 3222 Number of columns: 16 ['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'] Number of rows: 8864 Number of columns: 13
Following the result now we have 8864 android apps and 3222 ios apps, this is the final step, we are not going to clean more our data.
Our direction is towards to put a first app on android to later put the app in ios:
The columns that could be useful for the analisis are in ios apps primer_genre
and in android apps Genres
and Category
.
So to identify the genree we are going to do the following steps:
def freq_table(data_set, index):
frequency_table = {}
for app in data_set:
value = app[index]
if value in frequency_table:
frequency_table[value] += 1
else:
frequency_table[value] = 1
return frequency_table
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])
return '\n'
print(display_table(ios_free, -5))
print('\n')
print(display_table(android_free, -4))
print('\n')
print(display_table(android_free, 1))
print('\n')
Games : 1874 Entertainment : 254 Photo & Video : 160 Education : 118 Social Networking : 106 Shopping : 84 Utilities : 81 Sports : 69 Music : 66 Health & Fitness : 65 Productivity : 56 Lifestyle : 51 News : 43 Travel : 40 Finance : 36 Weather : 28 Food & Drink : 26 Reference : 18 Business : 17 Book : 14 Navigation : 6 Medical : 6 Catalogs : 4 Tools : 749 Entertainment : 538 Education : 474 Business : 407 Productivity : 345 Lifestyle : 345 Finance : 328 Medical : 313 Sports : 307 Personalization : 294 Communication : 287 Action : 275 Health & Fitness : 273 Photography : 261 News & Magazines : 248 Social : 236 Travel & Local : 206 Shopping : 199 Books & Reference : 190 Simulation : 181 Dating : 165 Arcade : 164 Video Players & Editors : 157 Casual : 156 Maps & Navigation : 124 Food & Drink : 110 Puzzle : 100 Racing : 88 Role Playing : 83 Libraries & Demo : 83 Auto & Vehicles : 82 Strategy : 81 House & Home : 73 Weather : 71 Events : 63 Adventure : 60 Comics : 54 Beauty : 53 Art & Design : 53 Parenting : 44 Card : 40 Casino : 38 Trivia : 37 Educational;Education : 35 Board : 34 Educational : 33 Education;Education : 30 Word : 23 Casual;Pretend Play : 21 Music : 18 Racing;Action & Adventure : 15 Puzzle;Brain Games : 15 Entertainment;Music & Video : 15 Casual;Brain Games : 12 Casual;Action & Adventure : 12 Arcade;Action & Adventure : 11 Action;Action & Adventure : 9 Educational;Pretend Play : 8 Simulation;Action & Adventure : 7 Parenting;Education : 7 Entertainment;Brain Games : 7 Board;Brain Games : 7 Parenting;Music & Video : 6 Educational;Brain Games : 6 Casual;Creativity : 6 Art & Design;Creativity : 6 Education;Pretend Play : 5 Role Playing;Pretend Play : 4 Education;Creativity : 4 Role Playing;Action & Adventure : 3 Puzzle;Action & Adventure : 3 Entertainment;Creativity : 3 Entertainment;Action & Adventure : 3 Educational;Creativity : 3 Educational;Action & Adventure : 3 Education;Music & Video : 3 Education;Brain Games : 3 Education;Action & Adventure : 3 Adventure;Action & Adventure : 3 Video Players & Editors;Music & Video : 2 Sports;Action & Adventure : 2 Simulation;Pretend Play : 2 Puzzle;Creativity : 2 Music;Music & Video : 2 Entertainment;Pretend Play : 2 Casual;Education : 2 Board;Action & Adventure : 2 Video Players & Editors;Creativity : 1 Trivia;Education : 1 Travel & Local;Action & Adventure : 1 Tools;Education : 1 Strategy;Education : 1 Strategy;Creativity : 1 Strategy;Action & Adventure : 1 Simulation;Education : 1 Role Playing;Brain Games : 1 Racing;Pretend Play : 1 Puzzle;Education : 1 Parenting;Brain Games : 1 Music & Audio;Music & Video : 1 Lifestyle;Pretend Play : 1 Lifestyle;Education : 1 Health & Fitness;Education : 1 Health & Fitness;Action & Adventure : 1 Entertainment;Education : 1 Communication;Creativity : 1 Comics;Creativity : 1 Casual;Music & Video : 1 Card;Action & Adventure : 1 Books & Reference;Education : 1 Art & Design;Pretend Play : 1 Art & Design;Action & Adventure : 1 Arcade;Pretend Play : 1 Adventure;Education : 1 FAMILY : 1676 GAME : 862 TOOLS : 750 BUSINESS : 407 LIFESTYLE : 346 PRODUCTIVITY : 345 FINANCE : 328 MEDICAL : 313 SPORTS : 301 PERSONALIZATION : 294 COMMUNICATION : 287 HEALTH_AND_FITNESS : 273 PHOTOGRAPHY : 261 NEWS_AND_MAGAZINES : 248 SOCIAL : 236 TRAVEL_AND_LOCAL : 207 SHOPPING : 199 BOOKS_AND_REFERENCE : 190 DATING : 165 VIDEO_PLAYERS : 159 MAPS_AND_NAVIGATION : 124 FOOD_AND_DRINK : 110 EDUCATION : 103 ENTERTAINMENT : 85 LIBRARIES_AND_DEMO : 83 AUTO_AND_VEHICLES : 82 HOUSE_AND_HOME : 73 WEATHER : 71 EVENTS : 63 PARENTING : 58 ART_AND_DESIGN : 57 COMICS : 55 BEAUTY : 53
We can also visualize the results in percentage to see a more consolidated data for analisis. In this case, inside the freq_table
function we include frequency_percentage
dictionary, that uses the percentage of the genre of the total of genres in the index.
def freq_table(data_set, index):
frequency_table = {}
total = 0
for app in data_set:
total += 1
value = app[index]
if value in frequency_table:
frequency_table[value] += 1
else:
frequency_table[value] = 1
frequency_percentage = {}
for value in frequency_table:
percentage = (frequency_table[value]/ total)*100
frequency_percentage[value] = percentage
return frequency_percentage
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])
return '\n'
print(display_table(ios_free, -5))
print('\n')
print(display_table(android_free, -4))
print('\n')
print(display_table(android_free, 1))
print('\n')
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 Tools : 8.449909747292418 Entertainment : 6.069494584837545 Education : 5.347472924187725 Business : 4.591606498194946 Productivity : 3.892148014440433 Lifestyle : 3.892148014440433 Finance : 3.7003610108303246 Medical : 3.531137184115524 Sports : 3.463447653429603 Personalization : 3.3167870036101084 Communication : 3.2378158844765346 Action : 3.1024368231046933 Health & Fitness : 3.0798736462093865 Photography : 2.944494584837545 News & Magazines : 2.7978339350180503 Social : 2.6624548736462095 Travel & Local : 2.3240072202166067 Shopping : 2.2450361010830324 Books & Reference : 2.1435018050541514 Simulation : 2.0419675090252705 Dating : 1.861462093862816 Arcade : 1.8501805054151623 Video Players & Editors : 1.7712093862815883 Casual : 1.7599277978339352 Maps & Navigation : 1.3989169675090252 Food & Drink : 1.2409747292418771 Puzzle : 1.128158844765343 Racing : 0.9927797833935018 Role Playing : 0.9363718411552346 Libraries & Demo : 0.9363718411552346 Auto & Vehicles : 0.9250902527075812 Strategy : 0.9138086642599278 House & Home : 0.8235559566787004 Weather : 0.8009927797833934 Events : 0.7107400722021661 Adventure : 0.6768953068592057 Comics : 0.6092057761732852 Beauty : 0.5979241877256317 Art & Design : 0.5979241877256317 Parenting : 0.4963898916967509 Card : 0.45126353790613716 Casino : 0.42870036101083037 Trivia : 0.41741877256317694 Educational;Education : 0.39485559566787 Board : 0.3835740072202166 Educational : 0.3722924187725632 Education;Education : 0.33844765342960287 Word : 0.2594765342960289 Casual;Pretend Play : 0.236913357400722 Music : 0.2030685920577617 Racing;Action & Adventure : 0.16922382671480143 Puzzle;Brain Games : 0.16922382671480143 Entertainment;Music & Video : 0.16922382671480143 Casual;Brain Games : 0.13537906137184114 Casual;Action & Adventure : 0.13537906137184114 Arcade;Action & Adventure : 0.12409747292418773 Action;Action & Adventure : 0.10153429602888085 Educational;Pretend Play : 0.09025270758122744 Simulation;Action & Adventure : 0.078971119133574 Parenting;Education : 0.078971119133574 Entertainment;Brain Games : 0.078971119133574 Board;Brain Games : 0.078971119133574 Parenting;Music & Video : 0.06768953068592057 Educational;Brain Games : 0.06768953068592057 Casual;Creativity : 0.06768953068592057 Art & Design;Creativity : 0.06768953068592057 Education;Pretend Play : 0.056407942238267145 Role Playing;Pretend Play : 0.04512635379061372 Education;Creativity : 0.04512635379061372 Role Playing;Action & Adventure : 0.033844765342960284 Puzzle;Action & Adventure : 0.033844765342960284 Entertainment;Creativity : 0.033844765342960284 Entertainment;Action & Adventure : 0.033844765342960284 Educational;Creativity : 0.033844765342960284 Educational;Action & Adventure : 0.033844765342960284 Education;Music & Video : 0.033844765342960284 Education;Brain Games : 0.033844765342960284 Education;Action & Adventure : 0.033844765342960284 Adventure;Action & Adventure : 0.033844765342960284 Video Players & Editors;Music & Video : 0.02256317689530686 Sports;Action & Adventure : 0.02256317689530686 Simulation;Pretend Play : 0.02256317689530686 Puzzle;Creativity : 0.02256317689530686 Music;Music & Video : 0.02256317689530686 Entertainment;Pretend Play : 0.02256317689530686 Casual;Education : 0.02256317689530686 Board;Action & Adventure : 0.02256317689530686 Video Players & Editors;Creativity : 0.01128158844765343 Trivia;Education : 0.01128158844765343 Travel & Local;Action & Adventure : 0.01128158844765343 Tools;Education : 0.01128158844765343 Strategy;Education : 0.01128158844765343 Strategy;Creativity : 0.01128158844765343 Strategy;Action & Adventure : 0.01128158844765343 Simulation;Education : 0.01128158844765343 Role Playing;Brain Games : 0.01128158844765343 Racing;Pretend Play : 0.01128158844765343 Puzzle;Education : 0.01128158844765343 Parenting;Brain Games : 0.01128158844765343 Music & Audio;Music & Video : 0.01128158844765343 Lifestyle;Pretend Play : 0.01128158844765343 Lifestyle;Education : 0.01128158844765343 Health & Fitness;Education : 0.01128158844765343 Health & Fitness;Action & Adventure : 0.01128158844765343 Entertainment;Education : 0.01128158844765343 Communication;Creativity : 0.01128158844765343 Comics;Creativity : 0.01128158844765343 Casual;Music & Video : 0.01128158844765343 Card;Action & Adventure : 0.01128158844765343 Books & Reference;Education : 0.01128158844765343 Art & Design;Pretend Play : 0.01128158844765343 Art & Design;Action & Adventure : 0.01128158844765343 Arcade;Pretend Play : 0.01128158844765343 Adventure;Education : 0.01128158844765343 FAMILY : 18.907942238267147 GAME : 9.724729241877256 TOOLS : 8.461191335740072 BUSINESS : 4.591606498194946 LIFESTYLE : 3.9034296028880866 PRODUCTIVITY : 3.892148014440433 FINANCE : 3.7003610108303246 MEDICAL : 3.531137184115524 SPORTS : 3.395758122743682 PERSONALIZATION : 3.3167870036101084 COMMUNICATION : 3.2378158844765346 HEALTH_AND_FITNESS : 3.0798736462093865 PHOTOGRAPHY : 2.944494584837545 NEWS_AND_MAGAZINES : 2.7978339350180503 SOCIAL : 2.6624548736462095 TRAVEL_AND_LOCAL : 2.33528880866426 SHOPPING : 2.2450361010830324 BOOKS_AND_REFERENCE : 2.1435018050541514 DATING : 1.861462093862816 VIDEO_PLAYERS : 1.7937725631768955 MAPS_AND_NAVIGATION : 1.3989169675090252 FOOD_AND_DRINK : 1.2409747292418771 EDUCATION : 1.1620036101083033 ENTERTAINMENT : 0.9589350180505415 LIBRARIES_AND_DEMO : 0.9363718411552346 AUTO_AND_VEHICLES : 0.9250902527075812 HOUSE_AND_HOME : 0.8235559566787004 WEATHER : 0.8009927797833934 EVENTS : 0.7107400722021661 PARENTING : 0.6543321299638989 ART_AND_DESIGN : 0.6430505415162455 COMICS : 0.6204873646209386 BEAUTY : 0.5979241877256317
Looking the results we could see that, at least only for english and free apps, we have the following results.
For the prime_genre
in the app store:
Looking in google play, at least for english and not free apps, we have the following remarks for the columns Category
and Genres
.
If you compare both stores you see that games and entertainment are the majority of the apps. The genre family is associated with games apps for children, so it is also a game category.
Now, to complement the previous step we are going to review the most used apps. In Google Play we have the info in the column Installs
, in tha AppStore we have the column ** rating_count_tot
**
In this exercise we use a nested loop, the firsth loop iterates over the genre
, and the nested loop iterates over the app
, at the end we will obtain the genre and the average of ratings for each one.
At the end we are going to use another way to merge the final list to sort the results and see better wich are the most used apps.
prime_genre = freq_table(ios_free, -5)
app_genre = []
genre_list = []
avg_ratings = []
for genre in prime_genre:
total = 0
len_genre = 0
for app in ios_free:
genre_app = app[-5]
if genre_app == genre:
n_user_rt = float(app[5]) # Is rating count total
total += n_user_rt
len_genre += 1
avg_n_ratings = total/len_genre
genre_list.append(genre)
avg_ratings.append(avg_n_ratings)
def merge(list1, list2):
merged_list = [(list1[i], list2[i])
for i in range(0, len(list1))]
return merged_list
merged = merge(genre_list, avg_ratings)
def takeSecond(elem):
return elem[1]
merged.sort(key=takeSecond, reverse = True)
merged
[('Navigation', 86090.33333333333), ('Reference', 74942.11111111111), ('Social Networking', 71548.34905660378), ('Music', 57326.530303030304), ('Weather', 52279.892857142855), ('Book', 39758.5), ('Food & Drink', 33333.92307692308), ('Finance', 31467.944444444445), ('Photo & Video', 28441.54375), ('Travel', 28243.8), ('Shopping', 26919.690476190477), ('Health & Fitness', 23298.015384615384), ('Sports', 23008.898550724636), ('Games', 22788.6696905016), ('News', 21248.023255813954), ('Productivity', 21028.410714285714), ('Utilities', 18684.456790123455), ('Lifestyle', 16485.764705882353), ('Entertainment', 14029.830708661417), ('Business', 7491.117647058823), ('Education', 7003.983050847458), ('Catalogs', 4004.0), ('Medical', 612.0)]
The most ratings are in reference, social networking and navigation, lets dive a little into each genre:
for app in ios_free:
if app[-5] == 'Navigation':
print (app[1], ':', app[5])
Waze - GPS Navigation, Maps & Real-time Traffic : 345046 Google Maps - Navigation & Transit : 154911 Geocaching® : 12811 CoPilot GPS – Car Navigation & Offline Maps : 3582 ImmobilienScout24: Real Estate Search in Germany : 187 Railway Route Search : 5
for app in ios_free:
if app[-5] == 'Reference':
print (app[1], ':', app[5])
Bible : 985920 Dictionary.com Dictionary & Thesaurus : 200047 Dictionary.com Dictionary & Thesaurus for iPad : 54175 Google Translate : 26786 Muslim Pro: Ramadan 2017 Prayer Times, Azan, Quran : 18418 New Furniture Mods - Pocket Wiki & Game Tools for Minecraft PC Edition : 17588 Merriam-Webster Dictionary : 16849 Night Sky : 12122 City Maps for Minecraft PE - The Best Maps for Minecraft Pocket Edition (MCPE) : 8535 LUCKY BLOCK MOD ™ for Minecraft PC Edition - The Best Pocket Wiki & Mods Installer Tools : 4693 GUNS MODS for Minecraft PC Edition - Mods Tools : 1497 Guides for Pokémon GO - Pokemon GO News and Cheats : 826 WWDC : 762 Horror Maps for Minecraft PE - Download The Scariest Maps for Minecraft Pocket Edition (MCPE) Free : 718 VPN Express : 14 Real Bike Traffic Rider Virtual Reality Glasses : 8 教えて!goo : 0 Jishokun-Japanese English Dictionary & Translator : 0
for app in ios_free:
if app[-5] == 'Social Networking':
print (app[1], ':', app[5])
Facebook : 2974676 Pinterest : 1061624 Skype for iPhone : 373519 Messenger : 351466 Tumblr : 334293 WhatsApp Messenger : 287589 Kik : 260965 ooVoo – Free Video Call, Text and Voice : 177501 TextNow - Unlimited Text + Calls : 164963 Viber Messenger – Text & Call : 164249 Followers - Social Analytics For Instagram : 112778 MeetMe - Chat and Meet New People : 97072 We Heart It - Fashion, wallpapers, quotes, tattoos : 90414 InsTrack for Instagram - Analytics Plus More : 85535 Tango - Free Video Call, Voice and Chat : 75412 LinkedIn : 71856 Match™ - #1 Dating App. : 60659 Skype for iPad : 60163 POF - Best Dating App for Conversations : 52642 Timehop : 49510 Find My Family, Friends & iPhone - Life360 Locator : 43877 Whisper - Share, Express, Meet : 39819 Hangouts : 36404 LINE PLAY - Your Avatar World : 34677 WeChat : 34584 Badoo - Meet New People, Chat, Socialize. : 34428 Followers + for Instagram - Follower Analytics : 28633 GroupMe : 28260 Marco Polo Video Walkie Talkie : 27662 Miitomo : 23965 SimSimi : 23530 Grindr - Gay and same sex guys chat, meet and date : 23201 Wishbone - Compare Anything : 20649 imo video calls and chat : 18841 After School - Funny Anonymous School News : 18482 Quick Reposter - Repost, Regram and Reshare Photos : 17694 Weibo HD : 16772 Repost for Instagram : 15185 Live.me – Live Video Chat & Make Friends Nearby : 14724 Nextdoor : 14402 Followers Analytics for Instagram - InstaReport : 13914 YouNow: Live Stream Video Chat : 12079 FollowMeter for Instagram - Followers Tracking : 11976 LINE : 11437 eHarmony™ Dating App - Meet Singles : 11124 Discord - Chat for Gamers : 9152 QQ : 9109 Telegram Messenger : 7573 Weibo : 7265 Periscope - Live Video Streaming Around the World : 6062 Chat for Whatsapp - iPad Version : 5060 QQ HD : 5058 Followers Analysis Tool For Instagram App Free : 4253 live.ly - live video streaming : 4145 Houseparty - Group Video Chat : 3991 SOMA Messenger : 3232 Monkey : 3060 Down To Lunch : 2535 Flinch - Video Chat Staring Contest : 2134 Highrise - Your Avatar Community : 2011 LOVOO - Dating Chat : 1985 PlayStation®Messages : 1918 BOO! - Video chat camera with filters & stickers : 1805 Qzone : 1649 Chatous - Chat with new people : 1609 Kiwi - Q&A : 1538 GhostCodes - a discovery app for Snapchat : 1313 Jodel : 1193 FireChat : 1037 Google Duo - simple video calling : 1033 Fiesta by Tango - Chat & Meet New People : 885 Google Allo — smart messaging : 862 Peach — share vividly : 727 Hey! VINA - Where Women Meet New Friends : 719 Battlefield™ Companion : 689 All Devices for WhatsApp - Messenger for iPad : 682 Chat for Pokemon Go - GoChat : 500 IAmNaughty – Dating App to Meet New People Online : 463 Qzone HD : 458 Zenly - Locate your friends in realtime : 427 League of Legends Friends : 420 豆瓣 : 407 Candid - Speak Your Mind Freely : 398 知乎 : 397 Selfeo : 366 Fake-A-Location Free ™ : 354 Popcorn Buzz - Free Group Calls : 281 Fam — Group video calling for iMessage : 279 QQ International : 274 Ameba : 269 SoundCloud Pulse: for creators : 240 Tantan : 235 Cougar Dating & Life Style App for Mature Women : 213 Rawr Messenger - Dab your chat : 180 WhenToPost: Best Time to Post Photos for Instagram : 158 Inke—Broadcast an amazing life : 147 Mustknow - anonymous video Q&A : 53 CTFxCmoji : 39 Lobi : 36 Chain: Collaborate On MyVideo Story/Group Video : 35 botman - Real time video chat : 7 BestieBox : 0 MATCH ON LINE chat : 0 niconico ch : 0 LINE BLOG : 0 bit-tube - Live Stream Video Chat : 0
So, looking the results we obtain:
The google store have another way to organize the info, google had the following ranking of installations:
display_table(android_free, 5)
1,000,000+ : 15.726534296028879 100,000+ : 11.552346570397113 10,000,000+ : 10.548285198555957 10,000+ : 10.198555956678701 1,000+ : 8.393501805054152 100+ : 6.915613718411552 5,000,000+ : 6.825361010830325 500,000+ : 5.561823104693141 50,000+ : 4.7721119133574 5,000+ : 4.512635379061372 10+ : 3.5424187725631766 500+ : 3.2490974729241873 50,000,000+ : 2.3014440433213 100,000,000+ : 2.1322202166064983 50+ : 1.917870036101083 5+ : 0.78971119133574 1+ : 0.5076714801444043 500,000,000+ : 0.2707581227436823 1,000,000,000+ : 0.22563176895306858 0+ : 0.04512635379061372 0 : 0.01128158844765343
'\n'
So, we need to remove the special characters of this clasification to made a proper use of the data. We again will use a nested loop, but in this case we are goin to use the str.replace()
function to remove the special characters and so we can convert the string of the number of installations into a float()
.
categories_android = freq_table(android_free, 1)
genre_list_an = []
avg_installs_an = []
for category in categories_android:
total = 0
len_category = 0
for app in android_free:
category_app = app[1]
if category_app == category:
n_installs = app[5]
n_installs = n_installs.replace('+', '')# This function replace a character
n_installs = n_installs.replace(',', '')
n_installs = float(n_installs)
total += n_installs
len_category += 1
avg_n_installs = total / len_category
genre_list_an.append(category)
avg_installs_an.append(avg_n_installs)
merged_an = merge(genre_list_an, avg_installs_an)
merged_an.sort(key=takeSecond, reverse = True)
merged_an
[('COMMUNICATION', 38456119.167247385), ('VIDEO_PLAYERS', 24727872.452830188), ('SOCIAL', 23253652.127118643), ('PHOTOGRAPHY', 17840110.40229885), ('PRODUCTIVITY', 16787331.344927534), ('GAME', 15588015.603248259), ('TRAVEL_AND_LOCAL', 13984077.710144928), ('ENTERTAINMENT', 11640705.88235294), ('TOOLS', 10801391.298666667), ('NEWS_AND_MAGAZINES', 9549178.467741935), ('BOOKS_AND_REFERENCE', 8767811.894736841), ('SHOPPING', 7036877.311557789), ('PERSONALIZATION', 5201482.6122448975), ('WEATHER', 5074486.197183099), ('HEALTH_AND_FITNESS', 4188821.9853479853), ('MAPS_AND_NAVIGATION', 4056941.7741935486), ('FAMILY', 3695641.8198090694), ('SPORTS', 3638640.1428571427), ('ART_AND_DESIGN', 1986335.0877192982), ('FOOD_AND_DRINK', 1924897.7363636363), ('EDUCATION', 1833495.145631068), ('BUSINESS', 1712290.1474201474), ('LIFESTYLE', 1437816.2687861272), ('FINANCE', 1387692.475609756), ('HOUSE_AND_HOME', 1331540.5616438356), ('DATING', 854028.8303030303), ('COMICS', 817657.2727272727), ('AUTO_AND_VEHICLES', 647317.8170731707), ('LIBRARIES_AND_DEMO', 638503.734939759), ('PARENTING', 542603.6206896552), ('BEAUTY', 513151.88679245283), ('EVENTS', 253542.22222222222), ('MEDICAL', 120550.61980830671)]
for app in android_free:
if app[1] == 'COMMUNICATION' and (app[5] == '1,000,000,000+'
or app[5] == '500,000,000+'
or app[5] == '100,000,000+'):
print (app[0], ':', app[5])
WhatsApp Messenger : 1,000,000,000+ imo beta free calls and text : 100,000,000+ Android Messages : 100,000,000+ Google Duo - High Quality Video Calls : 500,000,000+ Messenger – Text and Video Chat for Free : 1,000,000,000+ imo free video calls and chat : 500,000,000+ Skype - free IM & video calls : 1,000,000,000+ Who : 100,000,000+ GO SMS Pro - Messenger, Free Themes, Emoji : 100,000,000+ LINE: Free Calls & Messages : 500,000,000+ Google Chrome: Fast & Secure : 1,000,000,000+ Firefox Browser fast & private : 100,000,000+ UC Browser - Fast Download Private & Secure : 500,000,000+ Gmail : 1,000,000,000+ Hangouts : 1,000,000,000+ Messenger Lite: Free Calls & Messages : 100,000,000+ Kik : 100,000,000+ KakaoTalk: Free Calls & Text : 100,000,000+ Opera Mini - fast web browser : 100,000,000+ Opera Browser: Fast and Secure : 100,000,000+ Telegram : 100,000,000+ Truecaller: Caller ID, SMS spam blocking & Dialer : 100,000,000+ UC Browser Mini -Tiny Fast Private & Secure : 100,000,000+ Viber Messenger : 500,000,000+ WeChat : 100,000,000+ Yahoo Mail – Stay Organized : 100,000,000+ BBM - Free Calls & Messages : 100,000,000+
Similar then in App Store case, apps like Whatsapp, Skype, and Messenger have a lot of installs.
for app in android_free:
if app[1] == 'SOCIAL' and (app[5] == '1,000,000,000+'
or app[5] == '500,000,000+'
or app[5] == '100,000,000+'):
print (app[0], ':', app[5])
Facebook : 1,000,000,000+ Facebook Lite : 500,000,000+ Tumblr : 100,000,000+ Pinterest : 100,000,000+ Google+ : 1,000,000,000+ Badoo - Free Chat & Dating App : 100,000,000+ Tango - Live Video Broadcast : 100,000,000+ Instagram : 1,000,000,000+ Snapchat : 500,000,000+ LinkedIn : 100,000,000+ Tik Tok - including musical.ly : 100,000,000+ BIGO LIVE - Live Stream : 100,000,000+ VK : 100,000,000+
In this case apps likes facebook, pinterest and Linkedin are the most used.
for app in android_free:
if app[1] == 'VIDEO_PLAYERS' and (app[5] == '1,000,000,000+'
or app[5] == '500,000,000+'
or app[5] == '100,000,000+'):
print (app[0], ':', app[5])
YouTube : 1,000,000,000+ Motorola Gallery : 100,000,000+ VLC for Android : 100,000,000+ Google Play Movies & TV : 1,000,000,000+ MX Player : 500,000,000+ Dubsmash : 100,000,000+ VivaVideo - Video Editor & Photo Movie : 100,000,000+ VideoShow-Video Editor, Video Maker, Beauty Camera : 100,000,000+ Motorola FM Radio : 100,000,000+
We see in Video apps like Youtube, Google play movies and Mx Player taking the lead in the genre.
for app in android_free:
if app[1] == 'BOOKS_AND_REFERENCE' and (app[5] == '1,000,000+'
or app[5] == '5,000,000+'
or app[5] == '10,000,000+'
or app[5] == '50,000,000+'):
print(app[0], ':', app[5])
Wikipedia : 10,000,000+ Cool Reader : 10,000,000+ Book store : 1,000,000+ FBReader: Favorite Book Reader : 10,000,000+ Free Books - Spirit Fanfiction and Stories : 1,000,000+ AlReader -any text book reader : 5,000,000+ FamilySearch Tree : 1,000,000+ Cloud of Books : 1,000,000+ ReadEra – free ebook reader : 1,000,000+ Ebook Reader : 5,000,000+ Read books online : 5,000,000+ eBoox: book reader fb2 epub zip : 1,000,000+ All Maths Formulas : 1,000,000+ Ancestry : 5,000,000+ HTC Help : 10,000,000+ Moon+ Reader : 10,000,000+ English-Myanmar Dictionary : 1,000,000+ Golden Dictionary (EN-AR) : 1,000,000+ All Language Translator Free : 1,000,000+ Aldiko Book Reader : 10,000,000+ Dictionary - WordWeb : 5,000,000+ 50000 Free eBooks & Free AudioBooks : 5,000,000+ Al-Quran (Free) : 10,000,000+ Al Quran Indonesia : 10,000,000+ Al'Quran Bahasa Indonesia : 10,000,000+ Al Quran Al karim : 1,000,000+ Al Quran : EAlim - Translations & MP3 Offline : 5,000,000+ Koran Read &MP3 30 Juz Offline : 1,000,000+ Hafizi Quran 15 lines per page : 1,000,000+ Quran for Android : 10,000,000+ Satellite AR : 1,000,000+ Oxford A-Z of English Usage : 1,000,000+ Dictionary.com: Find Definitions for English Words : 10,000,000+ English Dictionary - Offline : 10,000,000+ Bible KJV : 5,000,000+ NOOK: Read eBooks & Magazines : 10,000,000+ Brilliant Quotes: Life, Love, Family & Motivation : 1,000,000+ Stats Royale for Clash Royale : 1,000,000+ Dictionary : 10,000,000+ wikiHow: how to do anything : 1,000,000+ EGW Writings : 1,000,000+ My Little Pony AR Guide : 1,000,000+ Spanish English Translator : 10,000,000+ Dictionary - Merriam-Webster : 10,000,000+ JW Library : 10,000,000+ Oxford Dictionary of English : Free : 10,000,000+ English Hindi Dictionary : 10,000,000+ English to Hindi Dictionary : 5,000,000+
Looking through the book apps we can see that a book app is feasible to do and easy to develop. Apps that use sacred texts could be an affordable option to start, and the people could be glad to learn more regarding theses texts.
This is a first attemp to complete a guided project, there is few things that I added to this project, in general I followed the steps of the solved project. Interesting to return later to this same project and try to see what I can add or do different.