Publications by Colton Petrosino

Quiz 1

10.09.2020

# Load packages library(tidyquant) library(tidyverse) # for count() function # Import S&P500 Stock Index SP500 <- tq_index("SP500") SP500 ## # A tibble: 505 x 8 ## symbol company identifier sedol weight sector shares_held local_currency ## <chr> <chr> <chr> <chr> <dbl> <chr> <dbl> <chr> ## 1 AAP...

1108 sym R (1736 sym/4 pcs)

Document

24.09.2020

For this quiz, you are going to use orange juice data. This data set is originally used in a machine learning (ML) class, with the goal to predict which of the two brands of orange juices the customers bought. Of course, you are not building a ML algorithm in this quiz. I just wanted to provide you with the context of the data. The response varia...

2952 sym R (5905 sym/10 pcs) 2 img

Quiz 3

08.10.2020

For this quiz, you are going to use orange juice data. This data set is originally used in a machine learning (ML) class, with the goal to predict which of the two brands of orange juices the customers bought. Of course, you are not building a ML algorithm in this quiz. I just wanted to provide you with the context of the data. The response varia...

3779 sym R (6527 sym/18 pcs) 2 img

Quiz4

22.10.2020

For this quiz, you are going to use orange juice data. This data set is originally used in a machine learning (ML) class, with the goal to predict which of the two brands of orange juices the customers bought. Of course, you are not building a ML algorithm in this quiz. I just wanted to provide you with the context of the data. The response varia...

4129 sym R (5791 sym/12 pcs) 1 img

Publish Document

20.10.2020

For this quiz, you are going to use orange juice data. This data set is originally used in a machine learning (ML) class, with the goal to predict which of the two brands of orange juices the customers bought. Of course, you are not building a ML algorithm in this quiz. I just wanted to provide you with the context of the data. The response varia...

3779 sym R (6527 sym/18 pcs) 2 img

Term Paper

16.11.2020

Choose one of David Robinson’s tidytuesday screencasts, watch the video, and summarise. https://www.youtube.com/channel/UCeiiqmVK07qhY-wvg3IZiZQ Instructions You must follow the instructions below to get credits for this assignment. Elaborate your answer. One or two sentence answers won’t get credit. Make sure to cite what you see and hear ...

4279 sym

Quiz 5

05.11.2020

Q1 Import data. Hint: The data file is posted in Moodle. See Module 5. It’s named as “gapminder.csv”. data <- read.csv("~//busStat/data/gapminder.csv") head(data) ## country continent year lifeExp pop gdpPercap ## 1 Afghanistan Asia 1952 28.801 8425333 779.4453 ## 2 Afghanistan Asia 1957 30.332 9240934 820.8530...

2325 sym R (2499 sym/15 pcs) 3 img

Quiz 6

19.11.2020

For this quiz, you are going to use mpg (miles per galon) dataset. This dataset contains a subset of the fuel economy data that the EPA makes available on http: //fueleconomy.gov. It contains only models which had a new release every year between 1999 and 2008 - this was used as a proxy for the popularity of the car. The dataset has the following...

2043 sym R (3773 sym/26 pcs)

Quiz 1

16.02.2021

# Load packages library(tidyquant) ## Warning: package 'tidyquant' was built under R version 4.0.3 ## Warning: package 'zoo' was built under R version 4.0.3 library(tidyverse) # for count() function ## Warning: package 'tidyverse' was built under R version 4.0.3 ## Warning: package 'ggplot2' was built under R version 4.0.3 ## Warning: package '...

1228 sym R (2095 sym/12 pcs)

Quiz 5

15.04.2021

# Load packages library(tidyquant) library(tidyverse) # Import stock prices and calculate returns returns_yearly <- c("^DJI", "^GSPC", "^IXIC") %>% tq_get(get = "stock.prices", from = "1990-01-01", to = "2020-11-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = ye...

3813 sym R (4515 sym/17 pcs) 1 img