blob: 9dbbaf775aec69f6f131a270e28364e53f8769e9 [file] [log] [blame]
Marc Kupietza737b1b2023-10-07 09:32:20 +02001---
Marc Kupietzdf0eda92023-10-07 20:50:00 +02002title: "IDS theme for revealjs"
3subtitle: "a demo"
Marc Kupietza737b1b2023-10-07 09:32:20 +02004author: Marc Kupietz
5institute: "IDS Mannheim"
Marc Kupietz2c094622023-10-08 14:19:47 +02006date: "Mannheim, 2023-10-08"
Marc Kupietza737b1b2023-10-07 09:32:20 +02007output:
8 revealjs::revealjs_presentation:
9 theme: ids
10 highlight: pygments
11 self_contained: false
12 reveal_plugins:
13 - search
14 - zoom
15 - notes
16 - chalkboard
17 - menu
18 reveal_options:
Marc Kupietz7c8f7de2023-10-07 11:42:29 +020019 slideNumber: true
Marc Kupietza737b1b2023-10-07 09:32:20 +020020 chalkboard:
21 theme: chalkboard
22 toggleNotesButton: true
23 menu:
24 numbers: true
Marc Kupietz3b217192023-10-08 20:56:36 +020025lang: en
26bibliography: references.bib
27csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl"
Marc Kupietza737b1b2023-10-07 09:32:20 +020028---
29
30```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020031knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020032library(idsThemeR)
33library(highcharter)
34library(tidyverse)
Marc Kupietzcf383442023-10-08 22:50:19 +020035source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020036```
37
38## R Markdown
39
Marc Kupietz3b217192023-10-08 20:56:36 +020040This 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 Kupietza737b1b2023-10-07 09:32:20 +020041
42When 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.
43
44## Slide with Bullets
45### Subheading
46
47- Bullet 1
48- Bullet 2
49- Bullet 3
50
51<aside class="notes">
52Here are some notes.
53</aside>
54
Marc Kupietza737b1b2023-10-07 09:32:20 +020055## Slide with R Output
56
57```{r cars, echo = TRUE}
58summary(cars)
59```
60
61## Slide with Plot
62
63```{r pressure}
64plot(pressure)
65```
66
Marc Kupietz2c094622023-10-08 14:19:47 +020067## Registered Users
68### (for COSMAS II and KorAP)
69
70```{r registrations, message=F, warning=F}
71registrierungen <-
72 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
73 add_column(group = "registered users")
74
75 hc <- registrierungen %>%
76 hchart("line", hcaes(x=date, y=registered, group=group)) %>%
77 hc_add_theme(hc_theme_ids_light()) %>%
78 hc_yAxis(title=list(text="")) %>%
79 hc_xAxis(title=list(text="")) %>%
80 hc_legend(element_blank()) %>%
81 hc_size(height=500, width=900)
82 hc
83
84```
Marc Kupietzcf383442023-10-08 22:50:19 +020085
86## Light Verb Constructions
87### with *take* (from ICC-ENG)
88
89```{r take-icc, fig.cap="Results of a co-occurrence analysis of *take* + NOUN in [ICC-ENG](https://korap.ids-mannheim.de/instance/icc), using the RKorAPClient [@kupietz_rkorapclient_2020] package."}
90take_ca_icc <-
91 collocationAnalysis(
92 icc_con("eng"),
93 "focus({[ud/l=take]} [ud/p=NOUN])",
94 leftContextSize = 0,
95 rightContextSize = 1,
96 minOccur = 2,
97 addExamples = T
98 ) %>% head(8)
99
100take_ca_icc %>% show_table()
101```
102
103## Source Code
104### Collocation Analysis
105
106```R
107 df <- collocationAnalysis(
108 icc_con("eng"),
109 "focus({[ud/l=take]} [ud/p=NOUN])",
110 leftContextSize = 0,
111 rightContextSize = 1,
112 minOccur = 2,
113 addExamples = T
114 )
115```
116
117## Source Code
118### Print Collocation Analysis as DataTable
119
120```R
121df %>%
122 mutate(Collocate=sprintf('<a href="%s">%s</a>',
123 webUIRequestUrl, collocate)) %>%
124 mutate(example=str_replace(example,
125 ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>%
126 mutate(example=str_replace(example,
127 "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>%
128 rowwise() %>%
129 select(Collocate, Example, logDice, pmi, ll) %>%
130 datatable(escape = F) %>%
131 formatRound(columns=~logDice + pmi + ll, digits=2)
132```
133
Marc Kupietz3b217192023-10-08 20:56:36 +0200134# References
135