Publications by Daniel Lee
Apply it to your Data 1: Transit Cost
Transit Costs: Why do transit-infrastructure projects in New York cost 20 times more on a per kilometer basis than in Seoul? Build a regression model to predict the cost (real_cost). Use the transit_cost dataset. Import Data transit_cost <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-01-0...
660 sym 4 img 3 tbl
Document
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symb...
352 sym R (2689 sym/14 pcs) 3 img
Document
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("L", "Dell", "HAL", "TSM", "HMC") prices <- tq_get(x = symbols, get = "stock.prices", ...
289 sym R (3275 sym/14 pcs) 3 img
CodeAlong5
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") # Using tq...
300 sym R (2592 sym/10 pcs) 3 img
Code Along 5
# Load packages # Core library(tidyverse) library(tidyquant) Goal Collect individual returns into a portfolio by assigning a weight to each stock five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” from 2012-12-31 to 2017-12-31 1 Import stock prices symbol <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = symbol, ...
301 sym R (1862 sym/12 pcs) 3 img
Document
# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice # Choose stocks symbols <- c("NOK", "INTC", "HMC", "WMT") prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-01-01", to = "2017-01-01") 2 Convert prices to returns by quarter...
192 sym R (2022 sym/7 pcs) 1 img
Code Along 5 Pt1 DA
Coding basics R as a calculator 1000 / 10 ## [1] 100 x <- 1000 / 10 # x assignment symbol What’s in a name? Calling functions Use of TAB seq(from = 1, to = 10, by = 1) ## [1] 1 2 3 4 5 6 7 8 9 10 continuation character, + seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 Printing to screen y <- seq(from = 1, to = 10) y...
171 sym Python (229 sym/9 pcs)
Real World Applications 5
The vunerability assessment Analyze the data for your client company’s industry and answer the following questions. How much have sales in the industry declined in the recession? What’s the worst that has happened in the past? Does the industry go into recession before, at the same time, or after the national economy goes into recession? If...
868 sym 1 tbl
Real World Applications 5
The vunerability assessment Analyze the data for your client company’s industry and answer the following questions. How much have sales in the industry declined in the recession? What’s the worst that has happened in the past? Does the industry go into recession before, at the same time, or after the national economy goes into recession? If...
868 sym 1 tbl