Publications by Dirk Hartog
Discussion board 1
Discussion board post: Pick one of the exercises in the readings this week. Solve the exercise as best as you can. If you have issues, explicate them, so that all of us can help. Exercise C25 pg. 150 Matrix - Vector Product mat_a <- a <- matrix(c(1,2,3,-2,0,1,-2,-1,1,1,3,1), nrow = 3, byrow = TRUE) mat_a ## [,1] [,2] [,3] [,4] ## [1,] 1...
254 sym
WK10: Sentiment Analysis
Sentiment Analysis: A process of analyzing digital text to determine if the emotional tone of the message is positive, negative, or neutral library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.2 ✔ readr 2.1.4 ## �...
2507 sym R (4086 sym/23 pcs) 2 img
Wk9: Web APIs
The New York Times web site provides a rich set of APIs, as described here: https://developer.nytimes.com/apis. Task: Choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it into an R DataFrame. Step 1: Load libraries Create a request to the top stories NY Times API req <- request("https://ap...
710 sym 1 img
Wk7: Working with XML, HTML, and JSON
library(tidyverse) library(jsonlite) library(XML) library(xml2) library(stringr) library(rvest) #Pick three of your favorite books on one of your favorite subjects. At least one of the books should have more than one author. For each book, include the title, authors, and two or three other attributes that you find interesting. Step 1: Create three...
767 sym R (2262 sym/4 pcs)
Wk6: Project 2_Movies
The first step was to read in the csv file from guthub. movieurl <- "https://raw.githubusercontent.com/D-hartog/DATA607/main/PROJECT2/movies_untidy.csv" movies_tv <- read_csv(movieurl) ## Rows: 9999 Columns: 9 ## ── Column specification ────────────────────────────────────�...
3766 sym Python (9182 sym/25 pcs) 2 img
Wk6: Project 2_World
library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.2 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ## ...
1233 sym R (8753 sym/24 pcs) 3 img
Wk6: Project 2_Spotify
This data set contains a comprehensive list of the most famous songs of 2023 as listed on Spotify. The data set offers a wealth of features beyond what is typically available in similar data sets. It provides insights into each song’s attributes, popularity, and presence on various music platforms. For my analysis I thought it would be interestin...
1817 sym R (4093 sym/11 pcs) 3 img
Wk5: Tidying and Transforming Data
library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(tidyverse) ## ── Attaching core tidyverse packages ─────────────────�...
857 sym R (4447 sym/19 pcs) 2 img
Wk4: Project 1
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). library(tidyverse) url <- "https://raw.githubusercontent.com/D-hartog/DATA607/main/PROJECT1/chess.txt" ches...
982 sym R (2276 sym/12 pcs)
Wk3: Character Manipulation and Data Processing
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.2 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ## ✔ purrr 1.0.1...
1916 sym