Versionen im Vergleich

Schlüssel

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

Datum des CBS-Abzugs: 20232024-0407-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.
341
533
44
45.
037
18736
154
0103
11
13.
259
0408.
563
6172
exakte Äquivalenz (ftae)5.
491
490
383
713
352
666
5
6.
972
123
8
5.
650
7647.
340
339172236
inexakte Äquivalenz (ftai)5
197
487
216
405
349
3590205
0
550329
ODER-Äquivalenz (ftao)4
35
123
23
546500
0
608
UND-Äquivalenz (ftau)1.2932.
283
3044.
479
660116
406
4141.
605
608100
Oberbegriff-Relation (ftob)2.12700547.
750
8842.
918
946000
Unterbegriff-Relation (ftub)18300
11
12
360
376387000
Verwandter-Begriff-Relation (ftvb)76900113.
598
736
923
927000
Null-Relation (ftnu)168
17
18.
984
35819.
474
8860
778
512
872
885
0
210
GESAMT10.
130
129
66
68.
223
518
68
70.
581
8586.
614
776
21
18.
696
68614.
353
400
11
13.
277
6168.
589
64375