项目作者: hrbrmstr

项目描述 :
Retrieve Hot Topics (Trends) for a Given Country from 'Google' Trends
高级语言: R
项目地址: git://github.com/hrbrmstr/hottopic.git
创建时间: 2019-01-29T21:10:18Z
项目社区:https://github.com/hrbrmstr/hottopic

开源协议:

下载


Travis-CI Build
Status
Coverage
Status
CRAN\_Status\_Badge

hottopic

Retrieve Hot Topics (Trends) for a Given Country from ‘Google’ Trends

Description

Retrieve Hot Topics (Trends) for a Given Country from ‘Google’ Trends

What’s Inside The Tin

The following functions are implemented:

  • get_topics: Retrieve Hot Topics (Trends) for a Given Country
  • topic_countries: Return a character vector of supported countries

Installation

  1. devtools::install_git("https://gitlab.com/hrbrmstr/hottopic.git")
  2. # or
  3. devtools::install_github("hrbrmstr/hottopic")

Usage

  1. library(hottopic)
  2. library(tibble) # for printing
  3. # current version
  4. packageVersion("hottopic")
  5. ## [1] '0.1.0'

Countries

  1. topic_countries()
  2. ## [1] "Argentina" "Australia" "Austria" "Belgium" "Brazil" "Canada"
  3. ## [7] "Chile" "Colombia" "Czechia" "Denmark" "Egypt" "Finland"
  4. ## [13] "France" "Germany" "Greece" "Hong Kong" "Hungary" "India"
  5. ## [19] "Indonesia" "Ireland" "Israel" "Italy" "Japan" "Kenya"
  6. ## [25] "Malaysia" "Mexico" "Netherlands" "New Zealand" "Nigeria" "Norway"
  7. ## [31] "Philippines" "Poland" "Portugal" "Romania" "Russia" "Saudi Arabia"
  8. ## [37] "Singapore" "South Africa" "South Korea" "Spain" "Sweden" "Switzerland"
  9. ## [43] "Taiwan" "Thailand" "Turkey" "Ukraine" "United Kingdom" "United States"
  10. ## [49] "Vietnam"
  1. get_topics()
  2. ## # A tibble: 40 x 11
  3. ## title description traffic link pub_date picture picture_source news_item_title news_item_snipp… news_item_url
  4. ## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
  5. ## 1 Juss… Empire 500,00… http… Tue, 29… https:… USA TODAY 'Empire' star … "\"Empire\" sta… https://www.…
  6. ## 2 Juss… Empire 500,00… http… Tue, 29… https:… USA TODAY 'Empire' star … "\"Empire\" act… https://www.…
  7. ## 3 Face… FaceTime, … 200,00… http… Tue, 29… https:… USA TODAY A 14-year-old … Apple's Group F… https://www.…
  8. ## 4 Face… FaceTime, … 200,00… http… Tue, 29… https:… USA TODAY Apple Takes Dr… But a bug affli… https://www.…
  9. ## 5 Bryc… "" 100,00… http… Tue, 29… https:… For The Win Fans think an … The Major Leagu… https://ftw.…
  10. ## 6 Bryc… "" 100,00… http… Tue, 29… https:… For The Win Report: Bryce … The Bryce Harpe… https://247s…
  11. ## 7 Jame… "" 100,00… http… Tue, 29… https:… The Root Grammy-Winning… The music indus… https://theg…
  12. ## 8 Jame… "" 100,00… http… Tue, 29… https:… The Root R&B Star James… James Ingram, o… https://vari…
  13. ## 9 Tory… Don Q 50,000+ http… Tue, 29… https:… Complex "Don Q Goes in… "Late Monday, Q… https://www.…
  14. ## 10 Tory… Don Q 50,000+ http… Tue, 29… https:… Complex JID Accepts To… "After unleashi… https://www.…
  15. ## # … with 30 more rows, and 1 more variable: news_item_source <chr>
  1. do.call(
  2. rbind.data.frame,
  3. lapply(
  4. c("United States", "France", "Germany"),
  5. get_topics
  6. )
  7. )
  8. ## # A tibble: 118 x 11
  9. ## title description traffic link pub_date picture picture_source news_item_title news_item_snipp… news_item_url
  10. ## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
  11. ## 1 Juss… Empire 500,00… http… Tue, 29… https:… USA TODAY 'Empire' star … "\"Empire\" sta… https://www.…
  12. ## 2 Juss… Empire 500,00… http… Tue, 29… https:… USA TODAY 'Empire' star … "\"Empire\" act… https://www.…
  13. ## 3 Face… FaceTime, … 200,00… http… Tue, 29… https:… USA TODAY A 14-year-old … Apple's Group F… https://www.…
  14. ## 4 Face… FaceTime, … 200,00… http… Tue, 29… https:… USA TODAY Apple Takes Dr… But a bug affli… https://www.…
  15. ## 5 Bryc… "" 100,00… http… Tue, 29… https:… For The Win Fans think an … The Major Leagu… https://ftw.…
  16. ## 6 Bryc… "" 100,00… http… Tue, 29… https:… For The Win Report: Bryce … The Bryce Harpe… https://247s…
  17. ## 7 Jame… "" 100,00… http… Tue, 29… https:… The Root Grammy-Winning… The music indus… https://theg…
  18. ## 8 Jame… "" 100,00… http… Tue, 29… https:… The Root R&B Star James… James Ingram, o… https://vari…
  19. ## 9 Tory… Don Q 50,000+ http… Tue, 29… https:… Complex "Don Q Goes in… "Late Monday, Q… https://www.…
  20. ## 10 Tory… Don Q 50,000+ http… Tue, 29… https:… Complex JID Accepts To… "After unleashi… https://www.…
  21. ## # … with 108 more rows, and 1 more variable: news_item_source <chr>

hottopic Metrics

Lang # Files (%) LoC (%) Blank lines (%) # Lines (%)
R 8 0.89 134 0.89 29 0.57 38 0.49
Rmd 1 0.11 17 0.11 22 0.43 39 0.51

Code of Conduct

Please note that this project is released with a Contributor Code of
Conduct
. By participating in this project you agree to
abide by its terms.