Publications by William Dunn

Term Project

09.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) library(ggthemes) theme_set(theme_light()) wwc_outcomes <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/...

1209 sym R (2294 sym/2 pcs) 1 img

Quiz 4

21.04.2020

Make sure to include the unit of the values whenever appropriate. Q1 Build a regression model to predict life expectancy using gdp per capita. Hint: The variables are available in the gapminder data set from the gapminder package. Note that the data set and package both have the same name, gapminder. library(tidyverse) options(scipen=999) data(...

2190 sym R (1843 sym/2 pcs)

Quiz 2

03.03.2020

# Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("WMT", "TGT", "AMZN"), get = "stock.prices", from = "2020-01-01") # Calculate daily returns stock_returns <- stock_prices %>% group_by(symbol) %>% tq_mutate(select = adjusted, mutate_fun = periodReturn, period = "daily") stock_retur...

1895 sym R (2590 sym/10 pcs) 4 img

Bivariate Graphs

25.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. # Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("AAPL", "MSFT"), get = "stock.prices", from = "2020-01-01") # Calcul...

1453 sym R (1217 sym/7 pcs) 5 img

Quiz1

11.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. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # f...

2189 sym R (2707 sym/7 pcs) 1 img

Mock Quiz 1

30.01.2020

Use the given code below to answer the questions. Q1 Get Walmart 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 for Walmart. You may find the ticker symbol for Microsoft from Yahoo Finance. ## Load package library(tidyverse) # for cleaning, pl...

1604 sym R (1032 sym/3 pcs) 1 img

My First RMarkdown with Code

30.01.2020

Use the given code below to answer the questions. Q1 Get Amazon stock prices, instead of Apple. Hint: Insert a new code chunk below and type Amazon. You may find the ticker symbol for Amazon from Yahoo Finance. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # for financial analysis ## Import data stocks <- tq...

1345 sym R (1020 sym/3 pcs) 1 img

My First Publication

23.01.2020

Q1 What is R? free software Q2 What is RStudio? language used in R Q3 What is R packages? additional add ons for r studio This is my answer. Q4 Add a code chunk Hint: Type your answer in bold. Note: For help with RMarkdown syntax, go Help > Cheatsheets > R Markdown Reference Guide. ...

296 sym

Clean data

20.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. # Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("AAPL", "MSFT"), get = "stock.prices", from = "2020-01-01") Q1 Selec...

1134 sym R (2045 sym/11 pcs) 6 img

Correlation

05.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. # import data data(SaratogaHouses, package="mosaicData") # select numeric variables df <- dplyr::select_if(SaratogaHouses, is.numeric) ...

2721 sym R (2122 sym/6 pcs) 2 img