blob: d303aff530a1a76bb157534191b24b05380d443f [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 Kupietzea8ff772024-05-14 22:08:46 +02004author:
5 - name: Marc Kupietz
6 - name: John Doe
Marc Kupietza737b1b2023-10-07 09:32:20 +02007institute: "IDS Mannheim"
Marc Kupietz7df5e692023-10-10 21:49:17 +02008date: "`r paste0('Mannheim, ', Sys.Date())`"
Marc Kupietzb2cc5232026-08-29 16:21:52 +03009website: "https://gitlab.ids-mannheim.de/ids/revealjs"
Marc Kupietz59e95a62026-08-29 10:19:05 +030010partner_logo: "logos/clarin-logo.svg"
11funder_logo: "logos/text-plus-logo.svg"
Marc Kupietza737b1b2023-10-07 09:32:20 +020012output:
Marc Kupietze195cea2026-08-17 13:17:33 +020013 revealjs.ids::revealjs_presentation:
Marc Kupietza737b1b2023-10-07 09:32:20 +020014 reveal_plugins:
15 - search
16 - zoom
17 - notes
Marc Kupietza737b1b2023-10-07 09:32:20 +020018 - menu
19 reveal_options:
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
Marc Kupietza737b1b2023-10-07 09:32:20 +020027---
28
29```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020030knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020031library(idsThemeR)
Marc Kupietz289f9972023-10-09 09:49:12 +020032library(RKorAPClient)
Marc Kupietz2c094622023-10-08 14:19:47 +020033library(highcharter)
34library(tidyverse)
Marc Kupietz9535aed2026-08-28 14:03:21 +030035library(DT)
36#source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020037```
Marc Kupietzb2cc5232026-08-29 16:21:52 +030038## Overview
39
Marc Kupietz51152512023-10-09 23:18:10 +020040# Introduction
Marc Kupietza737b1b2023-10-07 09:32:20 +020041
42## R Markdown
43
Marc Kupietz3b217192023-10-08 20:56:36 +020044This 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 +020045
46When 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.
47
48## Slide with Bullets
49### Subheading
50
51- Bullet 1
52- Bullet 2
Marc Kupietz281ba9c2026-08-11 15:37:48 +020053 - Second-level bullet
54 - Second-level bullet
55 - Third-level bullet
56 - Third-level bullet
Marc Kupietza737b1b2023-10-07 09:32:20 +020057- Bullet 3
58
59<aside class="notes">
60Here are some notes.
61</aside>
62
Marc Kupietz51152512023-10-09 23:18:10 +020063# Methods
64
Marc Kupietza737b1b2023-10-07 09:32:20 +020065## Slide with R Output
66
67```{r cars, echo = TRUE}
68summary(cars)
69```
70
71## Slide with Plot
72
Marc Kupietzbeefb622026-08-08 17:17:07 +020073```{r pressure, fig.height=5, fig.width=12, message=F, warning=F}
Marc Kupietza737b1b2023-10-07 09:32:20 +020074plot(pressure)
75```
76
Marc Kupietz51152512023-10-09 23:18:10 +020077# Results
78
Marc Kupietz2c094622023-10-08 14:19:47 +020079## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020080### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020081
82```{r registrations, message=F, warning=F}
83registrierungen <-
84 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
85 add_column(group = "registered users")
86
Marc Kupietzbeefb622026-08-08 17:17:07 +020087hc <- registrierungen %>%
88 hchart("line", hcaes(x = date, y = registered, group = group)) %>%
89 hc_add_theme(hc_theme_ids_light()) %>%
90 hc_yAxis(title = list(text = "")) %>%
91 hc_xAxis(title = list(text = "")) %>%
92 hc_legend(element_blank()) %>%
Marc Kupietz65e231f2026-08-28 09:19:18 +030093 hc_size(height = 500, width = 1160)
Marc Kupietzbeefb622026-08-08 17:17:07 +020094hc
Marc Kupietz2c094622023-10-08 14:19:47 +020095```
Marc Kupietzcf383442023-10-08 22:50:19 +020096
Marc Kupietzcf383442023-10-08 22:50:19 +020097
Marc Kupietz9535aed2026-08-28 14:03:21 +030098## Adjective Collocates
99### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026]
Marc Kupietzcf383442023-10-08 22:50:19 +0200100
Marc Kupietz9535aed2026-08-28 14:03:21 +0300101```{r ca, message=F, warning=F, escape=F}
102library(RKorAPClient)
103KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
104 collocationAnalysis(
105 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
106 leftContextSize = 1,
107 rightContextSize = 0,
108 cacheAs = "sockenpuppe_aca.rds"
109) |>
110mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl),
111 across(where(is.numeric), ~ round(.x, 2))) |>
112select(collocate, logDice, pmi, ll) |>
113head(8)
Marc Kupietzcf383442023-10-08 22:50:19 +0200114```
Marc Kupietz21f526c2026-08-14 12:32:56 +0200115
Marc Kupietz9535aed2026-08-28 14:03:21 +0300116
117## Complete Source Code
118### of the previous slide's collocation analysis
Marc Kupietzcf383442023-10-08 22:50:19 +0200119
120```R
Marc Kupietz9535aed2026-08-28 14:03:21 +0300121library(RKorAPClient)
122KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
123 collocationAnalysis(
124 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
125 leftContextSize = 1,
126 rightContextSize = 0,
127 cacheAs = "sockenpuppe_aca.rds"
128) |>
129mutate(collocate = sprintf("[%s](%s)", collocate, webUIRequestUrl),
130 across(where(is.numeric), ~ round(.x, 2))) |>
131select(collocate, logDice, pmi, ll) |>
132head(8)
133```
134<small>Using RKorAPClient [@kupietz_rkorapclient_2020;@kupietz_building_2022]</small>
135
Marc Kupietz6640f122026-08-28 14:46:09 +0300136## Adjective Collocates (DataTable)
137### of *Sockenpuppe* in the German Wikipedia Talk Corpus [@kupietz_wikipedia_talk_2026]
Marc Kupietz9535aed2026-08-28 14:03:21 +0300138
139```{r cadt, message=F, warning=F, escape=F}
140library(RKorAPClient)
141KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
142 collocationAnalysis(
143 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
144 leftContextSize = 1,
145 rightContextSize = 0,
146 cacheAs = "sockenpuppe_aca.rds"
147) |>
148head(8) |>
149mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |>
150select(Collocate, logDice, pmi, ll) |>
151datatable(escape=F) |>
152formatRound(columns=~logDice + pmi + ll, digits=2)
153```
154
155## Source Code
156### Display Collocation Analysis Result as DataTable
157
158```R
159library(RKorAPClient)
160KorAPConnection("https://korap.ids-mannheim.de/instance/wiki", verbose=F) |>
161 collocationAnalysis(
162 "focus([spacy/u=ADJ] {[spacy/l=Sockenpuppe]})",
163 leftContextSize = 1,
164 rightContextSize = 0,
165 cacheAs = "sockenpuppe_aca.rds"
166) |>
167head(8) |>
168mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) |>
169select(Collocate, logDice, pmi, ll) |>
170datatable(escape=F) |>
171formatRound(columns=~logDice + pmi + ll, digits=2)
Marc Kupietzcf383442023-10-08 22:50:19 +0200172```
Marc Kupietz3b217192023-10-08 20:56:36 +0200173# References
174
Marc Kupietz51152512023-10-09 23:18:10 +0200175## References
176