This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(httr) | |
library(jsonlite) | |
library(dplyr) | |
library(knitr) | |
library(ggplot2) | |
#OAuth | |
consumer_key <- "xxxx" | |
consumer_secret <- "xxxx" | |
token <- "xxxx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rvest) | |
library(dplyr) | |
library(stringr) | |
library(readr) | |
#Read CSV from working directory, clean and prepare data | |
schools <- read_csv("schools.csv") %>% | |
slice(-c(2535:2539)) %>% | |
mutate(school = ifelse(unlist(stringr::str_extract(`Account Name`, "(\\w+)$")) %in% "School", | |
unlist(stringr::str_replace(`Account Name`, "School", "")), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyr) | |
library(ggplot2) | |
library(dplyr) | |
library(shiny) | |
library(shinythemes) | |
library(readr) | |
library(plotly) | |
ui <- fluidPage(theme = shinytheme("united"), | |
titlePanel("Evaluation Review Application"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(miniUI) | |
makeStringsGadget <- function(...) { | |
ui <- miniPage( | |
gadgetTitleBar("Type your strings freely!"), | |
miniContentPanel( | |
textInput("sep", "Separator:"), | |
textInput("text", "Strings:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check_negative_args_classes <- function(lon = NULL, lat = NULL) { | |
args <- as.list(match.call()) | |
return(args) | |
} | |
l <- check_negative_args_classes(lon = 45, lat = -86.7) | |
lapply(l, class) | |
""" | |
Output: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rcanvas) | |
library(tidyverse) | |
get_course_gradebook <- function(course_id) { | |
course_assignment_ids <- get_course_items(course_id, "assignments") %>% .$id %>% as.list() | |
course_ids <- rep(course_id, length(course_assignment_ids)) %>% as.list() | |
get_assignment_submissions <- function(course_id, assignment_id) { | |
url <- sprintf("%s/api/v1/courses/%s/assignments/%s/submissions", canvas_url(), course_id, assignment_id) | |
httr::GET(url, query = list(access_token = Sys.getenv("CANVAS_API_TOKEN"))) %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
canvas_url <- function() paste0(Sys.getenv("CANVAS_DOMAIN"), "/api/v1/") | |
sc <- function(x) { | |
Filter(Negate(is.null), x) | |
} | |
canvas_query <- function(urlx, args, type = "GET") { | |
fun <- getFromNamespace(type, "httr") | |
args <- sc(args) | |
resp <- fun(urlx, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
source("utils.R") | |
decrement_section <- function(section_code) { | |
old_section_num <- readr::parse_number(section_code) - 1 | |
section_code <- stringr::str_extract(section_code, "^(\\w+)") | |
paste(section_code, old_section_num) | |
} | |
create_content_migration <- function(migration_type = "course_copy_importer", course_id = NULL, source_course_id = NULL) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x1,x2,x3 | |
A,M,10 | |
A,F,15 | |
B,M,20 | |
B,F,30 | |
C,M,40 | |
C,F,30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x1,F,M | |
A,15,10 | |
B,30,20 | |
C,30,40 |
OlderNewer