1 shipments of household appliances line graphs the file applianceship
1. Shipments of Household Appliances: Line Graphs. The file ApplianceShipments.csv contains the
series of quarterly shipments (in millions of dollars) of US household appliances between 1985 and 1989.
a. Create a well-formatted time plot of the data using the ggplot2 package. Add a smoothed line
to the graph. For a closer view of the patterns, zoom in to the range of 3500-5000 on the y-
axis. Hint: in order to convert Quarter into a date format, use the zoo library's as.Date utility:
as.Date (as. yearqtr (appship.df$Quarter,format="Q%q-%Y")).
b. Does there appear to be a quarterly pattern?
c. Using ggplot2 in R, create one chart with four separate lines, one line for each of Q1, Q2, Q3, and
Q4. In R, this can be achieved by generating a data.frame for each quarter Q1, Q2, Q3, Q4 (use
seq(1,20,4), seq (2,20,4), etc. to create indexes for different quarters), and then plotting them as
separate series on the line graph. Does there appear to be a difference between quarters? Hint: For
ggplot() to display the legend, the color aesthetics must be included inside the aes() specification.
d. Using ggplot2, create a chart with one line of average shipments in each quarter. Hint: Use the
quarter () command of the lubridate package to create a new column in the shipments data frame
and use tapply to average shipments across quarters.
e. Using ggplot2, create a line graph of the series at a yearly aggregated level (i.e., the total shipments in
each year) and comment on what happened to shipments over years. Hint: Use the year() function of
the lubridate package to extract the years the shipments data frame.
*The amount will be in form of wallet points that you can redeem to pay upto 10% of the price for any assignment. **Use of solution provided by us for unfair practice like cheating will result in action from our end which may include permanent termination of the defaulter’s account.Disclaimer:The website contains certain images which are not owned by the company/ website. Such images are used for indicative purposes only and is a third-party content. All credits go to its rightful owner including its copyright owner. It is also clarified that the use of any photograph on the website including the use of any photograph of any educational institute/ university is not intended to suggest any association, relationship, or sponsorship whatsoever between the company and the said educational institute/ university. Any such use is for representative purposes only and all intellectual property rights belong to the respective owners.