blob: 4f6ea732dbd27569c4cf5eafb4c5775fb1d3ea4e [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 Kupietza737b1b2023-10-07 09:32:20 +02009output:
Marc Kupietze195cea2026-08-17 13:17:33 +020010 revealjs.ids::revealjs_presentation:
Marc Kupietza737b1b2023-10-07 09:32:20 +020011 reveal_plugins:
12 - search
13 - zoom
14 - notes
Marc Kupietza737b1b2023-10-07 09:32:20 +020015 - menu
16 reveal_options:
Marc Kupietza737b1b2023-10-07 09:32:20 +020017 chalkboard:
18 theme: chalkboard
19 toggleNotesButton: true
20 menu:
21 numbers: true
Marc Kupietz3b217192023-10-08 20:56:36 +020022lang: en
23bibliography: references.bib
24csl: "https://raw.githubusercontent.com/ICLC-10/Zotero/master/styles/ICLC-10.csl"
Marc Kupietza737b1b2023-10-07 09:32:20 +020025---
26
27```{r setup, include=FALSE}
Marc Kupietz3b217192023-10-08 20:56:36 +020028knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
Marc Kupietz2c094622023-10-08 14:19:47 +020029library(idsThemeR)
Marc Kupietz289f9972023-10-09 09:49:12 +020030library(RKorAPClient)
Marc Kupietz2c094622023-10-08 14:19:47 +020031library(highcharter)
32library(tidyverse)
Marc Kupietz8a152592023-10-09 12:32:16 +020033source("https://gitlab.ids-mannheim.de/ICC/2023-07-20-ICC-ICLC10/-/raw/master/R/common.R")
Marc Kupietza737b1b2023-10-07 09:32:20 +020034```
Marc Kupietz51152512023-10-09 23:18:10 +020035# Introduction
Marc Kupietza737b1b2023-10-07 09:32:20 +020036
37## R Markdown
38
Marc Kupietz3b217192023-10-08 20:56:36 +020039This 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 +020040
41When 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 Kupietz281ba9c2026-08-11 15:37:48 +020048 - Second-level bullet
49 - Second-level bullet
50 - Third-level bullet
51 - Third-level bullet
Marc Kupietza737b1b2023-10-07 09:32:20 +020052- Bullet 3
53
54<aside class="notes">
55Here are some notes.
56</aside>
57
Marc Kupietz51152512023-10-09 23:18:10 +020058# Methods
59
Marc Kupietza737b1b2023-10-07 09:32:20 +020060## Slide with R Output
61
62```{r cars, echo = TRUE}
63summary(cars)
64```
65
66## Slide with Plot
67
Marc Kupietzbeefb622026-08-08 17:17:07 +020068```{r pressure, fig.height=5, fig.width=12, message=F, warning=F}
Marc Kupietza737b1b2023-10-07 09:32:20 +020069plot(pressure)
70```
71
Marc Kupietz51152512023-10-09 23:18:10 +020072# Results
73
Marc Kupietz2c094622023-10-08 14:19:47 +020074## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020075### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020076
77```{r registrations, message=F, warning=F}
78registrierungen <-
79 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
80 add_column(group = "registered users")
81
Marc Kupietzbeefb622026-08-08 17:17:07 +020082hc <- 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)
89hc
Marc Kupietz2c094622023-10-08 14:19:47 +020090```
Marc Kupietzcf383442023-10-08 22:50:19 +020091
Marc Kupietzcf383442023-10-08 22:50:19 +020092
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 Kupietz21f526c2026-08-14 12:32:56 +0200106See [@kupietz_rkorapclient_2020]
107See [@kupietz-deliko2026]
108
Marc Kupietzcf383442023-10-08 22:50:19 +0200109## Source Code
110### Print Collocation Analysis as DataTable
111
112```R
113df %>%
Marc Kupietzd8ddefb2026-05-04 19:41:45 +0200114 mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>%
Marc Kupietzcf383442023-10-08 22:50:19 +0200115 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 Kupietz3b217192023-10-08 20:56:36 +0200124# References
125
Marc Kupietz51152512023-10-09 23:18:10 +0200126## References
127