get_age_demographic: Returns the age distribution of visitors by month for a given...

Description Usage Arguments Value Examples

View source: R/get_age_demographic.R

Description

The 'get_age_demographic()' function returns the age distribution of visitors to a given website based on the start and end date you provide.

Usage

1
2
3
4
5
6
7
8
get_age_demographic(
  api_key = similarweb_api_key,
  site,
  start,
  end,
  country = "us",
  md = "False"
)

Arguments

api_key

API key is required. Please set API key equal to similarweb_api_key before calling function. If you do not have an API key, you can get an API key at https://account.similarweb.com/#/api-management2 Note: You must have a subscription to SimilarWeb's services.

site

Website name is required. Do not include 'www' or 'https' before website. Ex. 'google.com'

start

Start date required in YYYY-MM format. Ex. '2020-10'

end

End date required in YYYY-MM format. Ex. '2020-12'

country

Country set to 'US' as default but can be set to another 2-letter ISO country code depending on your level of access within SimilarWeb.

md

Default is set to 'False' but can be set to 'True' for main domain only

Value

tibble with age and value columns

Examples

1
##age_demographic <- get_age_demographic(site = "bbc.com", start = "2020-10", end = "2020-12")

kcuilla/swapir documentation built on Feb. 12, 2021, 8:36 p.m.