tech_stocks: Stock prices of four major tech companies

Description Usage Format Source Examples

Description

This dataset contains several years of daily closing prices for four major tech companies, Apple, Google, Microsoft, and Facebook. Data was downloaded from Yahoo finance.

Usage

1

Format

An object of class grouped_df (inherits from tbl_df, tbl, data.frame) with 9569 rows and 6 columns.

Source

finance.yahoo.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
ggplot(tech_stocks, aes(x=date, y=price_indexed, color=ticker)) +
  geom_line() +
  scale_color_manual(values=c("#000000", "#E69F00", "#56B4E9", "#009E73"),
                     name="",
                     breaks=c("FB", "GOOG", "MSFT", "AAPL"),
                     labels=c("Facebook", "Alphabet", "Microsoft", "Apple")) +
  scale_x_date(name="year",
               limits=c(ymd("2012-06-01"), ymd("2017-05-31")),
               expand=c(0,0)) + 
  scale_y_continuous(name="stock price, indexed",
                     limits = c(0, 560),
                     expand=c(0,0)) +
  theme_minimal_hgrid()

clauswilke/dviz.supp documentation built on Aug. 25, 2020, 2:12 a.m.