Publications by Daniel Lee

Apply to your Data 6

06.06.2024

Import Data data <- read_excel("../00_data/MyData.xlsx") Introduction Questions Variation Visualizing distributions ggplot(data = data) + geom_bar(mapping = aes(x = Year)) ggplot(data = data) + geom_histogram(mapping = aes(x = Kilometers_Driven)) ## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. ggplot(data = data, map...

288 sym 9 img

Code Along 6

05.06.2024

# Load package library(tidyverse) library(tidyquant) Introduction Question2 Variation Visualising distrobution diamonds %>% ggplot(aes(x = cut)) + geom_bar() diamonds %>% ggplot(mapping = aes(x = carat)) + geom_histogram(binwidth = 0.5) diamonds %>% filter(carat < 3) %>% ggplot(aes(x = carat)) + geom_histogram(...

282 sym R (1638 sym/16 pcs) 15 img

Code Along 6

05.06.2024

# Load packages # Core library(tidyverse) library(tidyquant) library(scales) library(ggrepel) library(scales) 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", ...

402 sym R (4638 sym/22 pcs) 2 img

Document

05.06.2024

# 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") prices <- tq_get(...

400 sym R (4140 sym/21 pcs) 2 img

Document

05.06.2024

# 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 #choose stocks symbols <- c("NFLX", "GOOG", "TSLA") prices <- tq_get(x = symbols, from = "2012-12-31", ...

642 sym R (2293 sym/12 pcs) 1 img

Apply to your Data 5

04.06.2024

# 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("NVDA", "MSFT", "AMD", "INTL") prices <- tq_get(x = symbols, get = "stock.prices", ...

974 sym R (2477 sym/13 pcs) 1 img

Apply to your Data 5

04.06.2024

Import data Apply the following dplyr verbs to your data Filter rows ## # A tibble: 10 × 12 ## Brand Model Year Kilometers_Driven Fuel_Type Transmission Owner_Type Mileage ## <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <dbl> ## 1 Toyo… Coro… 2018 50000 Petrol Manual First 15...

159 sym

Document

04.06.2024

# 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") prices <- tq_get(...

351 sym R (2621 sym/14 pcs) 3 img

Code Along 5 Fin3100

02.06.2024

# Load packages # Core library(tidyverse) library(tidyquant) library(scales) 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 ...

354 sym R (3120 sym/15 pcs) 3 img

Document

30.05.2024

# Load packages library(tidyverse) library(tidyquant) 1 Import stock prices of your choice Five Stocks: COST - Costco Wholesale Corporation ELF - E.l.f. Beauty Inc. TSLA - Tesla Inc. NFLX - Netflix Inc. GOOG - Alphabet Inc Class C symbols <- c("COST", "ELF", "TSLA", "NFLX", "GOOG") prices <- tq_get(x = symbols, get ...

607 sym R (1521 sym/6 pcs) 1 img