Publications by Reed Wilson

Week 12: Apply 11

16.04.2023

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_un...

664 sym Python (3171 sym/25 pcs) 4 tbl

Module 11: Apply 10

10.04.2023

Import your data # excel file airlines <- read_excel("../00_data/MyData.xlsx") %>% mutate(n_events = as.numeric(n_events)) %>% mutate(avail_seat_km_per_week = as.numeric(avail_seat_km_per_week)) airlines ## # A tibble: 336 × 6 ## Ref airline avail_seat_km_per_week year_range type_…¹ n_eve…² ## <dbl> <chr> ...

292 sym 2 img

Week 11: Code Along 10

09.04.2023

# 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 = symbols, ...

443 sym R (3465 sym/17 pcs) 2 img

Module 11: Code Along 10

09.04.2023

Introduction Creating Factors x1 <- c("Dec", "Apr", "Jan", "Mar") month_levels <- c( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") y1 <- factor(x1, levels = month_levels) y1 ## [1] Dec Apr Jan Mar ## Levels: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec General Social Survery gss_cat ## # A tibble: 2...

392 sym 4 img

Module 10: Apply 9

03.04.2023

Import your data # excel file airlines <- read_excel("../00_data/MyData.xlsx") %>% mutate(n_events = as.numeric(n_events)) %>% mutate(avail_seat_km_per_week = as.numeric(avail_seat_km_per_week)) airlines ## # A tibble: 336 × 6 ## Ref airline avail_seat_km_per_week year_range type_…¹ n_eve…² ## <dbl> <chr> ...

116 sym

Module 10: Code Along 9

02.04.2023

Introduction String Basics chac_data <- "I'm 'very' hungry." stringr::str_length("I am hungry.") ## [1] 12 stringr::str_c(c("I", " am"), collapse = "") ## [1] "I am" stringr::str_c("I", " am", " ;") ## [1] "I am ;" str_sort(c("John", "Mary", "Aaron")) ## [1] "Aaron" "John" "Mary" Matching Patterns flights %>% glimpse() ## Rows: 336,776 ## Colum...

337 sym

Week 10: Apply 9

02.04.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the performance of your portfolio in terms of Sharpe Ratio. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("TSLA", "GOOG","MSFT", "AAPL") prices <- tq_get(x = symbols, get...

1346 sym R (3495 sym/16 pcs) 1 img

Week 9: Apply 8

27.03.2023

Import your data # excel file airlines <- read_excel("../00_data/MyData.xlsx") %>% mutate(n_events = as.numeric(n_events)) %>% mutate(avail_seat_km_per_week = as.numeric(avail_seat_km_per_week)) airlines ## # A tibble: 336 × 6 ## Ref airline avail_seat_km_per_week year_range type_…¹ n_eve…² ## <dbl> <chr> ...

365 sym

Week 9: Apply 8

27.03.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and examine changes in the underlying trend in the downside risk of your portfolio in terms of kurtosis. Choose your stocks. from 2012-12-31 to present 1 Import stock prices symbols <- c("TSLA", "GOOG","MSFT", "AAPL") prices <- tq_get(x = symbols, get =...

1005 sym R (3390 sym/16 pcs) 1 img

Week 9: Code Along 8

25.03.2023

Introduction nycflights13 Keys Mutating Joins Inner Joins x <- tribble( ~key, ~val_x, 1, "x1", 2, "x2", 3, "x3" ) y <- tribble( ~key, ~val_y, 1, "y1", 2, "y2", 4, "y3" ) inner_join(x, y) ## Joining with `by = join_by(key)` ## # A tibble: 2 × 3 ## key val_x val_y ## <dbl> <chr> <chr> ## 1 1 x1 y1 ...

203 sym Python (5459 sym/41 pcs)