Learn R Programming

appler (version 0.2.1)

get_apple_chart_postion: Apple App Store Chart Position

Description

Search for whether an application is currently in the top 100 apps of any category on the Apple App Store.

Usage

get_apple_chart_postion(id, country)

Value

A list of two, containing the `position` and the `category` of the app if available.

If the application is not in the charts then both fields will return as NA

Arguments

id

The ID of the App on the Apple App Store. Either found by using search_apple, or available in the URL of the app to pull reviews from. For example, GitHub's App ID is 1477376903, as seen in its URL: https://apps.apple.com/gb/app/id1477376905

country

The two-letter country code for the store you want to search. For a list of country codes see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Examples

Run this code
if (FALSE) { # interactive()
# Search for GitHub in App Store in the UK
country_id <- "gb"
github_search_results <- search_apple(
  term = "GitHub",
  country = country_id,
  media = "software"
)

# Look up chart position for GitHub in the UK
# (App ID found in trackId column of github_search_results)
get_apple_chart_postion(1477376905, "gb")
}

Run the code above in your browser using DataLab