Publications by Andrew Des Marais

Term Project

06.05.2020

This is an extension of the tidytuesday assignment you have already done. Complete the questions below, using the screencast you chose for the tidytuesday assigment. Import data library(tidyverse) set.seed(2018) simulations <- crossing(trial = 1:1e5, weekday = 1:5, commute = c("Morning", "Evening")) %>% arrange(trial, weekday...

1460 sym R (1210 sym/2 pcs) 1 img

Quiz 1_makeup

05.05.2020

Use the given code below to answer the questions. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # for financial analysis ## Import data stocks <- tq_get("AAPL", get = "stock.prices", from = "2016-01-01") stocks ## Visualize stocks %>% ggplot(aes(x = date, y = close)) + geom_line() Q1 Import Microsoft s...

2447 sym R (1409 sym/6 pcs) 2 img

Quiz 5

29.04.2020

Replicate a case study of marketing analytics: https://www.linkedin.com/learning/the-data-science-of-marketing/cluster-analysis-with-r?u=2232593 Q1 Import data myClusterData <- read.csv("/cloud/project/cluster-r.csv") myClusterData ## Email Behavior.3 ## 1 nisl@adipiscin...

670 sym R (53174 sym/6 pcs) 1 img

Tidytuesday

26.04.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. Read the document posted in Moodle before answering the following questions. Write in your own words. Multiple ...

5414 sym

Quiz 3

30.03.2020

The data set is from a case-control study of smoking and Alzheimer’s disease. The data set has two variables of main interest: smoking a factor with four levels “None”, “<10”, “10-20”, and “>20” (cigarettes per day) disease a factor with three levels “Alzheimer”, “Other dementias”, and “Other diagnoses”. Q1 Describ...

2686 sym 3 img

Mosaic Plot

25.03.2020

In this exercise you will learn to visualize the pairwise relationships between a set of quantitative variables. To this end, you will make your own note of 8.5 Mosaic plots from Data Visualization with R. Mosaic charts can display the relationship between categorical variables using: rectangles whose areas represent the proportion of cases for ...

2619 sym 2 img

Correlation

19.03.2020

In this exercise you will learn to visualize the pairwise relationships between a set of quantitative variables. To this end, you will make your own note of 8.1 Correlation plots from Data Visualization with R. Q1 What factors have strong positve correlation with home price? “Living Area” and “Bathrooms” both have a strong positive corre...

2588 sym 2 img

Quiz 2b

24.02.2020

In this exercise you will learn to plot data using the ggplot2 package. To answer the questions below, use Chapter 4.3 Categorical vs. Quantitative Data Visualization with R. ## Loading required package: lubridate ## ## Attaching package: 'lubridate' ## The following object is masked from 'package:base': ## ## date ## Loading required pack...

1134 sym R (2668 sym/19 pcs) 6 img

Quiz 2a

19.02.2020

In this exercise you will learn to clean data using the dplyr package. To this end, you will follow through the codes in one of our e-texts, Data Visualization with R. The given example code below is from Chapter 1.2 Cleaning data. ## # A tibble: 87 x 13 ## name height mass hair_color skin_color eye_color birth_year gender ## <chr> <int>...

986 sym R (2878 sym/7 pcs)

Quiz 1

10.02.2020

Use the given code below to answer the questions. Q1 Import Netflix stock prices, instead of Apple. Hint: Insert a new code chunk below and type in the code, using the tq_get() function above. Replace the ticker symbol. Find ticker symbols from Yahoo Finance. s Q2 How many shares of the stock were traded on January 13, 2017? The shares on Janu...

2589 sym R (928 sym/2 pcs) 2 img