| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 1 | --- |
| Marc Kupietz | df0eda9 | 2023-10-07 20:50:00 +0200 | [diff] [blame] | 2 | title: "IDS theme for revealjs" |
| 3 | subtitle: "a demo" |
| Marc Kupietz | ea8ff77 | 2024-05-14 22:08:46 +0200 | [diff] [blame] | 4 | author: |
| 5 | - name: Marc Kupietz |
| 6 | - name: John Doe |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 7 | institute: "IDS Mannheim" |
| Marc Kupietz | 7df5e69 | 2023-10-10 21:49:17 +0200 | [diff] [blame] | 8 | date: "`r paste0('Mannheim, ', Sys.Date())`" |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 9 | output: |
| 10 | revealjs::revealjs_presentation: |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 11 | reveal_plugins: |
| 12 | - search |
| 13 | - zoom |
| 14 | - notes |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 15 | - menu |
| 16 | reveal_options: |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 17 | chalkboard: |
| 18 | theme: chalkboard |
| 19 | toggleNotesButton: true |
| 20 | menu: |
| 21 | numbers: true |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 22 | lang: en |
| 23 | bibliography: references.bib |
| 24 | csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl" |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 25 | --- |
| 26 | |
| 27 | ```{r setup, include=FALSE} |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 28 | knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE) |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 29 | library(idsThemeR) |
| Marc Kupietz | 289f997 | 2023-10-09 09:49:12 +0200 | [diff] [blame] | 30 | library(RKorAPClient) |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 31 | library(highcharter) |
| 32 | library(tidyverse) |
| Marc Kupietz | 8a15259 | 2023-10-09 12:32:16 +0200 | [diff] [blame] | 33 | source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R") |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 34 | ``` |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 35 | # Introduction |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 36 | |
| 37 | ## R Markdown |
| 38 | |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 39 | This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown [@R-rmarkdown] see <http://rmarkdown.rstudio.com>. |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 40 | |
| 41 | When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. |
| 42 | |
| 43 | ## Slide with Bullets |
| 44 | ### Subheading |
| 45 | |
| 46 | - Bullet 1 |
| 47 | - Bullet 2 |
| Marc Kupietz | 281ba9c | 2026-08-11 15:37:48 +0200 | [diff] [blame] | 48 | - Second-level bullet |
| 49 | - Second-level bullet |
| 50 | - Third-level bullet |
| 51 | - Third-level bullet |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 52 | - Bullet 3 |
| 53 | |
| 54 | <aside class="notes"> |
| 55 | Here are some notes. |
| 56 | </aside> |
| 57 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 58 | # Methods |
| 59 | |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 60 | ## Slide with R Output |
| 61 | |
| 62 | ```{r cars, echo = TRUE} |
| 63 | summary(cars) |
| 64 | ``` |
| 65 | |
| 66 | ## Slide with Plot |
| 67 | |
| Marc Kupietz | beefb62 | 2026-08-08 17:17:07 +0200 | [diff] [blame] | 68 | ```{r pressure, fig.height=5, fig.width=12, message=F, warning=F} |
| Marc Kupietz | a737b1b | 2023-10-07 09:32:20 +0200 | [diff] [blame] | 69 | plot(pressure) |
| 70 | ``` |
| 71 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 72 | # Results |
| 73 | |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 74 | ## Registered Users |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 75 | ### for COSMAS II and KorAP |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 76 | |
| 77 | ```{r registrations, message=F, warning=F} |
| 78 | registrierungen <- |
| 79 | read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>% |
| 80 | add_column(group = "registered users") |
| 81 | |
| Marc Kupietz | beefb62 | 2026-08-08 17:17:07 +0200 | [diff] [blame] | 82 | hc <- registrierungen %>% |
| 83 | hchart("line", hcaes(x = date, y = registered, group = group)) %>% |
| 84 | hc_add_theme(hc_theme_ids_light()) %>% |
| 85 | hc_yAxis(title = list(text = "")) %>% |
| 86 | hc_xAxis(title = list(text = "")) %>% |
| 87 | hc_legend(element_blank()) %>% |
| 88 | hc_size(height = 500, width = 1260) |
| 89 | hc |
| Marc Kupietz | 2c09462 | 2023-10-08 14:19:47 +0200 | [diff] [blame] | 90 | ``` |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 91 | |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 92 | |
| 93 | ## Source Code |
| 94 | ### Collocation Analysis |
| 95 | |
| 96 | ```R |
| 97 | df <- collocationAnalysis( |
| 98 | icc_con("eng"), |
| 99 | "focus({[ud/l=take]} [ud/p=NOUN])", |
| 100 | leftContextSize = 0, |
| 101 | rightContextSize = 1, |
| 102 | minOccur = 2, |
| 103 | addExamples = T |
| 104 | ) |
| 105 | ``` |
| Marc Kupietz | 21f526c | 2026-08-14 12:32:56 +0200 | [diff] [blame] | 106 | See [@kupietz_rkorapclient_2020] |
| 107 | See [@kupietz-deliko2026] |
| 108 | |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 109 | ## Source Code |
| 110 | ### Print Collocation Analysis as DataTable |
| 111 | |
| 112 | ```R |
| 113 | df %>% |
| Marc Kupietz | d8ddefb | 2026-05-04 19:41:45 +0200 | [diff] [blame] | 114 | mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>% |
| Marc Kupietz | cf38344 | 2023-10-08 22:50:19 +0200 | [diff] [blame] | 115 | mutate(example=str_replace(example, |
| 116 | ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>% |
| 117 | mutate(example=str_replace(example, |
| 118 | "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>% |
| 119 | rowwise() %>% |
| 120 | select(Collocate, Example, logDice, pmi, ll) %>% |
| 121 | datatable(escape = F) %>% |
| 122 | formatRound(columns=~logDice + pmi + ll, digits=2) |
| 123 | ``` |
| Marc Kupietz | 3b21719 | 2023-10-08 20:56:36 +0200 | [diff] [blame] | 124 | # References |
| 125 | |
| Marc Kupietz | 5115251 | 2023-10-09 23:18:10 +0200 | [diff] [blame] | 126 | ## References |
| 127 | |