library(tidyverse)
library(DT)
library(trendyy)
library(lubridate)
Psychologist <- trendy("Psychologist")
Psychologist %>%
get_interest() %>%
glimpse()
Rows: 262
Columns: 7
$ date <dttm> 2019-08-11, 2019-08-18, 2019-08-25, 2019…
$ hits <int> 68, 73, 75, 70, 82, 77, 72, 72, 72, 70, 7…
$ keyword <chr> "Psychologist", "Psychologist", "Psycholo…
$ geo <chr> "world", "world", "world", "world", "worl…
$ time <chr> "today+5-y", "today+5-y", "today+5-y", "t…
$ gprop <chr> "web", "web", "web", "web", "web", "web",…
$ category <chr> "All categories", "All categories", "All …
Psychologist %>%
get_interest() %>%
ggplot(aes(x = date, y = hits)) +
geom_line()
The shows the searches for psychologist over a span of years.
Psychologist %>%
get_interest() %>%
mutate(month = month(date)) %>%
group_by(month) %>%
summarize(hits_per_month = mean(hits)) %>%
ggplot(aes(x = month, y = hits_per_month)) +
geom_line() +
scale_x_discrete(limits = factor(1:12))
This graph shows the searches for psychologist by month over a year.
Psychologist %>%
get_interest_dma() %>%
datatable() %>%
suppressWarnings()
This table shows the searches for psychologist by geographical location.
Psychologist_countries <- trendy("Psychologist", geo = c("US", "CA"), from = "2015-01-01", to = "2020-01-01")
Psychologist %>%
get_interest() %>%
glimpse()
Rows: 262
Columns: 7
$ date <dttm> 2019-08-11, 2019-08-18, 2019-08-25, 2019…
$ hits <int> 68, 73, 75, 70, 82, 77, 72, 72, 72, 70, 7…
$ keyword <chr> "Psychologist", "Psychologist", "Psycholo…
$ geo <chr> "world", "world", "world", "world", "worl…
$ time <chr> "today+5-y", "today+5-y", "today+5-y", "t…
$ gprop <chr> "web", "web", "web", "web", "web", "web",…
$ category <chr> "All categories", "All categories", "All …
Psychologist_countries %>%
get_interest() %>%
mutate(month = month(date)) %>%
group_by(month, geo) %>%
summarize(hits_per_month = mean(hits)) %>%
ggplot(aes(x = month, y = hits_per_month, color = geo)) +
geom_line() +
scale_x_discrete(limits = factor(1:12)) +
theme_minimal() +
labs(title = "Internet searches for 'Psychologist' over time, by Canada and US")
This shows a comparison between searches for psychologist in Canada and the US by month, over a year.
Psychologist_Psychiatrist %>%
get_interest() %>%
ggplot(aes(x = date, y = hits, color = keyword)) +
geom_line()
This shows a comparison of the number of searches for psychologist and the number of searches for psychiatrist over the span of years.
Psychologist_Psychiatrist_images <- trendy(c("Psychologist", "Psychiatrist"), geo = "US", gprop = "images")
Psychologist_Psychiatrist_images %>%
get_interest() %>%
ggplot(aes(x = date, y = hits, color = keyword, gprop = "images")) +
geom_line()
This shows a comparison between the number of image searches for psychologist and psychiatrist.