In this (guided) project I am combining python skills learned in previous coding lessons to analyze real-world data for a fake company that builds mobile apps. In this scenario the fake company builds free apps with their main source of revenue being in-app ads and so our goal is to analyze the data to help the developers understand the besttype of app to bring in the most downloads, thus leading to more revenue.
First things first, we're going to import our data and turn them into lists of lists.
from csv import reader
opened_apple = open('AppleStore.csv')
read_apple = reader(opened_apple)
Apps_apple = list(read_apple)
opened_google = open('googleplaystore.csv')
read_google = reader(opened_google)
Apps_google = list(read_google)
Now that we have our data we're going to explore it using a function that shows us a slice of the data in a more readable fashion.
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]))
print('\n')
explore_data(Apps_apple, 0, 5)
print('There are ' + str(len(Apps_apple[1:])) + ' rows of data in the Apple dataset.')
print('\n')
explore_data(Apps_google, 0, 5)
print('There are ' + str(len(Apps_google[1:])) + ' rows of data in the Google dataset.')
['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'] ['420009108', 'Temple Run', '65921024', 'USD', '0.0', '1724546', '3842', '4.5', '4.0', '1.6.2', '9+', 'Games', '40', '5', '1', '1'] There are 7197 rows of data in the Apple dataset. ['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'] ['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'] There are 10841 rows of data in the Google dataset.
Now that we have an idea of what the data looks like and how many rows we have (not including the header row) let's take a look at the header row more closely and see if anything might be useful. For reference here is the documentation for the Apple dataset and the Google dataset.
print(Apps_apple[0])
print('\n')
print(Apps_google[0])
['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'] ['App', 'Category', 'Rating', 'Reviews', 'Size', 'Installs', 'Type', 'Price', 'Content Rating', 'Genres', 'Last Updated', 'Current Ver', 'Android Ver']
For our goal we really just want to look at the free apps, and we wil probably want to look at what category is the most popular (prime_genre in Apple and Category or Genre in Google), along with how many installs they they have (The closest in Apple would be rating_count_tot, and in Google we can just use Installs).
Since we have a basic idea of what we might want to look at, let's start cleaning our data. First we're going to inspect any rows that the discussion sections for the data have noted something might be wrong.
print(Apps_google[10473])
print(Apps_google[7939])
print(Apps_google[9149])
['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'] ['Crazy Wheels', 'GAME', '4.0', '121082', '7.0M', '10,000,000+', 'Free', '0', 'Teen', 'Adventure', 'January 17, 2018', '1.0.7', '2.1 and up'] ['Command & Conquer: Rivals', 'FAMILY', 'NaN', '0', 'Varies with device', '0', 'NaN', '0', 'Everyone 10+', 'Strategy', 'June 28, 2018', 'Varies with device', 'Varies with device']
Looks like row 10473 is missing a value and has a rating of 19 out of 5, and there might be an issue with row 9149 because it has two values of 'NaN' instead of actual information. We'll leave row 9149 though, because maybe that particular app just doesn't have ratings there. But row 10473 needs to be deleted.
print(len(Apps_google))
del Apps_google[10473] #only run this once.
print(len(Apps_google)) #This should now be 10841
10842 10841
Now that we've gotten rid of the row with obviously incorrect data we need to look at duplicate entries. The discussion board also tells us there are some of those in our data, and you can see one instance below.
for apps in Apps_google:
name = apps[0]
if name == 'Instagram':
print(apps)
['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']
We don't need to count the same app more than once, and it will actually mess up our results, so we need to find all of the rows that have duplicate data.
dup_apps = []
unique_apps = []
for apps in Apps_google:
name = apps[0]
if name in unique_apps:
dup_apps.append(name)
else:
unique_apps.append(name)
print('Number of duplicate apps:' + str(len(dup_apps)))
print('Some of the duplicate apps:', dup_apps[:10])
Number of duplicate apps:1181 Some of the 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']
Now that we know what are duplicates are we need to make sure we only have one copy of each, but we can't just randomly delete the duplicates. It makes the most sense to keep the row that has the largest number of ratings because that should give us the most up to date data. It also happens to be where the rows differ in values, which is how we'll tell it's NOT just a random deletion of duplicate rows. We'll check we removed the correct number of rows by checking our dictionary of unique apps with the highest number of ratings and see if it matches the number of rows we expect the data to have if we got rid of all the duplicate rows at random.
reviews_max = {}
for app in Apps_google[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
if name not in reviews_max:
reviews_max[name] = n_reviews
print(len(reviews_max) == len(Apps_google[1:]) - len(dup_apps))
print(len(reviews_max))
True 9659
Nailed it. And it looks like we have 9659 unique android apps and their number of reviews. Now let's actually remove those corresponding rows from our dataset. We will do that by executing the following:
google_clean = [] #new, cleaned data set
already_added = []
for app in Apps_google[1:]:
name = app[0]
n_reviews = float(app[3])
if n_reviews == reviews_max[name] and name not in already_added:
google_clean.append(app)
already_added.append(name)
print(len(google_clean))
9659
Looks like it worked. Thankfully the Apple dataset doesn't have duplicates so we don't have to do it all over again. But turns out we have another problem. Both data sets contain imformation about apps that aren't written in English.
print(Apps_apple[814][1])
print(google_clean[4412][0])
爱奇艺PPS -《欢乐颂2》电视剧热播 中国語 AQリスニング
We don't want to include these apps in our analysis either, so we have to remove them. Good news, each character (such as 'a' or '+') has a corresponding number for it and thankfully the ones most commonly used in English are between 0 and 127. So to begin with let's make a function that identifies if a string has non-English characters.
def just_eng_char(a_string):
for char in a_string:
if ord(char) > 127:
return False
return True
print(just_eng_char('Instagram'))
print(just_eng_char('爱奇艺PPS -《欢乐颂2》电视剧热播'))
print(just_eng_char('Docs To Go™ Free Office Suite'))
print(just_eng_char('Instachat 😜'))
True False False False
There seems to be a small problem, because the TM symbol and the emoji also code as non-English characters. In an effort to get around that problem we'll only remove an app if it has more than 3 "non-English" characters. We'll probably still remove a few English apps, but it should cut down on that significantly. Using this new fuction let's run through our data sets.
def mostly_eng_char(a_string):
count = 0
for char in a_string:
if ord(char) > 127:
count += 1
if count > 3:
return False
else:
return True
#test
print(mostly_eng_char('Docs To Go™ Free Office Suite'))
print(mostly_eng_char('Instachat 😜'))
print(mostly_eng_char('爱奇艺PPS -《欢乐颂2》电视剧热播'))
print('\n')
#seems to work (better) now
Eng_Apple = []
for row in Apps_apple[1:]:
name = row[1]
if mostly_eng_char(name):
Eng_Apple.append(row)
explore_data(Eng_Apple, 0, 3, True)
print('\n')
Eng_Google = []
for row in google_clean:
name = row[0]
if mostly_eng_char(name):
Eng_Google.append(row)
explore_data(Eng_Google, 0, 3, True)
True True False ['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
After all of that we have 6183 rows in our Apple/iOS data and 9614 rows in our Android/Google data. The last thing we have to do to clean our data is to remove information on apps that aren't free, because the app our fake company wants to create is going to be free and gather revenue from in-app adds. So let's do that now.
Free_Eng_Apple = []
Free_Eng_Google = []
for row in Eng_Apple:
price = row[4]
if price == '0.0':
Free_Eng_Apple.append(row)
for row in Eng_Google:
price = row[6]
if price == 'Free' or price == 'NaN':
Free_Eng_Google.append(row)
explore_data(Free_Eng_Apple, 0, 3, True)
explore_data(Free_Eng_Google, 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
Now that the data is completely clean we can see there are 3222 apps in the Apple dataset that fit our criteria and 8864 in the Android dataset. With the hard part done let's actually analyze the data! The validation strategy for our app idea is three-fold
But the question is what kind of app would be our best bet? To answer the question we should look at the most common genre of apps. Let's create some code to do that.
def freq_table(dataset, index):
freq_tab = {}
total = 0
for row in dataset:
total += 1
param = row[index]
if param in freq_tab:
freq_tab[param] += 1
else:
freq_tab[param] = 1
perc_tab = {}
for key in freq_tab:
frac = freq_tab[key]/total
perc_tab[key] = (frac * 100)
return perc_tab
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])
First lets look at the frequency table for Free English Apps in the Apple store.
print(display_table(Free_Eng_Apple, 11)) #prime_genre
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 None
We can see that in the Apple store over 50% (58.16% actually) of the free English apps are under the category of Games. After that comes Entertainment at 7.88%. We can see that most of the genres take up less than 5% of the total and that most of the apps are more along the lines of entertainment purposes (games, photo & video, social networking, ect) vs practical purposes (education, shopping, productivity, ect). Based on this information if we were making an Free English App for the Apple store we would probably want to make it for entertainment purposes, and ideally make it a game, although just because there are a lot of them dosen't mean they are used by a lot of people. Further analysis would be needed to see if that was the case.
Now let's look at the Google Play store apps.
print('Category:')
print(display_table(Free_Eng_Google, 1)) #Category
print('\n')
print('Genre')
print(display_table(Free_Eng_Google, 9)) #Genre
Category: 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 None Genre 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 None
Category wise we can see that Family apps are the most popular Free English apps on the Google Play store, with almost 19% (18.9% more specifically). Game apps follow that with a little over half as much at 9.7% followed quickly by Tools at 8.5%. Genre wise Tools and Entertainment are the leaders, followed by Education and Business. While entertainment apps seem to be a comparable percentage to those in the Apple store Game apps are a MUCH smaller part of the Google Play store. It also looks like the number of "fun" apps on this platform are more comparable to the "useful" ones. Here it might make more sense to make a family app (although I'm not sure what that is), but again these tables don't include users for each of the app genres which seems like an important component.
Now that we've looked at genre what about number of users? Unfortunately the Apple Store doesn't have a column for that, but let's use the total number of ratings instead. It makes sense that the more users an app has the more ratings it should have.
Apple_genre_table = freq_table(Free_Eng_Apple, 11)
for genre in Apple_genre_table:
total = 0
len_genre = 0
for row in Free_Eng_Apple:
genre_app = row[11]
if genre_app == genre:
user_rating = float(row[5])
total += user_rating
len_genre += 1
average = total / len_genre
print(genre, average)
Social Networking 71548.34905660378 Photo & Video 28441.54375 Games 22788.6696905016 Music 57326.530303030304 Reference 74942.11111111111 Health & Fitness 23298.015384615384 Weather 52279.892857142855 Utilities 18684.456790123455 Travel 28243.8 Shopping 26919.690476190477 News 21248.023255813954 Navigation 86090.33333333333 Lifestyle 16485.764705882353 Entertainment 14029.830708661417 Food & Drink 33333.92307692308 Sports 23008.898550724636 Book 39758.5 Finance 31467.944444444445 Education 7003.983050847458 Productivity 21028.410714285714 Business 7491.117647058823 Catalogs 4004.0 Medical 612.0
Based on THIS "table" Navigational apps get the most ratings on the Apple Store. It would make sense that Navigation apps would then be the most downloaded apps on the Apple Store (although again we can't be sure of this). Based on that it might make more sense to make a navigational app for the Apple store instead of a Game app. Other good options based on the number of user ratings would be a Reference app or a Social Media App.
What about on the Google Play market? At least here we have information on the number of installs, although they're binned and have values such as 100+, 1000+, 5000+, etc. The larger the numbers the larger the bins are too; we go from 100,000+ to 500,000+ to 1,000,000+ and so on. Not ideal, but there's nothing we can really do about that and in reality we're only interested in which genres have a lot of users. We don't really care how MANY users they actually have. To make things easier we'll assume an app with 100,000+ installs really just has 100,000 installs exactly, and so on for each group. Not ideal, but it could be worse and we should be getting the gist.
Google_cat_table = freq_table(Free_Eng_Google, 1)
for category in Google_cat_table:
total = 0
len_category = 0
for row in Free_Eng_Google:
category_app = row[1]
if category_app == category:
str_install = row[5]
temp = str_install.replace('+', '')
temp2 = temp.replace(',', '')
installs = float(temp2)
total += installs
len_category +=1
average = total / len_category
print(category, average)
ART_AND_DESIGN 1986335.0877192982 AUTO_AND_VEHICLES 647317.8170731707 BEAUTY 513151.88679245283 BOOKS_AND_REFERENCE 8767811.894736841 BUSINESS 1712290.1474201474 COMICS 817657.2727272727 COMMUNICATION 38456119.167247385 DATING 854028.8303030303 EDUCATION 1833495.145631068 ENTERTAINMENT 11640705.88235294 EVENTS 253542.22222222222 FINANCE 1387692.475609756 FOOD_AND_DRINK 1924897.7363636363 HEALTH_AND_FITNESS 4188821.9853479853 HOUSE_AND_HOME 1331540.5616438356 LIBRARIES_AND_DEMO 638503.734939759 LIFESTYLE 1437816.2687861272 GAME 15588015.603248259 FAMILY 3695641.8198090694 MEDICAL 120550.61980830671 SOCIAL 23253652.127118643 SHOPPING 7036877.311557789 PHOTOGRAPHY 17840110.40229885 SPORTS 3638640.1428571427 TRAVEL_AND_LOCAL 13984077.710144928 TOOLS 10801391.298666667 PERSONALIZATION 5201482.6122448975 PRODUCTIVITY 16787331.344927534 PARENTING 542603.6206896552 WEATHER 5074486.197183099 VIDEO_PLAYERS 24727872.452830188 NEWS_AND_MAGAZINES 9549178.467741935 MAPS_AND_NAVIGATION 4056941.7741935486
In the Google Play store it looks like the Category with the most isntalls is Communication, with over 38,000,000 average installs. Other large categories include Video Players, Social, Photography, and Games, in that order. Based on this information it would make the most sense to make a Communication app for the Google Play store.
If we look at what might work best on BOTH platforms it seems a Social Media app might be a good play, because while it's not the top genre it's in the top three for both stores.