# # This file is to help you load the data needed in this workshop. # # First, a helper function to build filenames. path_concat <- function(path1, ..., sep="/") {paste(path1, ..., sep = sep)} # Second, if you have downloaded the data from the workshop source, # put it in some directory and then set this variable to that directory. # dataDirectory <- "../../data" # The instructor has stored his data in a directory called "data" that is # two levels up from the current directory (e.g. where this file is located). # You can execute getwd() to see what the current directory is. # # ################################################################### # # Loading the New Zealand Covid data from New Zealand. # # ################################################################# # # There are a few ways to do this. You ONLY NEED ONE # # 1. If you have loon.data 0.1.0 release, this is easy. library(loon.data) data("covidNZ") # 2. If you only have loon.data 0.0.9 or earlier, then load(path_concat(dataDirectory, "covidNZ.rda")) # Or # # 3. Read it from csv. # # Either # a. from your local csv file covidCSVFile <- path_concat(dataDirectory, "covid-cases-28may20.csv") # OR # b. from my Waterloo account: covidCSVFile <- "https://math.uwaterloo.ca/~rwoldfor/talks/InteractiveDataVisualization/data/covid-cases-28may20.csv" covidNZ <- read.csv(covidCSVFile, colClasses = c("Date", # "Case_date" "factor", # "Sex" "factor", # "Age" "character", # "District_Health_Board" "factor", # "Overseas_travel" "character", # "Last_country_visited" "character", # "Flight_number" "Date", # "Flight_departure_date" "Date" # "Arrival_date" )) ################################################################### # # Loading the South African Heart data. # # ################################################################# # # This is in the "loon.data" package. library(loon.data) data(SAheart) ################################################################### # # Loading the immunoglobulin molecular data. # # ################################################################# # # This is in the "loon.data" package. library(loon.data) data(igg1)