Publications by Daniel Lee

Document

27.11.2024

# Load packages # Core library(tidyverse) library(tidyquant) 1 Import stock prices # 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 sto...

502 sym R (3621 sym/18 pcs) 2 img

Document

27.11.2024

# Load packages # Core library(tidyverse) library(tidyquant) 1 Import stock prices # 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 sto...

502 sym R (3618 sym/18 pcs) 2 img

Apply11

26.11.2024

Import your data data(flights) flights %>% skimr::skim() Data summary Name Piped data Number of rows 336776 Number of columns 19 _______________________ Column type frequency: character 4 numeric 14 POSIXct 1 ________________________ Group variables None Variable type: character skim_variable n_missing complete_rate min max empty n_u...

527 sym R (2891 sym/20 pcs) 4 tbl

DAT3100 Apply 5 Museums

26.11.2024

Museums: The dataset relates to over 4000 UK museums. It covers the period from 1960 to date.. Build a classification model to predict whether a museum in the UK is accredited or not (Accreditation). library(tidyverse) library(correlationfunnel) # for correlation funnel analysis museums <- readr::read_csv('https://raw.githubusercontent.com/rf...

1960 sym R (13123 sym/9 pcs) 1 img 3 tbl

DAT3100 Apply 5 Museums

26.11.2024

Museums: The dataset relates to over 4000 UK museums. It covers the period from 1960 to date.. Build a classification model to predict whether a museum in the UK is accredited or not (Accreditation). library(tidyverse) library(correlationfunnel) # for correlation funnel analysis museums <- readr::read_csv('https://raw.githubusercontent.com/rf...

2080 sym R (23178 sym/21 pcs) 4 img 3 tbl

DAT3100 Apply 5 Museums

26.11.2024

Museums: The dataset relates to over 4000 UK museums. It covers the period from 1960 to date.. Build a classification model to predict whether a museum in the UK is accredited or not (Accreditation). library(tidyverse) library(correlationfunnel) # for correlation funnel analysis museums <- readr::read_csv('https://raw.githubusercontent.com/rf...

1979 sym R (21181 sym/14 pcs) 1 img 3 tbl

Apply12

25.11.2024

Goal is to automate building and tuning a classification model to predict employee attrition, using the h2o::h2o.automl. Set up Import data Import the cleaned data from Module 7. library(h2o) ## ## ---------------------------------------------------------------------- ## ## Your next step is to start H2O: ## > h2o.init() ## ## For H2O pack...

355 sym R (34509 sym/53 pcs)

apply11

25.11.2024

# for Core packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔...

564 sym R (11776 sym/54 pcs) 5 img

Apply 10

24.11.2024

# Load packages # Core library(tidyverse) library(tidyquant) Goal Calculate and visualize your portfolio’s beta. Choose your stocks and the baseline market. from 2012-12-31 to present 1 Import stock prices symbols <- c("MCD", "ISRG", "KHC", "FIS", "GOOG") prices <- tq_get(x = symbols, get = "stock.prices", ...

1033 sym R (3107 sym/16 pcs) 1 img

Code Along 11

24.11.2024

Ch19 Functions Introduction When should you write a function? # For reproducible work set.seed(1234) # Creat a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TRUE)) / (max(df$a, na.rm = TRUE) - min(df$a, na.rm = TRUE)) df...

293 sym