Publications by Daniel Lee
Apply 7
# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and compare skewness of your portfolio and its assets. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("AAPL", "DIS", "NKE", "GM", "SBUX") prices <- tq_get(x = symbols, get = "stock.prices", ...
712 sym R (2051 sym/13 pcs)
Apply 7 - Jason Zink
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") ## Rows: 2088 Columns: 12 ## ── Column specification ─────────────────────────────────────────�...
166 sym Python (4222 sym/11 pcs)
Apply to Data 7
# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize and compare skewness of your portfolio and its assets. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = ...
881 sym R (1931 sym/13 pcs)
Apply Data 7
knitr::opts_chunk$set(echo = TRUE) # Load package 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 ...
175 sym R (7232 sym/20 pcs)
Code Along 7
# Load packages # Core library(tidyverse) library(tidyquant) Goal 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, get = "stock.prices", from = "2012-...
308 sym R (4339 sym/17 pcs) 3 img
DAT3100: Apply 6 - CEO Departures
library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.2.3 ## Warning: package 'ggplot2' was built under R version 4.2.3 ## Warning: package 'tibble' was built under R version 4.2.3 ## Warning: package 'readr' was built under R version 4.2.3 ## Warning: package 'dplyr' was built under R version 4.2.3 ## Warning: package 'for...
126 sym R (28818 sym/52 pcs) 3 img
Code along 7
# 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...
443 sym R (4634 sym/24 pcs) 3 img
Jason Zink - Code Along 7
Tidy Data Pivoting Long to wide form table4a_long <- table4a %>% pivot_longer(cols = c(`1999`, `2000`), names_to = "year", values_to = "cases") Wide to long form table4a_long %>% pivot_wider(names_from = year, values_from = cases) ## # A tibble: 3 × 3 ## country `1999` `2000` ## ...
179 sym Python (2819 sym/15 pcs)
Apply to Data 6
# Load packages # Core library(tidyverse) library(tidyquant) Goal Visualize expected returns and risk to make it easier to compare the performance of multiple assets and portfolios. Choose your stocks. from 2012-12-31 to 2017-12-31 1 Import stock prices # Choose stocks symbols <- c("AAPL", "NVDA", "ADBE", "AVGO", "AMD") # Using tq_get() ...
1023 sym R (2106 sym/9 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 ## ...
980 sym R (9585 sym/36 pcs) 9 img