blob: 81adb21e3306c3acd3fe1d14f961ccd06e194123 [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 Kupietz7df5e692023-10-10 21:49:17 +02006date: "`r paste0('Mannheim, ', Sys.Date())`"
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
Marc Kupietza737b1b2023-10-07 09:32:20 +020013 - menu
14 reveal_options:
Marc Kupietza737b1b2023-10-07 09:32:20 +020015 chalkboard:
16 theme: chalkboard
17 toggleNotesButton: true
18 menu:
19 numbers: true
Marc Kupietz3b217192023-10-08 20:56:36 +020020lang: en
21bibliography: references.bib
22csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl"
Marc Kupietza737b1b2023-10-07 09:32:20 +020023---
24
25```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020026knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020027library(idsThemeR)
Marc Kupietz289f9972023-10-09 09:49:12 +020028library(RKorAPClient)
Marc Kupietz2c094622023-10-08 14:19:47 +020029library(highcharter)
30library(tidyverse)
Marc Kupietz8a152592023-10-09 12:32:16 +020031source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020032```
Marc Kupietz51152512023-10-09 23:18:10 +020033# Introduction
Marc Kupietza737b1b2023-10-07 09:32:20 +020034
35## R Markdown
36
Marc Kupietz3b217192023-10-08 20:56:36 +020037This 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 +020038
39When 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.
40
41## Slide with Bullets
42### Subheading
43
44- Bullet 1
45- Bullet 2
46- Bullet 3
47
48<aside class="notes">
49Here are some notes.
50</aside>
51
Marc Kupietz51152512023-10-09 23:18:10 +020052# Methods
53
Marc Kupietza737b1b2023-10-07 09:32:20 +020054## Slide with R Output
55
56```{r cars, echo = TRUE}
57summary(cars)
58```
59
60## Slide with Plot
61
62```{r pressure}
63plot(pressure)
64```
65
Marc Kupietz51152512023-10-09 23:18:10 +020066# Results
67
Marc Kupietz2c094622023-10-08 14:19:47 +020068## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020069### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020070
71```{r registrations, message=F, warning=F}
72registrierungen <-
73 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
74 add_column(group = "registered users")
75
76 hc <- registrierungen %>%
77 hchart("line", hcaes(x=date, y=registered, group=group)) %>%
78 hc_add_theme(hc_theme_ids_light()) %>%
79 hc_yAxis(title=list(text="")) %>%
80 hc_xAxis(title=list(text="")) %>%
81 hc_legend(element_blank()) %>%
Marc Kupietz62c72832024-05-14 22:08:15 +020082 hc_size(height=500, width=1260)
Marc Kupietz2c094622023-10-08 14:19:47 +020083 hc
84
85```
Marc Kupietzcf383442023-10-08 22:50:19 +020086
87## Light Verb Constructions
Marc Kupietz51152512023-10-09 23:18:10 +020088### with *take* in ICC-English
Marc Kupietzcf383442023-10-08 22:50:19 +020089
Marc Kupietz51152512023-10-09 23:18:10 +020090```{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 +020091take_ca_icc <-
92 collocationAnalysis(
93 icc_con("eng"),
94 "focus({[ud/l=take]} [ud/p=NOUN])",
95 leftContextSize = 0,
96 rightContextSize = 1,
97 minOccur = 2,
98 addExamples = T
Marc Kupietz8a152592023-10-09 12:32:16 +020099 ) %>% head(7)
Marc Kupietzcf383442023-10-08 22:50:19 +0200100
101take_ca_icc %>% show_table()
102```
103
104## Source Code
105### Collocation Analysis
106
107```R
108 df <- collocationAnalysis(
109 icc_con("eng"),
110 "focus({[ud/l=take]} [ud/p=NOUN])",
111 leftContextSize = 0,
112 rightContextSize = 1,
113 minOccur = 2,
114 addExamples = T
115 )
116```
117
118## Source Code
119### Print Collocation Analysis as DataTable
120
121```R
122df %>%
123 mutate(Collocate=sprintf('<a href="%s">%s</a>',
124 webUIRequestUrl, collocate)) %>%
125 mutate(example=str_replace(example,
126 ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>%
127 mutate(example=str_replace(example,
128 "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>%
129 rowwise() %>%
130 select(Collocate, Example, logDice, pmi, ll) %>%
131 datatable(escape = F) %>%
132 formatRound(columns=~logDice + pmi + ll, digits=2)
133```
Marc Kupietz3b217192023-10-08 20:56:36 +0200134# References
135
Marc Kupietz51152512023-10-09 23:18:10 +0200136## References
137