Compute similarity weights and identify clusters of applications.

App weights are undocumented and not defined in the Steam Web API. It can be assumed that the weights represent some type of prioritization measure for a given user, i.e. the higher the weight the more an app fits to a user. Argument documentation is a good guess at best.

weight_app(
  steamid,
  appids,
  country_code = NULL,
  tag_score_factor = NULL,
  playtime_max_seconds = NULL,
  playtime_max_games = NULL,
  playtime_score_factor = NULL,
  popularity_factor = NULL,
  popularity_reciprocal = NULL,
  popularity_base_score = 0,
  include_owned_games = FALSE
)

cluster_apps(steamid, n = NULL, cluster_index = NULL)

Arguments

steamid

SteamID of a user. The SteamID must be in a format that can be converted by convert_steamid. This includes vanity, Steam64, Steam2, and Steam3 IDs.

appids

A vector of multiple appIDs of applications in the Steam store. There are generally two ways of retrieving an appID:

  • Inspect or parse the store URL of an application, e.g. https://store.steampowered.com/app/10/CounterStrike/

  • Query applications programmatically, e.g. using search_apps

tag_score_factor

Factor indicating the weight given to an ominous tag factor.

playtime_max_seconds

A value indicating the maximum seconds of playtime. Defaults to 100 hours or 360,000 seconds. The exact meaning of this parameter is unknown.

playtime_max_games

A value indicating the maximum games. Defaults to 3 games. The exact meaning of this parameter is unknown.

playtime_score_factor

Factor indicating the weight given to the playtime score.

popularity_factor

Factor indicating the weight given to app popularity. The more popular the higher the app weight. Can be an integer between 1 and 4. Every other value seems to be ignored.

popularity_reciprocal

A value indicating a reciprocal weight for popularity, i.e. the less popular the higher the score. Defaults to 1e+04.

popularity_base_score

A value indicating the base popularity score. Defaults to 5e+06.

n

Number of clusters to generate. By default, generates 75 clusters.

cluster_index

Unknown.

Value

weight_app

A dataframe containing the appID and the weight given to this appID for the specified user.

cluster_apps

A dataframe containing clusters of apps. cluster_id is an ID unique to the specific cluster call. playtime_forever and playtime_2weeks are the total playtimes of a cluster in minutes. played_appids is a vector of all apps in the cluster. played_appids is a vector of similar apps. similar_item_popularity_score is the popularity score of the similar app vector.

Examples

steamid <- "76561197960435530"

# generate prioritization weight for team fortress 2 and portal 2
weight_app(steamid, c(440, 620))
#> Error in store_items(appids, type = "appid"): could not find function "store_items"

# generate 5 clusters for a given user
cluster_apps(steamid, n = 5)
#> Error in as.double(x): cannot coerce type 'closure' to vector of type 'double'