Publications by Keith Colella

CUNY SPS MSDS D607 - Project 1

13.02.2023

Task In this project, you’re given a text file with chess tournament results where the information has some structure. Your job is to create an R Markdown file that generates a .CSV file (that could for example be imported into a SQL database) with the following information for all of the players: Player’s Name, Player’s State, Total Number o...

2995 sym 1 img

CUNY SPS MSDS - DATA607 Week 2

11.02.2023

Task 1 Using the 173 majors listed in fivethirtyeight.com’s College Majors dataset [https://fivethirtyeight.com/features/the-economic-guide-to-picking-a-college-major/], provide code that identifies the majors that contain either “DATA” or “STATISTICS”. ## Read in dataset from 538's git majors <- read.csv(paste0('https://raw.githubuse...

1265 sym Python (4589 sym/32 pcs)

CUNY SPS MSDS Bridge R Week 3

16.01.2023

Research Question: Have corporate profits increased as a share of overall economic production? As inflation has kicked up in recent years, reporting has often focused on “price gouging” and “hoarding” by US corporates as a potential driver of rising prices. This analysis will assess corporate profits as compared to overall economic pr...

4133 sym R (2550 sym/18 pcs) 7 img

CUNY SPS MSDS - DATA607 Week1

30.01.2023

Overview This exercise explores the ‘primary-project-2022’ dataset from https://data.fivethirtyeight.com/. The data relates to four articles covering trends in the primary elections leading up to the 2022 mid-terms. Topics include the makeup of primary candidates, with a focus on race and gender. I’ll aim to focus on one article: People ...

2623 sym R (3469 sym/13 pcs) 1 img

R - Week 1 Homework

26.12.2022

Question #1 - Loop to calculate 12! Define function factorial <- function(input){ product <- 1 list <- (1:input) for (val in list){ n <- list[length(list)-val+1] product <- product * n } return(product) } Use function to calculate 12! factorial(12) ## [1] 479001600 Question #2 - Numeric Vector with sequence 20 to 50 by ...

229 sym Python (507 sym/10 pcs)

CUNY SPS MSDS Bridge Program - R - Week 2

09.01.2023

Setup I’ll use the carData package, focusing on the Arrests dataset, which details arrests in Toronto for simple possession of small quantities of marijuana. # install.packages("carData") library(carData) head(Arrests,5) ## released colour year age sex employed citizen checks ## 1 Yes White 2002 21 Male Yes Yes ...

1152 sym R (5769 sym/31 pcs)