View source: R/helper_functions.R
| analyze_trends | R Documentation |
Analyzes trending videos and content for specific search terms or topics.
analyze_trends(
search_terms,
max_results = 50,
time_period = "month",
order = "viewCount",
region_code = NULL,
auth = "key",
...
)
search_terms |
Vector of search terms to analyze |
max_results |
Maximum results per search term (default: 50) |
time_period |
Time period for analysis: "week", "month", "year", "all" |
order |
Sort order: "relevance", "date", "rating", "viewCount" |
region_code |
Region code for localized trends |
auth |
Authentication method: "token" (OAuth2) or "key" (API key) |
... |
Additional arguments passed to search functions |
List containing trending analysis results
## Not run:
# Analyze trending topics
trends <- analyze_trends(c("machine learning", "AI", "data science"))
# Regional trending analysis
trends_us <- analyze_trends("music", region_code = "US", time_period = "week")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.