stock prices Import stock price of Facebook since 2010.dividends Import dividends of Apple and Microsoft since 2010.economic data Import U.S. civilian unemployment rate (seasonally adjusted).exchange rates Import exchange rate between the U.S. dollar and the Japanese yen.stock prices Import stock price of Facebook since 2010.## # A tibble: 1,853 x 7
## date open high low close volume adjusted
## <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2012-05-18 42.0 45 38 38.2 573576400 38.2
## 2 2012-05-21 36.5 36.7 33 34.0 168192700 34.0
## 3 2012-05-22 32.6 33.6 30.9 31 101786600 31
## 4 2012-05-23 31.4 32.5 31.4 32 73600000 32
## 5 2012-05-24 33.0 33.2 31.8 33.0 50237200 33.0
## 6 2012-05-25 32.9 33.0 31.1 31.9 37149800 31.9
## 7 2012-05-29 31.5 31.7 28.6 28.8 78063400 28.8
## 8 2012-05-30 28.7 29.5 27.9 28.2 57267900 28.2
## 9 2012-05-31 28.5 29.7 26.8 29.6 111639200 29.6
## 10 2012-06-01 28.9 29.2 27.4 27.7 41855500 27.7
## # … with 1,843 more rows
dividends Import dividends of Apple and Microsoft since 2010.## # A tibble: 68 x 3
## symbol date dividends
## <chr> <date> <dbl>
## 1 AAPL 2012-08-09 0.0541
## 2 AAPL 2012-11-07 0.0541
## 3 AAPL 2013-02-07 0.0541
## 4 AAPL 2013-05-09 0.0622
## 5 AAPL 2013-08-08 0.0622
## 6 AAPL 2013-11-06 0.0622
## 7 AAPL 2014-02-06 0.0622
## 8 AAPL 2014-05-08 0.0671
## 9 AAPL 2014-08-07 0.47
## 10 AAPL 2014-11-06 0.47
## # … with 58 more rows
Hint: See the code in 4.2.2 Line plot in the textbook.
## # A tibble: 29 x 3
## symbol date dividends
## <chr> <date> <dbl>
## 1 AAPL 2012-08-09 0.0541
## 2 AAPL 2012-11-07 0.0541
## 3 AAPL 2013-02-07 0.0541
## 4 AAPL 2013-05-09 0.0622
## 5 AAPL 2013-08-08 0.0622
## 6 AAPL 2013-11-06 0.0622
## 7 AAPL 2014-02-06 0.0622
## 8 AAPL 2014-05-08 0.0671
## 9 AAPL 2014-08-07 0.47
## 10 AAPL 2014-11-06 0.47
## # … with 19 more rows
Hint: See the code in 4.2.2 Line plot in the textbook.
Since 2014, Apple’s dividends first shot way up and then has had a steady increase for a span of the last five years.
economic data Import U.S. civilian unemployment rate (seasonally adjusted).Hint: Find the symbol in FRED.
## # A tibble: 128 x 2
## date price
## <date> <dbl>
## 1 2009-01-01 7.8
## 2 2009-02-01 8.3
## 3 2009-03-01 8.7
## 4 2009-04-01 9
## 5 2009-05-01 9.4
## 6 2009-06-01 9.5
## 7 2009-07-01 9.5
## 8 2009-08-01 9.6
## 9 2009-09-01 9.8
## 10 2009-10-01 10
## # … with 118 more rows
exchange rates Import exchange rate between the U.S. dollar and the Japanese yen.Hint: Find the symbol in oanda.com.
## Warning: Oanda only provides historical data for the past 180 days. Symbol:
## USD/JPY
## # A tibble: 180 x 2
## date exchange.rate
## <date> <dbl>
## 1 2019-04-04 111.
## 2 2019-04-05 112.
## 3 2019-04-06 112.
## 4 2019-04-07 112.
## 5 2019-04-08 111.
## 6 2019-04-09 111.
## 7 2019-04-10 111.
## 8 2019-04-11 111.
## 9 2019-04-12 112.
## 10 2019-04-13 112.
## # … with 170 more rows
Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.