blob: b0f916474cadf9f7a9720e38fb579488fe66c75a [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:
Marc Kupietza737b1b2023-10-07 09:32:20 +02009 reveal_plugins:
10 - search
11 - zoom
12 - notes
13 - chalkboard
14 - menu
15 reveal_options:
Marc Kupietza737b1b2023-10-07 09:32:20 +020016 chalkboard:
17 theme: chalkboard
18 toggleNotesButton: true
19 menu:
20 numbers: true
Marc Kupietz3b217192023-10-08 20:56:36 +020021lang: en
22bibliography: references.bib
23csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl"
Marc Kupietza737b1b2023-10-07 09:32:20 +020024---
25
26```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020027knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020028library(idsThemeR)
Marc Kupietz289f9972023-10-09 09:49:12 +020029library(RKorAPClient)
Marc Kupietz2c094622023-10-08 14:19:47 +020030library(highcharter)
31library(tidyverse)
Marc Kupietz8a152592023-10-09 12:32:16 +020032source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020033```
Marc Kupietz51152512023-10-09 23:18:10 +020034# Introduction
Marc Kupietza737b1b2023-10-07 09:32:20 +020035
36## R Markdown
37
Marc Kupietz3b217192023-10-08 20:56:36 +020038This 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 +020039
40When 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.
41
42## Slide with Bullets
43### Subheading
44
45- Bullet 1
46- Bullet 2
47- Bullet 3
48
49<aside class="notes">
50Here are some notes.
51</aside>
52
Marc Kupietz51152512023-10-09 23:18:10 +020053# Methods
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 Kupietz51152512023-10-09 23:18:10 +020067# Results
68
Marc Kupietz2c094622023-10-08 14:19:47 +020069## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020070### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020071
72```{r registrations, message=F, warning=F}
73registrierungen <-
74 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
75 add_column(group = "registered users")
76
77 hc <- registrierungen %>%
78 hchart("line", hcaes(x=date, y=registered, group=group)) %>%
79 hc_add_theme(hc_theme_ids_light()) %>%
80 hc_yAxis(title=list(text="")) %>%
81 hc_xAxis(title=list(text="")) %>%
82 hc_legend(element_blank()) %>%
83 hc_size(height=500, width=900)
84 hc
85
86```
Marc Kupietzcf383442023-10-08 22:50:19 +020087
88## Light Verb Constructions
Marc Kupietz51152512023-10-09 23:18:10 +020089### with *take* in ICC-English
Marc Kupietzcf383442023-10-08 22:50:19 +020090
Marc Kupietz51152512023-10-09 23:18:10 +020091```{r take-icc, fig.cap="Collocation analysis results for *take* + NOUN in [ICC-ENG](https://korap.ids-mannheim.de/instance/icc), using the RKorAPClient [@kupietz_rkorapclient_2020] package."}
Marc Kupietzcf383442023-10-08 22:50:19 +020092take_ca_icc <-
93 collocationAnalysis(
94 icc_con("eng"),
95 "focus({[ud/l=take]} [ud/p=NOUN])",
96 leftContextSize = 0,
97 rightContextSize = 1,
98 minOccur = 2,
99 addExamples = T
Marc Kupietz8a152592023-10-09 12:32:16 +0200100 ) %>% head(7)
Marc Kupietzcf383442023-10-08 22:50:19 +0200101
102take_ca_icc %>% show_table()
103```
104
105## Source Code
106### Collocation Analysis
107
108```R
109 df <- collocationAnalysis(
110 icc_con("eng"),
111 "focus({[ud/l=take]} [ud/p=NOUN])",
112 leftContextSize = 0,
113 rightContextSize = 1,
114 minOccur = 2,
115 addExamples = T
116 )
117```
118
119## Source Code
120### Print Collocation Analysis as DataTable
121
122```R
123df %>%
124 mutate(Collocate=sprintf('<a href="%s">%s</a>',
125 webUIRequestUrl, collocate)) %>%
126 mutate(example=str_replace(example,
127 ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>%
128 mutate(example=str_replace(example,
129 "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>%
130 rowwise() %>%
131 select(Collocate, Example, logDice, pmi, ll) %>%
132 datatable(escape = F) %>%
133 formatRound(columns=~logDice + pmi + ll, digits=2)
134```
Marc Kupietz3b217192023-10-08 20:56:36 +0200135# References
136
Marc Kupietz51152512023-10-09 23:18:10 +0200137## References
138