plot_bar {globaltrends} | R Documentation |
The function creates barplots for cross-sectional search score data. It uses
the output of export_score
to prepare a bar plot of search scores for
the top 10 countries. For output from get_abnorm_hist
the plot shows
five locations with the highest and lowest abnormal changes each. When the
output includes more than one keyword, only the first keyword is used.
plot_bar(data, ...)
## S3 method for class 'exp_score'
plot_bar(data, type = c("obs", "sad", "trd"), ...)
## S3 method for class 'abnorm_score'
plot_bar(data, ...)
data |
Data exported from |
... |
Further arguments passed to or from other methods. |
type |
Object of type |
Barplot of cross-sectional data as ggplot2
object.
## Not run:
data <- export_score(keyword = "amazon")
plot_bar(data, type = "obs")
data <- export_score(keyword = "amazon")
data <- get_abnorm_hist(data, train_win = 12, train_break = 0, type = "obs")
plot_bar(data)
## End(Not run)