Publications by Daniel Lee
Apply 11
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...
537 sym 4 tbl
codealong12
knitr::opts_chunk$set(echo = TRUE) 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 ## ✔ lu...
341 sym R (3288 sym/58 pcs)
CodeAlong12
# Load packages # Core library(tidyverse) library(tidyquant) library(readr) # Time series library(lubridate) library(tibbletime) # modeling library(broom) Goal Examine how each asset contributes to portfolio standard deviation. This is to ensure that our risk is not concentrated in any one asset. five stocks: “SPY”, “EFA”, “IJS”, �...
688 sym R (15463 sym/23 pcs) 2 img
Apply 12 - Jason Zink
Import your data data("mtcars") mtcars <- as_tibble(mtcars) # csv file jobs_gender <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-03-05/jobs_gender.csv") ## Rows: 2088 Columns: 12 ## ── Column specification ───────────────────────────...
387 sym Python (13538 sym/56 pcs) 1 img
Apply 11 - Jason Zink
Ch20 Vectors Introduction Vector basics Important types of automatic vectors Using automatic vectors sample(10) + 10 ## [1] 17 14 16 20 11 13 18 12 15 19 1:10 + 1:2 ## [1] 2 4 4 6 6 8 8 10 10 12 1:10 + 1:3 ## Warning in 1:10 + 1:3: longer object length is not a multiple of shorter object ## length ## [1] 2 4 6 5 7 9 8 10 12 11 ...
332 sym Python (2137 sym/52 pcs)
Apply to Data 11
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...
327 sym 4 tbl
Apply 9 Redid
Import your data # csv file jobs_gender <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-03-05/jobs_gender.csv") Chapter 14 Tools Detect matches jobs_gender$occupation %>% glimpse() ## chr [1:2088] "Chief executives" "General and operations managers" ... str_detect(jobs_gender$occupation, "...
111 sym
Apply to Data 10
# 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 # Choose stocks symbols <- c("AAPL", "NVDA", "ADBE", "AVGO", "AMD") # Using tq_get() ---- prices <- tq_get(x = symbols, ...
717 sym R (2505 sym/10 pcs)
Apply 11
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 ## ...
1006 sym R (5250 sym/24 pcs) 2 img
Apply 11
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 ## ...
1006 sym R (5250 sym/24 pcs) 2 img