library(tidyverse)
Rate My Professor sample dataset
rmp <- read_csv(file = "data/original/rate_my_professor_sample/RateMyProfessor_Sample data.csv")
rmp_curated <- rmp %>% select(online = IsCourseOnline, student_star, comments) %>% filter(student_star == 1 | student_star == 5) %>% mutate(id = row_number()) %>% group_by(online) %>% slice_sample(n = 5) %>% ungroup() %>% select(rating_id = id, online, student_star, comments)
fs::dir_create(path = "data/derived/rate_my_professor_sample/") write_csv(rmp_curated, file = "data/derived/rate_my_professor_sample/rmp_curated.csv")
data_dic_starter <- function(data, file_path) { # Function: # Creates a .csv file with the basic information # to document a curated dataset tibble(variable_name = names(data), # column with existing variable names name = "", # column for human-readable names description = "") %>% # column for prose description write_csv(file = file_path) # write to disk } data_dic_starter(rmp_curated, file_path = "data/derived/rate_my_professor_sample/rmp_curated_data_dictionary.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.