Datum des CBS-Abzugs: 20232024-0508-01
Dieser Bericht wurde automatisiert mit R Markdown erstellt. Der pica-rs-Code für die Abfrage aller Tc-Sätze und der R-Code für die Berechnung der Ausgabetabelle können durch Aufklappen der Codeblöcke eingesehen werden.
...
Codeblock |
---|
|
# Crosskonkordanzen einlesen
ck <- read_csv('Tc.csv', col_types = 'cccc')
# Wertebereiche gemäß Wiki-Seiten definieren
thesauri <- read_csv('Thesauri.csv', col_types = 'cc')
relationen <- read_csv('Relationen.csv', col_types = 'cc')
# Crosskonkordanzen filtern und zählen
rslt1 <- ck %>%
filter(Thesaurus %in% thesauri$Code & Relation %in% relationen$Code) %>%
mutate(
Thesaurus = factor(Thesaurus,
levels = thesauri$Code, labels = thesauri$Thesaurus),
Relation = factor(Relation,
levels = relationen$Code, labels = relationen$Relation)
) %>% # auch alle leeren Levels jeweils mit Anzahl 0 anzeigen
group_by(Thesaurus, Relation, .drop = FALSE) %>%
# jede Kombination (Thesaurus, Relation) je IDN nur einmal zählen
summarise(n = n_distinct(IDN)) %>%
pivot_wider(id_cols = Relation, names_from = Thesaurus, values_from = n)
# Summe
rslt2 <- data.frame(Relation = factor('GESAMT'),
rslt1 %>% select(-Relation) %>% summarise_all(.funs = sum))
colnames(rslt2) <- colnames(rslt1)
# Formatierte Ausgabetabelle
rbind(rslt1, rslt2) %>%
mutate_at(.vars = setdiff(colnames(.), 'Relation'), .funs = ~ formatC(
., format = 'd', big.mark = '.', decimal.mark = ',')) %>%
knitr::kable(align = c('l', rep('r', ncol(.)-1)))
|
45352440383615411259563617 | 2 |
exakte Äquivalenz (ftae) | 5. |
49139135659748650760 | 7.340 | 17 | 22 | 36 |
inexakte Äquivalenz (ftai) | 5 |
2002203490550 | 3 | 29 |
ODER-Äquivalenz (ftao) | 4 |
352306 | 0 | 8 |
UND-Äquivalenz (ftau) | 1.293 | 2. |
283488407605612 | 1 | 0 | 0 |
Oberbegriff-Relation (ftob) | 2.127 | 0 | 0 |
54751918970 | 0 | 0 | 0 |
Unterbegriff-Relation (ftub) | 183 | 0 | 0 |
11360375 | 387 | 0 | 0 | 0 |
Verwandter-Begriff-Relation (ftvb) | 769 | 0 | 0 | 11 | 3. |
598923933 | 0 | 0 | 0 |
Null-Relation (ftnu) | 168 |
17989483778872013066250686086162169835311277589