forked from herndonj/dvs_cal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
05_panopto_report.Rmd
85 lines (62 loc) · 1.99 KB
/
05_panopto_report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
title: "generate the Panopto report"
output: html_notebook
---
Send this report to Paul.
This Panopto report pads the start and end times by 15 minutes at each end of the workshop. Secondarily this report selects the specific fields important for the Panopto Report.
```{r}
library(tidyverse)
library(lubridate)
library(here)
library(fs)
library(glue)
```
```{r}
my_df <- read_csv("output/workshops.csv")
```
```{r}
glimpse(my_df)
```
## Panopto Report
Send this report to Paul.
This Panopto report pads the start and end times by 15 minutes at each end of the workshop. Secondarily this report selects the specific fields important for the Panopto Report.
```{r}
my_df <- read_csv("output/workshops.csv")
DVS_workshop_schedule <- my_df
```
```{r}
panopto_report <- DVS_workshop_schedule %>%
filter(location != "Online") %>%
mutate(folder = "DVS Internal") %>%
mutate(start_time = workshop_begins - minutes(15)) %>%
mutate(start_time = format(start_time, "%I:%M %p")) %>%
mutate(end_time = workshop_ends + minutes(15)) %>%
mutate(end_time = format(end_time, "%I:%M %p")) %>%
mutate(date = format(date, "%Y-%m-%d")) %>%
mutate(presenter = str_replace_all(
presenter, "[Ç]", "C") # Anglicize Çetinkaya to Cetinkaya
) %>%
select(date, title, location,
start_time, end_time,
presenter, folder)
panopto_report <- panopto_report %>%
filter(!str_detect(title, "R Open Lab"))
panopto_report
```
### Write Panopto CSV file
1. Creates "output" directory if it does not already exist (or leave's it alone if it does)
1. Write's a panopto.csv report file in the "output" directory
```{r}
dir_create("output")
write_csv(panopto_report,
here("output", glue(
glue(
"panopto_report_of_dvs_workshops",
format(Sys.Date(), "%Y-%m-%d"),
.sep = "_"
),
"csv",
.sep = "."
)))
```
Sophia can retrieve this report from github