blob: 3339b4410653d04b8c3a476fb66d8bc93bc9035a [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
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
Marc Kupietz281ba9c2026-08-11 15:37:48 +020047 - Second-level bullet
48 - Second-level bullet
49 - Third-level bullet
50 - Third-level bullet
Marc Kupietza737b1b2023-10-07 09:32:20 +020051- Bullet 3
52
53<aside class="notes">
54Here are some notes.
55</aside>
56
Marc Kupietz51152512023-10-09 23:18:10 +020057# Methods
58
Marc Kupietza737b1b2023-10-07 09:32:20 +020059## Slide with R Output
60
61```{r cars, echo = TRUE}
62summary(cars)
63```
64
65## Slide with Plot
66
Marc Kupietzbeefb622026-08-08 17:17:07 +020067```{r pressure, fig.height=5, fig.width=12, message=F, warning=F}
Marc Kupietza737b1b2023-10-07 09:32:20 +020068plot(pressure)
69```
70
Marc Kupietz51152512023-10-09 23:18:10 +020071# Results
72
Marc Kupietz2c094622023-10-08 14:19:47 +020073## Registered Users
Marc Kupietz51152512023-10-09 23:18:10 +020074### for COSMAS II and KorAP
Marc Kupietz2c094622023-10-08 14:19:47 +020075
76```{r registrations, message=F, warning=F}
77registrierungen <-
78 read_tsv("http://www.ids-mannheim.de/cosmas2/projekt/intstats/registrierungen.csv") %>%
79 add_column(group = "registered users")
80
Marc Kupietzbeefb622026-08-08 17:17:07 +020081hc <- registrierungen %>%
82 hchart("line", hcaes(x = date, y = registered, group = group)) %>%
83 hc_add_theme(hc_theme_ids_light()) %>%
84 hc_yAxis(title = list(text = "")) %>%
85 hc_xAxis(title = list(text = "")) %>%
86 hc_legend(element_blank()) %>%
87 hc_size(height = 500, width = 1260)
88hc
Marc Kupietz2c094622023-10-08 14:19:47 +020089```
Marc Kupietzcf383442023-10-08 22:50:19 +020090
Marc Kupietzcf383442023-10-08 22:50:19 +020091
92## Source Code
93### Collocation Analysis
94
95```R
96 df <- collocationAnalysis(
97 icc_con("eng"),
98 "focus({[ud/l=take]} [ud/p=NOUN])",
99 leftContextSize = 0,
100 rightContextSize = 1,
101 minOccur = 2,
102 addExamples = T
103 )
104```
Marc Kupietz21f526c2026-08-14 12:32:56 +0200105See [@kupietz_rkorapclient_2020]
106See [@kupietz-deliko2026]
107
Marc Kupietzcf383442023-10-08 22:50:19 +0200108## Source Code
109### Print Collocation Analysis as DataTable
110
111```R
112df %>%
Marc Kupietzd8ddefb2026-05-04 19:41:45 +0200113 mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>%
Marc Kupietzcf383442023-10-08 22:50:19 +0200114 mutate(example=str_replace(example,
115 ".*(\\W+\\w+\\W+\\w+\\W+<mark.*/mark>.*)", "\\1")) %>%
116 mutate(example=str_replace(example,
117 "(.*<mark.*/mark>\\W+\\w+\\W+\\w+).*", "\\1")) %>%
118 rowwise() %>%
119 select(Collocate, Example, logDice, pmi, ll) %>%
120 datatable(escape = F) %>%
121 formatRound(columns=~logDice + pmi + ll, digits=2)
122```
Marc Kupietz3b217192023-10-08 20:56:36 +0200123# References
124
Marc Kupietz51152512023-10-09 23:18:10 +0200125## References
126