The AppRanker Module

image showing a mobile phone and apps

Description

The AppRanker module processes app information in the app json interchange format (for instance produced by AppEnricher) containing score information and calculates the rankings for each used measure (and optionally for each app category present in the data). The ranking information is then added to the app json information.

Installation

This module has been built for portability and ease of use, so it is composed by a stand-alone Python program. All you need is to have Python 3 installed on your system, then you can just download the code and run it. The behavior of the module can be tuned by using some command options that are described below. Being a Python program, it is also easy to inspect the code, see how it works, and possibly modify it if you want so.

Quick Usage

Command line: appranker
The Appranker module can be directly launched without any parameters: if so, it will proceed by using default locations for the input and the output directories (see below).

Options

The AppRanker behaviour can be modified via the following command line options (shorter or longer formats):


  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        the input json directory (default: google/enriched)
  -o OUTPUT, --output OUTPUT
                        the output json directory (default: google/ranked)
  -b BASE, --base BASE  base directory for relative directory paths (default: .)
  -c, --categories      category rankings are also computed (default: False)
  -k, --keep            existing files from output directory are kept (not deleted) (default: False)
  -v, --verbose         verbose informative output (default: False)
Some more information about the options (note they are all similar to the options of the AppEnricher module, apart from the new option -c on categories):
-i, --input
This option allows to modify the location of the input app json files from the current default (the relative directory google/enriched). Note that the directory location can be absolute or relative.
-o, --output
Similary, this option allows to modify the location of the output app json files (the current default is the relative directory google/ranked). Again, the directory location can be absolute or relative.
-b, --base
This option allows to modify the base directory that is used to eventually produce the absolute paths of the input and output directory. Note that this is effective only when the input or output directory is a relative path, otherwise it is ignored. The default base directory is the one containing the AppRanker program.
-c, --categories
By default, the Appranker module calculates global rankings (that is to say, the ranking among all apps). This option allows to also compute the rankings for each app category present in the input data. Note that, like for the global rankings, also each category ranking is computer for every score measure that is present in the original input data.
-k, --keep
By default, the output directory is always created from scratch, so to only contain the result of the current analysis. In many occasions, however, you might want to have the opportunity to merge results coming from previous analyses: this is possible by activating this option, which does not delete the output directory and allow merging (overwriting, in case of conflicts) of results.
-v, --verbose
Similarly to the other modules of the Mobosearch framework, the default output of Appranker is minimal, which also means that during the computation you might not get any output at all until the end. This option tells Appranker to be more verbose, printing more information during the computation. Using this option will progressively show what apps have been computed, allowing to monitor the progress of the analysis.

The Code

The source code of the module can be directly downloaded here (note that at public launch we will also provide a GitHub link).