Versionen im Vergleich

Schlüssel

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

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
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)9045.
434
55044.
029
16236154103
11
13.
259
0368.5632
exakte Äquivalenz (ftae)5.491
450
462
417
4316.
012
0148.
697
6967.340172236
inexakte Äquivalenz (ftai)5
243
244
262
265
353
3540205
0
550329
ODER-Äquivalenz (ftao)437226500
0
608
UND-Äquivalenz (ftau)1.2932.
289
2904.
578
5771164071.605100
Oberbegriff-Relation (ftob)2.12700547.
748
7832.
918
919000
Unterbegriff-Relation (ftub)1830011365387000
Verwandter-Begriff-Relation (ftvb)76900113.
613
635923000
Null-Relation (ftnu)16818.
066
07619.
570
5570
761
703872
0
210
GESAMT10.13066.
519
659
68
69.
878
0146.
658
66121.
745
74314.
353
354
11
13.
277
6128.58975