Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

Datum des CBS-Abzugs: 20232024-0607-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
languagenone
collapsetrue
# 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)))
RelationAGROVOCLCSHRAMEAUMeSHSTWTheSozEMBNENSoggT-PRO
Äquivalenz (ftaa)90
45
46.
367
533
43
45.
985
18736
154
0103
11
13.
259
0408.
563
6172
exakte Äquivalenz (ftae)5.
491
490
404
713
373
666
5
6.
974
123
8
5.
696
7647.
340
339172236
inexakte Äquivalenz (ftai)5
216
487
236
405
349
3590205
0
550329
ODER-Äquivalenz (ftao)4
37
123
25
546500
0
608
UND-Äquivalenz (ftau)1.2932.
283
3044.
548
660116
407
4141.
605
608100
Oberbegriff-Relation (ftob)2.12700547.
742
8842.
918
946000
Unterbegriff-Relation (ftub)18300
11
12
365
376387000
Verwandter-Begriff-Relation (ftvb)76900113.
604
736
923
927000
Null-Relation (ftnu)16818.
009
35819.
508
8860
777
512
872
885
0
210
GESAMT10.
130
129
66
68.
316
518
68
70.
675
8586.
616
776
21
18.
745
68614.
353
400
11
13.
277
6168.
589
64375