Datum des CBS-Abzugs: 2023-0809-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)))
|
43402911259036 | 8.563 | 2 |
exakte Äquivalenz (ftae) | 5.491 |
450417012697696 | 7.340 | 17 | 22 | 36 |
inexakte Äquivalenz (ftai) | 5 |
2432623530550 | 3 | 29 |
ODER-Äquivalenz (ftao) | 4 | 37 | 22 | 65 | 0 | 0 |
06 | 0 | 8 |
UND-Äquivalenz (ftau) | 1.293 | 2. |
289578577 | 116 | 407 | 1.605 | 1 | 0 | 0 |
Oberbegriff-Relation (ftob) | 2.127 | 0 | 0 | 54 | 7. |
748918919 | 0 | 0 | 0 |
Unterbegriff-Relation (ftub) | 183 | 0 | 0 | 11 | 365 | 387 | 0 | 0 | 0 |
Verwandter-Begriff-Relation (ftvb) | 769 | 0 | 0 | 11 | 3. |
613635 | 923 | 0 | 0 | 0 |
Null-Relation (ftnu) | 168 | 18. |
06657076105196887865874535311277