amzn_ratings_over_time: Amazon Ratings Over Time

View source: R/amzn_ratings_over_time.R

amzn_ratings_over_timeR Documentation

Amazon Ratings Over Time

Description

Graphing star ratings over time. Time frame is either Month or Year. Graph types are either Bar or Line. If using a Line plot, there is an option to include a geom_smooth() that can be set to either "loess" or "lm".

Usage

amzn_ratings_over_time(
  data,
  time = c("month", "year"),
  viz_type = c("bar", "line"),
  trend = c("false", "loess", "lm")
)

Arguments

data

Data frame created by GSPtext::get_reviews() or in the same format

time

Time frame to aggregate by - either Monthly or Yearly

viz_type

Type of graph - either bar graph or line chart

trend

Include a trend line in the graph - either "lm" (linear fit) or "loess" (local polynomial fit)

Value

ggplot2 graphs - either bar or line plots

Examples

## Not run: 
amzn_ratings_over_time(data, time = "month", viz_type = "line", trend = "lm")
## End(Not run)

taylorgrant/GSPtext documentation built on April 15, 2023, 10:56 p.m.