Publications by Jack Tortolani
DACA5C4
Coding basics R as a calculator 1000 / 10 ## [1] 100 x <- 1000 / 10 # x assignment symbol What’s in a name? Calling functions Use of TAB seq(from = 1, to = 10, by = 1) ## [1] 1 2 3 4 5 6 7 8 9 10 continuation character, + seq(from = 1, to = 10) ## [1] 1 2 3 4 5 6 7 8 9 10 Printing to screen y <- seq(from = 1, to = 10) ...
171 sym Python (231 sym/9 pcs)
DACA5CH5
Import data flights ## # A tibble: 336,776 × 19 ## year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time ## <int> <int> <int> <int> <int> <dbl> <int> <int> ## 1 2013 1 1 517 515 2 830 819 ## 2 2013 1 1 533 529 ...
417 sym Python (20189 sym/51 pcs) 1 img
Apply 4 DA
Import data # excel file data <- read_excel("../00_data/myData.xlsx", sheet = "nhl_player_births") data ## # A tibble: 8,474 × 9 ## player_id first_name last_name birth_date birth_city birth_country ## <dbl> <chr> <chr> <dttm> <chr> <chr> ## 1 8467867 Bryan Adams 1977-03-...
205 sym 1 img
Code Along 4 DA
Welcome Ch1 Introduction The data science project workflow Prerequisites R RStudio r packages Install the tidyverse package Running R code 1+2 ## [1] 3 Getting help Google Stackoverflow Ch2 Introduction to Data Exploration Ch3 Data Visualization Set up library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.4.2 da...
1399 sym R (4949 sym/31 pcs) 7 img
TestPublishing
Do your work here. library(tidyverse) ## Warning: package 'tidyverse' was built under R version 4.4.2 ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggpl...
27 sym R (1711 sym/5 pcs)
Apply3DA
Import data # excel file data <- read_excel("data/myData.xlsx") ## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim = shim, ## : NA inserted for an unsupported date prior to 1900 ## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim = shim, ## : NA inserted for an unsupported date prior to 1900 ## Wa...
38 sym 1 img
Apply 13
# Load packages # Core library(tidyverse) library(tidyquant) # Source function source("../00_scripts/simulate_accumulation.R") 1 Import stock prices Revise the code below. Replace symbols with your stocks. Replace the from and the to arguments to date from 2012-12-31 to present. symbols <- c("SPY", "QQQ", "TSLA", "XOM") prices <- tq_ge...
1930 sym R (4806 sym/22 pcs) 1 img
Apply 12
# Load packages # Core library(tidyverse) library(tidyquant) Goal Examine how each asset contributes to portfolio standard deviation. This is to ensure that our risk is not concentrated in any one asset. 1 Import stock prices Choose your stocks from 2012-12-31 to present. symbols <- c("XOM", "QQQ", "SPY", "TSLA") prices <- tq_get(x = symb...
1243 sym R (24509 sym/22 pcs) 1 img
Code Along 13
# Load packages # Core library(tidyverse) library(tidyquant) # time series library(timetk) Goal Simulate future portfolio returns five stocks: “SPY”, “EFA”, “IJS”, “EEM”, “AGG” market: “SPY” from 2012-12-31 to 2017-12-31 1 Import stock prices symbols <- c("SPY", "EFA", "IJS", "EEM", "AGG") prices <- tq_get(x = ...
412 sym R (8737 sym/33 pcs) 2 img
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_u...
556 sym 6 tbl