Publications by Daniel Lee
Code Along 5 Ch. 4
Coding basics R as a calculator 1000 / 10 ## [1] 100 x <- 1000 / 10 x ## [1] 100 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, ...
172 sym Python (239 sym/10 pcs)
BUS1400 Week 6: 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...
912 sym 3 tbl
Apply 4
Import data # excel file data <- read_excel("../00_data/myData.xlsx") data State one question Is there a difference in Men vs Women and their pay in higher quartiles? Plot data ggplot(data = data) + geom_point(mapping = aes(x = MaleTopQuartile, y = FemaleTopQuartile)) Interpret There is a higher percentage of men in the top quartile over the...
254 sym 1 img
Apply to Data 4
# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice # Choose stocks symbols <- c("AAPL", "MSFT", "NVDA", "ORCA", "CSCO") # Using tq_get() ---- prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-12-31", to = "2017-12-31") 2 Convert pri...
104 sym R (1170 sym/4 pcs) 1 img
Course Eval
Question I want to answer This report is intended to identify the underlying trend in my student course evaluations since my last promotion. Data Student evaluations used in the analysis covers the academic year of 2014-2018. Note that academic year differs from calendar year. Academic years (AY) in the analysis are defined as: AY 2014: fall 2...
6158 sym 5 img
Code Along 4
# Load packages # Core library(tidyverse) library(tidyquant) Goal Take raw prices of five individual stocks and transform them into monthly returns five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” 1 Import stock prices # Choose stocks symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") # Using tq_get() ---- prices <- tq_ge...
213 sym R (1173 sym/4 pcs) 1 img
Apply_4
# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice symbols <- c("AMZN", "AAPL", "TSLA") prices <- tq_get(x = symbols, get = "stock.prices", from = "2012-01-01", to = "2017-01-01") 2 Convert prices to returns by quarterly asset_returns_tbl <- prices %...
265 sym R (1457 sym/5 pcs) 1 img
Apply_3
# Load packages library(tidyverse) library(tidyquant) 1 Get stock prices and convert to returns Ra <- c("AAPL", "TSLA", "NFLX") %>% tq_get(get = "stock.prices", from = "2010-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, period = "month...
203 sym R (3073 sym/11 pcs)
Document
library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ## ...
132 sym R (6805 sym/35 pcs) 4 img