Publications by Douglas Barley
Week2Assignment
R Markdown R Bridge Week 2 Assignment One of the challenges in working with data is wrangling. In this assignment we will use R to perform this task. Here is a list of data sets: http://vincentarelbundock.github.io/Rdatasets/ (click on the csv index for a list) Please select one, download it and perform the following tasks: Sample Dataset: HHS ...
2788 sym R (18697 sym/46 pcs)
Week1Assignment
R Markdown R Bridge Week 1 Assignment Please create the following exercises in .rmd format, publish to rpub and submit both the .rmd file and the rpub link. Write a loop that calculates 12 factorial # create two variables f = 12 # the start of the factorial a = 1 # the running total of the factorial computation while (f>0){ # loop from t...
558 sym R (1514 sym/13 pcs)
Week3Assignment
R Markdown R Bridge Course Final Project This is a final project to show off what you have learned. Question for Analysis Meaningful question for analysis: Please state at the beginning a meaningful question for analysis. Use the first three steps and anything else that would be helpful to answer the question you are posing from the data set y...
9391 sym R (9281 sym/19 pcs) 8 img
DATA607.Homework1
Overview and first look at the data The FiveThirtyEight article “Voter Registrations Are Way, Way Down During The Pandemic” https://fivethirtyeight.com/features/voter-registrations-are-way-way-down-during-the-pandemic/, published June 26, 2020, by Kaleigh Rogers and Nathaniel Rakich, compares new voter registrations in the spring of 2020 to t...
2987 sym R (7799 sym/14 pcs) 2 img
DataScienceInContextPresentation
Using SQL inside R for Data Preparation Using an SQL database as a data source is ideal for working with larger sets of data, but there will be times when you may want to use the SQL language to prepare your data when there is no time to set up and connect to an SQL database. Never fear! As long as you can get your data quickly into R via either ...
2710 sym R (6236 sym/7 pcs)
DATA607.Homework3
Question 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” dataURL <- "https://raw.githubusercontent.com/fivethirtyeight/data/master/college...
3228 sym R (1409 sym/14 pcs)
DATA 607 - Project 1
Chess Tournament Stats For this project I saved the original .txt file as an .xlsx file and used the built-in “Text to Columns” feature to quickly separate data into its respective columns. All of the Excel transformations only took about 20 minutes start to finish. Then I saved the transformed data as a tab delimited text file called tournam...
1673 sym R (3701 sym/12 pcs)
DATA607 - Homework5
Importing and Preparing Data This script reads the flight delays CSV file in “wide” data structue from my GitHub repo into R. gitURL <- "https://raw.githubusercontent.com/douglasbarley/DATA607/master/Week%205%20-%20Arrival%20Delays.csv" delays <- read.csv(gitURL) names(delays) <- c("Airline","status","LAX","PHX","SAN","SFO","SEA") delays...
3204 sym R (4605 sym/14 pcs) 4 img
DATA 607 - Project 2
Class Rank and Housing Choice For this project we made a .csv file from the image posted in Week 5 by Donghwan Kim and saved it to my GitHub repo here. The .csv file was imported into R and saved as a data frame called RankHousing. fileURL <- "https://raw.githubusercontent.com/douglasbarley/DATA607/master/ClassRankAndHousing.csv" RankHousing <- ...
1386 sym R (2626 sym/5 pcs) 1 img
DATA607 - Week 9 Assignment
Approach and reasoning After signing up for my API key with the New York Times, I decided that I needed to explore what kinds of lists were available for reading into R. So I started with a top level list of lists as a good place to explore the types of lists available. Reading the file into an R dataframe The raw JSON file of lists is read into...
1993 sym R (48079 sym/11 pcs)