## global variables
= TRUE
consider_Protocol = FALSE save_CAMs_as_pictures
Translate Data, save CAMs
Notes
Remark:
prepare raw data
load packages, raw data, functions
# sets the directory of location of this script as the current directory
# setwd(dirname(rstudioapi::getSourceEditorContext()$path))
########################################
# load packages
########################################
require(pacman)
p_load('tidyverse', 'jsonlite', 'magrittr', 'xlsx',
'stargazer', 'psych', 'jtools', 'DT', 'ggstatsplot',
'lavaan',
'regsem', 'MplusAutomation', 'igraph',
'vroom')
########################################
# load data files
########################################
setwd("data")
# dir()
### load CAM files
# German
suppressMessages(read_file("CAM Data - German.txt") %>%
# ... split it into lines ...
str_split('\n') %>% first() %>%
discard(function(x) x == '') %>%
discard(function(x) x == '\r') %>%
# ... filter empty rows ...
discard(function(x) x == '')) -> dat_CAM_German
<- list()
raw_CAM_German for(i in 1:length(dat_CAM_German)){
<- jsonlite::fromJSON(txt = dat_CAM_German[[i]])
raw_CAM_German[[i]]
}rm(dat_CAM_German)
# English
suppressMessages(read_file("CAM Data - English.txt") %>%
# ... split it into lines ...
str_split('\n') %>% first() %>%
discard(function(x) x == '') %>%
discard(function(x) x == '\r') %>%
# ... filter empty rows ...
discard(function(x) x == '')) -> dat_CAM_English
<- list()
raw_CAM_English for(i in 1:length(dat_CAM_English)){
<- jsonlite::fromJSON(txt = dat_CAM_English[[i]])
raw_CAM_English[[i]]
}rm(dat_CAM_English)
## load file for manually overwriting words
<- xlsx::read.xlsx2(file = "wordlistOverall_05.04..xlsx", sheetIndex = 1)
translatedWords
########################################
# load functions
########################################
# print(getwd())
setwd("../functions")
for(i in 1:length(dir())){
# print(dir()[i])
source(dir()[i], encoding = "utf-8")
}
setwd("../functions_CAMapp")
for(i in 1:length(dir())){
# print(dir()[i])
source(dir()[i], encoding = "utf-8")
}rm(i)
set up CAM data
CAMs have no ID
# German
for(i in 1:length(raw_CAM_German)){
print(raw_CAM_German[[i]]$creator)
}
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
# English
for(i in 1:length(raw_CAM_English)){
print(raw_CAM_English[[i]]$creator)
}
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
[1] "noID"
set up CAM data German
Create CAM files, draw CAMs and compute network indicators
### create CAM single files (nodes, connectors, merged)
<- create_CAMfiles(datCAM = raw_CAM_German, reDeleted = TRUE) CAMfiles_German
Nodes and connectors, which were deleted by participants were removed.
# deleted nodes: 84
# deleted connectors: 42
if(consider_Protocol){
setwd("data")
<- readLines("protocol_P01.1G Pre-Processing 20240405_0958 - German.txt", warn = FALSE)
text <- readLines(textConnection(text, encoding="UTF-8"), encoding="UTF-8")
text
if (testIfJson(file = text)) {
<- rjson::fromJSON(file = "protocol_P01.1G Pre-Processing 20240405_0958 - German.txt")
protocol
## no CAM deleted
1]] <- CAMfiles_German[[1]][CAMfiles_German[[1]]$CAM %in% protocol$currentCAMs,]
CAMfiles_German[[2]] <- CAMfiles_German[[2]][CAMfiles_German[[2]]$CAM %in% protocol$currentCAMs,]
CAMfiles_German[[3]] <- CAMfiles_German[[3]][CAMfiles_German[[3]]$CAM.x %in% protocol$currentCAMs,]
CAMfiles_German[[
<- overwriteTextNodes(protocolDat = protocol,
tmp_out nodesDat = CAMfiles_German[[1]])
1]] <- tmp_out[[1]]
CAMfiles_German[[# tmp_out[[2]]
else{
} print("Invalid protocol uploaded")
} }
time 2024-04-05 09:50:58.552522 at index 1 for approximate matching
time 2024-04-05 09:51:02.169794 at index 2 for approximate matching
time 2024-04-05 09:51:10.284589 at index 3 for approximate matching
time 2024-04-05 09:51:19.970006 at index 4 for approximate matching
time 2024-04-05 09:51:22.299849 at index 5 for approximate matching
time 2024-04-05 09:51:41.43053 at index 6 for approximate matching
time 2024-04-05 09:52:18.784777 at index 7 for approximate matching
time 2024-04-05 09:56:07.494694 at index 8 for search terms
# remove empty concepts:
1]]$text[nchar(CAMfiles_German[[1]]$text) < 2] CAMfiles_German[[
[1] ""
<- CAMfiles_German[[1]]$id[nchar(CAMfiles_German[[1]]$text) < 2]
tmp_ids table(CAMfiles_German[[1]]$isActive[CAMfiles_German[[1]]$id %in% tmp_ids])
TRUE
1
1]] <- CAMfiles_German[[1]][!CAMfiles_German[[1]]$id %in% tmp_ids,]
CAMfiles_German[[
### draw CAMs
<- draw_CAM(dat_merged = CAMfiles_German[[3]],
CAMdrawn_German dat_nodes = CAMfiles_German[[1]],ids_CAMs = "all",
plot_CAM = FALSE,
useCoordinates = TRUE,
relvertexsize = 3,
reledgesize = 1)
processing 19 CAMs...
[1] "== ids_CAMs in drawnCAM"
## check for non reasonable words
for(i in 1:length(CAMdrawn_German)){
if(any(nchar(V(CAMdrawn_German[[i]])$label) < 3)){
print(V(CAMdrawn_German[[i]])$label)
}
}
### network indicators
<- NULL # no pre-defined concepts
tmp_microIndicator <- compute_indicatorsCAM(drawn_CAM = CAMdrawn_German,
networkIndicators_German micro_degree = tmp_microIndicator,
micro_valence = tmp_microIndicator,
micro_centr_clo = tmp_microIndicator,
micro_transitivity = tmp_microIndicator,
largestClique = FALSE)
## check for CAMs who have not changed valence
<- networkIndicators_German$CAM_ID[is.na(networkIndicators_German$assortativity_valence_macro)]
tmp_ids for(i in tmp_ids){
plot(CAMdrawn_German[[i]], edge.arrow.size = .7,
layout=layout_nicely, vertex.frame.color="black", asp = .5, margin = -0.1,
vertex.size = 10, vertex.label.cex = .9)
}
### wordlist
<- create_wordlist(
CAMwordlist_German dat_nodes = CAMfiles_German[[1]],
dat_merged = CAMfiles_German[[3]],
useSummarized = TRUE,
order = "frequency",
splitByValence = FALSE,
comments = TRUE,
raterSubsetWords = NULL,
rater = FALSE
)
[1] "create_wordlist - use summarized words"
[1] 26
[1] 339
[1] "temporarily suffixes are added, because not all words have been summarized"
processing 19 CAMs...
[1] "== ids_CAMs in drawnCAM"
::datatable(CAMwordlist_German, options = list(pageLength = 5)) DT
save CAMs as .json files, and as .png (igraph)
if(save_CAMs_as_pictures){
setwd("outputs")
setwd("savedCAMs_German")
setwd("png")
### remove all files if there are any
if(length(list.files()) >= 1){
file.remove(list.files())
cat('\n!
all former .png files have been deleted')
}
### if no participant ID was provided replace by randomly generated CAM ID
if(all(CAMfiles_German[[3]]$participantCAM.x == "noID")){
3]]$participantCAM.x <- CAMfiles_German[[3]]$CAM.x
CAMfiles_German[[
}
### save as .json files, and as .png (igraph)
<- unique(CAMfiles_German[[3]]$participantCAM.x); length(ids_CAMs)
ids_CAMs
for(i in 1:length(ids_CAMs)){
save_graphic(filename = paste0("CAM", "_t1_", ids_CAMs[i])) # paste0(ids_CAMs[i]))
<- CAMdrawn_German[[c(1:length(CAMdrawn_German))[
CAM_igraph names(CAMdrawn_German) == paste0(unique(CAMfiles_German[[3]]$participantCAM.x)[i])]]]
plot(CAM_igraph, edge.arrow.size = .7,
layout=layout_nicely, vertex.frame.color="black", asp = .5, margin = -0.1,
vertex.size = 10, vertex.label.cex = .9)
dev.off()
}
setwd("../json")
### remove all files if there are any
if(length(list.files()) >= 1){
file.remove(list.files())
cat('\n!
all former .json files have been deleted')
}for(i in 1:length(raw_CAM_German)){
if(!is_empty(raw_CAM_German[[i]]$nodes)){
if(nrow(raw_CAM_German[[i]]$nodes) > 5){
write(toJSON(raw_CAM_German[[i]], encoding = "UTF-8"),
paste0(raw_CAM_German[[i]]$idCAM, ".json"))
}
}
} }
set up CAM data English
Create CAM files, draw CAMs and compute network indicators
### create CAM single files (nodes, connectors, merged)
<- create_CAMfiles(datCAM = raw_CAM_English, reDeleted = TRUE) CAMfiles_English
Nodes and connectors, which were deleted by participants were removed.
# deleted nodes: 15
# deleted connectors: 10
if(consider_Protocol){
setwd("data")
<- readLines("protocol_P01.1E Pre-Processing 20240405_1018 - English.txt", warn = FALSE)
text <- readLines(textConnection(text, encoding="UTF-8"), encoding="UTF-8")
text
if (testIfJson(file = text)) {
<- rjson::fromJSON(file = "protocol_P01.1E Pre-Processing 20240405_1018 - English.txt")
protocol
## no CAM deleted
1]] <- CAMfiles_English[[1]][CAMfiles_English[[1]]$CAM %in% protocol$currentCAMs,]
CAMfiles_English[[2]] <- CAMfiles_English[[2]][CAMfiles_English[[2]]$CAM %in% protocol$currentCAMs,]
CAMfiles_English[[3]] <- CAMfiles_English[[3]][CAMfiles_English[[3]]$CAM.x %in% protocol$currentCAMs,]
CAMfiles_English[[
<- overwriteTextNodes(protocolDat = protocol,
tmp_out nodesDat = CAMfiles_English[[1]])
1]] <- tmp_out[[1]]
CAMfiles_English[[# tmp_out[[2]]
else{
} print("Invalid protocol uploaded")
} }
time 2024-04-05 10:07:57.876021 at index 1 for approximate matching
time 2024-04-05 10:08:00.246115 at index 2 for approximate matching
time 2024-04-05 10:08:03.237472 at index 3 for approximate matching
time 2024-04-05 10:08:07.927706 at index 4 for approximate matching
time 2024-04-05 10:08:12.808653 at index 5 for approximate matching
time 2024-04-05 10:08:25.279709 at index 6 for approximate matching
time 2024-04-05 10:08:35.581476 at index 7 for approximate matching
time 2024-04-05 10:08:48.259832 at index 8 for approximate matching
time 2024-04-05 10:09:17.09741 at index 9 for approximate matching
time 2024-04-05 10:10:09.556336 at index 10 for approximate matching
time 2024-04-05 10:10:18.656436 at index 11 for approximate matching
time 2024-04-05 10:10:26.440809 at index 12 for approximate matching
time 2024-04-05 10:10:31.979511 at index 13 for approximate matching
time 2024-04-05 10:10:44.914415 at index 14 for approximate matching
time 2024-04-05 10:10:48.411073 at index 15 for approximate matching
time 2024-04-05 10:11:36.862477 at index 16 for approximate matching
time 2024-04-05 10:13:16.610944 at index 17 for search terms
time 2024-04-05 10:15:13.9348 at index 18 for search terms
time 2024-04-05 10:16:34.884557 at index 19 for search terms
# remove empty concepts:
1]]$text[nchar(CAMfiles_English[[1]]$text) < 2] CAMfiles_English[[
character(0)
<- CAMfiles_English[[1]]$id[nchar(CAMfiles_English[[1]]$text) < 2]
tmp_ids table(CAMfiles_English[[1]]$isActive[CAMfiles_English[[1]]$id %in% tmp_ids])
< table of extent 0 >
# CAMfiles_English[[1]] <- CAMfiles_English[[1]][!CAMfiles_English[[1]]$id %in% tmp_ids,]
### draw CAMs
<- draw_CAM(dat_merged = CAMfiles_English[[3]],
CAMdrawn_English dat_nodes = CAMfiles_English[[1]],ids_CAMs = "all",
plot_CAM = FALSE,
useCoordinates = TRUE,
relvertexsize = 3,
reledgesize = 1)
processing 11 CAMs...
[1] "== ids_CAMs in drawnCAM"
## check for non reasonable words
for(i in 1:length(CAMdrawn_English)){
if(any(nchar(V(CAMdrawn_English[[i]])$label) < 3)){
print(V(CAMdrawn_English[[i]])$label)
}
}
### network indicators
<- NULL # no pre-defined concepts
tmp_microIndicator <- compute_indicatorsCAM(drawn_CAM = CAMdrawn_English,
networkIndicators_English micro_degree = tmp_microIndicator,
micro_valence = tmp_microIndicator,
micro_centr_clo = tmp_microIndicator,
micro_transitivity = tmp_microIndicator,
largestClique = FALSE)
## check for CAMs who have not changed valence
<- networkIndicators_English$CAM_ID[is.na(networkIndicators_English$assortativity_valence_macro)]
tmp_ids for(i in tmp_ids){
plot(CAMdrawn_English[[i]], edge.arrow.size = .7,
layout=layout_nicely, vertex.frame.color="black", asp = .5, margin = -0.1,
vertex.size = 10, vertex.label.cex = .9)
}
### wordlist
<- create_wordlist(
CAMwordlist_English dat_nodes = CAMfiles_English[[1]],
dat_merged = CAMfiles_English[[3]],
useSummarized = TRUE,
order = "frequency",
splitByValence = FALSE,
comments = TRUE,
raterSubsetWords = NULL,
rater = FALSE
)
[1] "create_wordlist - use summarized words"
[1] 37
[1] 160
[1] "temporarily suffixes are added, because not all words have been summarized"
processing 11 CAMs...
[1] "== ids_CAMs in drawnCAM"
::datatable(CAMwordlist_English, options = list(pageLength = 5)) DT
save CAMs as .json files, and as .png (igraph)
if(save_CAMs_as_pictures){
setwd("outputs")
setwd("savedCAMs_English")
setwd("png")
### remove all files if there are any
if(length(list.files()) >= 1){
file.remove(list.files())
cat('\n!
all former .png files have been deleted')
}
### if no participant ID was provided replace by randomly generated CAM ID
if(all(CAMfiles_English[[3]]$participantCAM.x == "noID")){
3]]$participantCAM.x <- CAMfiles_English[[3]]$CAM.x
CAMfiles_English[[
}
### save as .json files, and as .png (igraph)
<- unique(CAMfiles_English[[3]]$participantCAM.x); length(ids_CAMs)
ids_CAMs
for(i in 1:length(ids_CAMs)){
save_graphic(filename = paste0("CAM", "_t1_", ids_CAMs[i])) # paste0(ids_CAMs[i]))
<- CAMdrawn_English[[c(1:length(CAMdrawn_English))[
CAM_igraph names(CAMdrawn_English) == paste0(unique(CAMfiles_English[[3]]$participantCAM.x)[i])]]]
plot(CAM_igraph, edge.arrow.size = .7,
layout=layout_nicely, vertex.frame.color="black", asp = .5, margin = -0.1,
vertex.size = 10, vertex.label.cex = .9)
dev.off()
}
setwd("../json")
### remove all files if there are any
if(length(list.files()) >= 1){
file.remove(list.files())
cat('\n!
all former .json files have been deleted')
}for(i in 1:length(raw_CAM_English)){
if(!is_empty(raw_CAM_English[[i]]$nodes)){
if(nrow(raw_CAM_English[[i]]$nodes) > 5){
write(toJSON(raw_CAM_English[[i]], encoding = "UTF-8"),
paste0(raw_CAM_English[[i]]$idCAM, ".json"))
}
}
} }
translate German CAMs to English
<- raw_CAM_German
raw_CAM_Germany_translated_raw <- CAMfiles_German
CAMfiles_Germany_translated
<- list()
raw_CAM_Germany_translated = 1
h ## keep only non deleted CAMs
for(i in 1:length(raw_CAM_Germany_translated_raw)){
if(raw_CAM_Germany_translated_raw[[i]]$idCAM %in% CAMfiles_Germany_translated[[1]]$CAM){
<- raw_CAM_Germany_translated_raw[[i]]
raw_CAM_Germany_translated[[h]] = h + 1
h else{
}print(raw_CAM_Germany_translated_raw[[i]]$nodes$text)
} }
[1] "gsd" "dsfg" "gfsdf" "dfsg" "gsd" "sfgd" "gas" "fdggsf"
[9] ""
[1] "afsad" "fa" "dsf" "trzerz" "Erz" "Tür" "rtzert" "Sofas"
[1] "dfdsa" "asd" "asd" "afdasdf" "pdf" "sdaf" "dfs"
[8] "fs"
rm(raw_CAM_Germany_translated_raw)
# translatedWords$Finale.Übersetzung - target variable
::datatable(translatedWords, options = list(pageLength = 5)) DT
Overwrite German words to the corresponding English ones
for(i in 1:length(raw_CAM_Germany_translated)) {
## get summarized words
<-
tmp_nodes 1]][CAMfiles_Germany_translated[[1]]$CAM == unique(CAMfiles_Germany_translated[[1]]$CAM)[i], ]
CAMfiles_Germany_translated[[
<- tmp_nodes$text
tmpWords_summarized <-
tmpWords_summarized str_trim(string = tmpWords_summarized, side = "both")
# wordlist is not based on summarized words !!!
# tmpWords_summarized <- str_remove_all(string = tmp_nodes$text_summarized, pattern = "_positive$|_negative$|_neutral$|_ambivalent$")
## take summarized words
if (length(tmpWords_summarized) != sum(raw_CAM_Germany_translated[[i]]$nodes$isActive)) {
print(i)
# print("ERROR") # removed single concept
# break
else{
} # wordlist is not based on summarized words !!!
# raw_CAM_Germany_translated[[i]]$nodes$text[raw_CAM_Germany_translated[[i]]$nodes$isActive] <- tmpWords_summarized
}
## remove white spaces
$nodes$text <-
raw_CAM_Germany_translated[[i]]str_trim(string = raw_CAM_Germany_translated[[i]]$nodes$text, side = "both")
<-
tmp $nodes$text[raw_CAM_Germany_translated[[i]]$nodes$isActive &
raw_CAM_Germany_translated[[i]]!raw_CAM_Germany_translated[[i]]$nodes$text %in% translatedWords$Finale.Übersetzung]
# print(tmp)
if (length(tmp) == 0) {
print(i)
print("no words founds")
break
else{
} for (j in 1:length(tmpWords_summarized)) {
cat(
"\n >>>i:",
i,"j: ",
j,$nodes$text[raw_CAM_Germany_translated[[i]]$nodes$isActive][j],
raw_CAM_Germany_translated[[i]]"to",
$Finale.Übersetzung[translatedWords$Words %in% tmpWords_summarized[j]],
translatedWords"\n"
)
$nodes$text[raw_CAM_Germany_translated[[i]]$nodes$isActive][j] <- translatedWords$Finale.Übersetzung[translatedWords$Words %in% tmpWords_summarized[j]]
raw_CAM_Germany_translated[[i]]
}
} }
>>>i: 1 j: 1 Krank sein to Being ill
>>>i: 1 j: 2 Was hilft to What helps
>>>i: 1 j: 3 Sensibilisieren to sensitise
>>>i: 1 j: 4 Eigeninitiative to Own initiative
>>>i: 1 j: 5 Grundwissen über Gesundheitssystem to Basic knowledge about healthcare system
>>>i: 1 j: 6 MIgrationshintergrund to Migration background
>>>i: 1 j: 7 Depression to Depression
>>>i: 1 j: 8 Gleichgültigkeit to Indifference
>>>i: 2 j: 1 Arten von Hilfe to Types of help
>>>i: 2 j: 2 Ärztliche Behandlung to Medical treatment
>>>i: 2 j: 3 Freunde an der to Friends at the
>>>i: 2 j: 4 Krankenversicherung to health insurance coverage
>>>i: 2 j: 5 Sprachbarriere to Language barrier
>>>i: 2 j: 6 Keine Freunde to No friends
>>>i: 2 j: 7 Familie to Family
>>>i: 2 j: 8 Finanziel nicht möglich to Financially not possible
>>>i: 2 j: 9 Unterstützung bei der to Support with
>>>i: 2 j: 10 Unterstützung im Alltag to Support in everyday life
>>>i: 2 j: 11 Unkenntnis des Gesundheitssystems to Ignorance of the healthcare system
>>>i: 2 j: 12 Bürokratische Hürden to Bureaucratic hurdles
>>>i: 2 j: 13 Kulturelle Unterschiede to Cultural differences
>>>i: 3 j: 1 Erste ärztliche Konsultation to First medical consultation
>>>i: 3 j: 2 Telefonisch schlecht verfügbar to Poor availability by phone
>>>i: 3 j: 3 Auf Termin warten to Waiting for an appointment
>>>i: 3 j: 4 Behandlung in Praxis to Treatment in practice
>>>i: 3 j: 5 Somatische Symptome to Somatic symptoms
>>>i: 3 j: 6 Guten Arzt finden to Find a good doctor
>>>i: 3 j: 7 Zusatzkosten to Additional costs
>>>i: 3 j: 8 Psychische Symptome to Mental symptoms
>>>i: 3 j: 9 Nach Psychotherapeuten suchen to Looking for psychotherapists
>>>i: 3 j: 10 Bahdnlung in Praxis to Treatment in practice
>>>i: 3 j: 11 Mit Freunden sprechen to Talk to friends
>>>i: 3 j: 12 Ärzte im Bekanntenkreis to Doctors in the circle of acquaintances
>>>i: 3 j: 13 Locker & Unterschwellig to Easy-going & subliminal
>>>i: 3 j: 14 Familiäre Unterstützung to Family support
>>>i: 3 j: 15 Nicht immer möglich to Not always possible
>>>i: 3 j: 16 Commitment to Commitment
>>>i: 3 j: 17 Eigene Kenntnisse Recherche to Own knowledge Research
>>>i: 3 j: 18 Ungesundes Coping to Unhealthy coping
>>>i: 3 j: 19 Übertriebene Leistung Arbeit to Exaggerated performance Work
>>>i: 4 j: 1 Hilfe von Arzt to Help from doctor
>>>i: 4 j: 2 Hilfe von Psychologist to Help from psychologist
>>>i: 4 j: 3 Medizinische Hilfsmittel to Medical aids
>>>i: 4 j: 4 Hilfe von Freunden to Help from friends
>>>i: 4 j: 5 Physiotherapeut to Physiotherapist
>>>i: 4 j: 6 Operation to Surgery
>>>i: 4 j: 7 Stationierung to Stationing
>>>i: 4 j: 8 Selbsthilfe to Self-help
>>>i: 4 j: 9 Untersuchung to Examination
>>>i: 4 j: 10 Arten von Hilfe to Types of help
>>>i: 4 j: 11 keine Termine to No appointments
>>>i: 4 j: 12 nicht genug Ärzte to Not enough doctors
>>>i: 4 j: 13 Diskriminierung to Discrimination
>>>i: 4 j: 14 falsche Diagnose to Wrong diagnosis
>>>i: 4 j: 15 Anerkennung des Ärztediploms to Recognition of medical diploma
>>>i: 4 j: 16 Sprachbarriere to Language barrier
>>>i: 4 j: 17 teuer to Expensive
>>>i: 4 j: 18 Krankenkassen to health insurance companies
>>>i: 4 j: 19 dringend Hilfe to urgent help
>>>i: 4 j: 20 Qualität der Hilfe to Quality of help
>>>i: 4 j: 21 keine deutsche Freunde to No German friends
>>>i: 4 j: 22 Bürokratie to Bureaucracy
>>>i: 4 j: 23 Schwierigkeiten und Probleme to Difficulties and problems
>>>i: 5 j: 1 Reden to Talk
>>>i: 5 j: 2 Hilfe suchen to Seeking help
>>>i: 5 j: 3 Unterstützung to Support
>>>i: 5 j: 4 Hilfe to Help
>>>i: 5 j: 5 Die Sprache to The language
>>>i: 5 j: 6 Fehlende Mittel to Lack of resources
>>>i: 5 j: 7 mangelnde soziale Unterstützung to Lack of social support
>>>i: 5 j: 8 Überforderung to exsessive demands
>>>i: 5 j: 9 Ahnungslosigkeit to Cluelessness
>>>i: 5 j: 10 Erleichterung to Relief
>>>i: 6 j: 1 psychische Hilfe to mental help
>>>i: 6 j: 2 körperliche Hilfe to Physical help
>>>i: 6 j: 3 Stress to Stress
>>>i: 6 j: 4 Kopfschmerzen to Headaches
>>>i: 6 j: 5 Terminvereinbarung schwierig to Difficult to make appointment
>>>i: 6 j: 6 wenig Termine to Few appointments
>>>i: 6 j: 7 keine Neuaufnahme Patienten to No new patient admission
>>>i: 6 j: 8 lange Wartezeiten to Long waiting times
>>>i: 6 j: 9 Gesundheitsversorgung Ukraine to Healthcare in Ukraine
>>>i: 6 j: 10 keine lange Wartezeit to No long waiting time
>>>i: 6 j: 11 bessere Medizin to Better medicine
>>>i: 6 j: 12 Sport to Sport
>>>i: 6 j: 13 Schlafen to Sleeping
>>>i: 6 j: 14 > 9 Stunden to > 9 hours
>>>i: 6 j: 15 < 7 Stunden to < 7 hours
>>>i: 6 j: 16 leckeres& gesundes Essen to Delicious & healthy food
>>>i: 6 j: 17 im Bett bleiben to Stay in bed
>>>i: 6 j: 18 genug Wasser trinken to Drink enough water
>>>i: 7 j: 1 Medikamente to Medication
>>>i: 7 j: 2 richtige Diagnose to Correct diagnosis
>>>i: 7 j: 3 Kurs in Parapsychologie to Course in parapsychology
>>>i: 7 j: 4 Verstehen der Diagnose to Understanding the diagnosis
>>>i: 7 j: 5 mit Energien arbeiten to Work with energies
>>>i: 7 j: 6 30Jahre keine Medikamente to 30 years no medication
>>>i: 7 j: 7 Operation to Surgery
>>>i: 7 j: 8 Diagnose in Ukraine to Diagnosis in Ukraine
>>>i: 7 j: 9 das hilft to That helps
>>>i: 7 j: 10 Termin nach 1Tag to Appointment after 1 day
>>>i: 7 j: 11 Helfen im Kulturzentrum to Helping at the cultural center
>>>i: 7 j: 12 Arzt Deutschland to Doctor Germany
>>>i: 7 j: 13 Reiki to Reiki
>>>i: 7 j: 14 Esoterik to Esotericism
>>>i: 7 j: 15 Buch Grigori grabovoi to Book by Grigori Grabovoi
>>>i: 7 j: 16 häufig lange Wartezeiten to Often long waiting times
>>>i: 7 j: 17 Zahnprothese zu teuer to Dentures too expensive
>>>i: 7 j: 18 höhere Qualität Deutschland to higher quality Germany
>>>i: 7 j: 19 Eigenanteil to Own contribution
>>>i: 8 j: 1 keine Arbeit to no work
>>>i: 8 j: 2 Stolz von Ehemann to Pride of husband
>>>i: 8 j: 3 kein Geld to No money
>>>i: 8 j: 4 Sorgen um Mann to Concerns about husband
>>>i: 8 j: 5 Konflikt in Beziehung to Conflict in relationship
>>>i: 8 j: 6 nicht gut Schlafen to Not sleeping well
>>>i: 8 j: 7 immer Nachweis notwendig to always proof necessary
>>>i: 8 j: 8 keine Kommunikation Partner to No partner communication
>>>i: 8 j: 9 Bürokratie to Bureaucracy
>>>i: 8 j: 10 keine Hilfe to No help
>>>i: 8 j: 11 viele Minijobs grade to Many minijobs currently
>>>i: 8 j: 12 kein Drucker zuhause to No printer at home
>>>i: 8 j: 13 Yoga to Yoga
>>>i: 8 j: 14 Sport to Sport
>>>i: 8 j: 15 drüber reden to Talk about it
>>>i: 8 j: 16 Spazieren to Walking
>>>i: 8 j: 17 Schlaftee trinken to Drinking sleep tea
>>>i: 8 j: 18 Medikamente to Medication
>>>i: 8 j: 19 Flüchtlinge wissen nicht to Refugees don't know
>>>i: 8 j: 20 Informationen to Information
>>>i: 8 j: 21 Sachen die helfen to Things that help
>>>i: 9 j: 1 Deutsch lernen to Learning German
>>>i: 9 j: 2 gute Arbeit to Good work
>>>i: 9 j: 3 Arzt to Doctor
>>>i: 9 j: 4 Sport to Sport
>>>i: 9 j: 5 das hilft to That helps
>>>i: 9 j: 6 Spazieren gehen to Going for a walk
>>>i: 9 j: 7 wenig Zeit to Little time
>>>i: 9 j: 8 Hilfe durch Bekannte to Help from acquaintances
>>>i: 9 j: 9 Projekte to Projects
>>>i: 9 j: 10 lange Wartezeit to Long waiting time
>>>i: 9 j: 11 Internet to Internet
>>>i: 9 j: 12 kein Kontakt Deutsche to No contact with Germans
>>>i: 9 j: 13 schwierig to Difficult
>>>i: 9 j: 14 Heimweh to Homesickness
>>>i: 9 j: 15 neue Kultur to New culture
>>>i: 9 j: 16 andere Sprache to different language
>>>i: 10 j: 1 Arzt to Doctor
>>>i: 10 j: 2 man kann planen to You can plan
>>>i: 10 j: 3 Termin vereinbaren to Make an appointment
>>>i: 10 j: 4 Bürokratie to Bureaucracy
>>>i: 10 j: 5 Gundelfingen to Gundelfingen
>>>i: 10 j: 6 Leute helfen uns to People help us
>>>i: 10 j: 7 Leute sind nett to People are nice
>>>i: 10 j: 8 Sozialgarten to Social garden
>>>i: 10 j: 9 Wohnung to Apartment
>>>i: 10 j: 10 Natur to Nature
>>>i: 10 j: 11 Arbeiten in Fahrradwerkstatt to Working in a bicycle repair shop
>>>i: 10 j: 12 nur Deutsch lernen to only learn German
>>>i: 10 j: 13 für alteLeute schwer to difficult for old people
>>>i: 10 j: 14 Leute sehr nett to People very nice
>>>i: 11 j: 1 beim Hausarzt anrufen to Calling the GP
>>>i: 11 j: 2 Krankenversicherung & Krankenkasse to Health insurance coverage & health insurance company
>>>i: 11 j: 3 Geld von Krankenkasse to Money from health insurance
>>>i: 11 j: 4 Sport to Sport
>>>i: 11 j: 5 Therapie to Therapy
>>>i: 11 j: 6 viele Menschen treffen to Meet many people
>>>i: 11 j: 7 Yoga machen to Doing yoga
>>>i: 11 j: 8 Stress am Arbeitsplatz to Stress at work
>>>i: 11 j: 9 keine Lust arbeiten to No desire to work
>>>i: 11 j: 10 Beziehung zu Partnerin to Relationship with partner
>>>i: 11 j: 11 ohne Versicherung to Without insurance
>>>i: 11 j: 12 gesund Essen to Eat healthily
>>>i: 11 j: 13 viel Wasser trinken to Drink a lot of water
>>>i: 12 j: 1 Krankenhaus to Hospital
>>>i: 12 j: 2 körperliche Schwierigkeit to Physical difficulty
>>>i: 12 j: 3 psychische Schwierigkeit to Mental health difficulties
>>>i: 12 j: 4 Apotheke to Pharmacy
>>>i: 12 j: 5 Arzt to Doctor
>>>i: 12 j: 6 Eltern to Parents
>>>i: 12 j: 7 Freunde to Friends
>>>i: 12 j: 8 Ehefrau to Wife
>>>i: 12 j: 9 Verwandte to Relatives
>>>i: 12 j: 10 Eltern streiten untereinander to Parents argue among themselves
>>>i: 12 j: 11 lange Wartezeit to Long waiting time
>>>i: 12 j: 12 wenig Geduld to Little patience
>>>i: 12 j: 13 nicht qualifizierter Arzt to not qualified doctor
>>>i: 12 j: 14 wenig Behandlungszeit to Little treatment time
>>>i: 12 j: 15 fühle mich nichtgut to Don't feel good
>>>i: 13 j: 1 Sprachcafé Stadtbücherei to Language café in City library
>>>i: 13 j: 2 neue Leute kennenlernen to Meet new people
>>>i: 13 j: 3 Reden über Frauenrechte to Talking about women's rights
>>>i: 13 j: 4 Freiheit to Freedom
>>>i: 13 j: 5 Heimweh to Homesickness
>>>i: 13 j: 6 manchmal einsam to Sometimes lonely
>>>i: 13 j: 7 Deutsch lernen schwierig to Learning German difficult
>>>i: 13 j: 8 alte Leute Dialekt to Old people dialect
>>>i: 13 j: 9 Menschen ansprechen to Approach people
>>>i: 13 j: 10 Minijob einfach to Mini job simple
>>>i: 13 j: 11 Arbeitslos to Unemployed
>>>i: 13 j: 12 Diplom nicht anerkannt to Diploma not recognized
>>>i: 13 j: 13 traurig to Sad
>>>i: 13 j: 14 Freunde vermissen to Miss friends
>>>i: 13 j: 15 Kultur sehr anders to Culture very different
>>>i: 13 j: 16 Schwierigkeiten to Difficulties
>>>i: 13 j: 17 Aufgewachsen im Krieg to Growing up in war
>>>i: 13 j: 18 Traumata to traumas
>>>i: 13 j: 19 das hilft to That helps
>>>i: 13 j: 20 passende Arbeit to Suitable work
>>>i: 13 j: 21 Abhängig von Partnerin to Dependent on partner
>>>i: 13 j: 22 Trennung von Partnerin to Separation from partner
>>>i: 13 j: 23 emotionslos to Emotionless
>>>i: 13 j: 24 Sport to Sport
>>>i: 13 j: 25 Statusverlust to Loss of status
>>>i: 13 j: 26 Psychotherapie to Psychotherapy
>>>i: 13 j: 27 keine Kommunikation Familie to No family communication
>>>i: 13 j: 28 keine Psychotherapie Muttersprache to No psychotherapy in native language
>>>i: 14 j: 1 psychisch to psychic
>>>i: 14 j: 2 Eltern in Deutschland to Parents in Germany
>>>i: 14 j: 3 Ehemann traurig to Husband sad
>>>i: 14 j: 4 Verwandte in Syrien to Relatives in Syria
>>>i: 14 j: 5 andere nicht gut to Others not good
>>>i: 14 j: 6 Kind krank to Child sick
>>>i: 14 j: 7 Sport to Sport
>>>i: 14 j: 8 Essen to Food
>>>i: 14 j: 9 Spazieren mit Familie to Walking with family
>>>i: 14 j: 10 Lesen to Reading
>>>i: 14 j: 11 Ausflüge in Deutschland to Trips in Germany
>>>i: 14 j: 12 Freunde to Friends
>>>i: 14 j: 13 Stress to Stress
>>>i: 14 j: 14 körperlich krank to Physically ill
>>>i: 14 j: 15 fühle mich schwach to Feel weak
>>>i: 14 j: 16 Ehemann hilft to Husband helps
>>>i: 14 j: 17 Familie hilft to Family helps
>>>i: 14 j: 18 Freunde hilft to Friends help
>>>i: 15 j: 1 Stress to Stress
>>>i: 15 j: 2 Musik to Music
>>>i: 15 j: 3 Singen to Singing
>>>i: 15 j: 4 Arzt to Doctor
>>>i: 15 j: 5 Mama anrufen to Call mum
>>>i: 15 j: 6 Musik selber machen to Make music yourself
>>>i: 15 j: 7 Sprachbarriere to Language barrier
>>>i: 15 j: 8 kein Dolmetscher to No interpreter
>>>i: 15 j: 9 Wo ist Arzt? to Where is the doctor?
>>>i: 15 j: 10 Sport to Sport
>>>i: 15 j: 11 Welcher Arzt besser? to Which doctor is better?
>>>i: 15 j: 12 keine Information Gesundheitssystem to no information healthcare system
>>>i: 15 j: 13 Sozialarbeiterin to Social worker
>>>i: 15 j: 14 das hilft to That helps
>>>i: 15 j: 15 Handy to Mobile phone
>>>i: 15 j: 16 nicht selber nachdenken to Not think for oneself
>>>i: 15 j: 17 kein Kontakt Kunstszene to No contact art scene
>>>i: 15 j: 18 Bürokratie in Deutschland to Bureaucracy in Germany
>>>i: 15 j: 19 Schwierigkeiten to Difficulties
>>>i: 15 j: 20 Wie funktioniert Familiengericht? to How does family court work?
>>>i: 15 j: 21 kulturelle Unterschiede to Cultural differences
>>>i: 15 j: 22 Angst vor Gericht to Fear of court
>>>i: 16 j: 1 1. Selbsthelfen to 1. Self-help
>>>i: 16 j: 2 Medizin to Medicine
>>>i: 16 j: 3 Apotheke to Pharmacy
>>>i: 16 j: 4 manche mit Rezept to Some with prescription
>>>i: 16 j: 5 Selbstdiagnose schwierig to Self-diagnosis difficult
>>>i: 16 j: 6 meine Familie bitten to Ask my family
>>>i: 16 j: 7 Erfahrungen Freunde fragen to Ask friends for experiences
>>>i: 16 j: 8 2.zum Arzt gehen to 2. Go to doctor
>>>i: 16 j: 9 Deutsche Freunde to German friends
>>>i: 16 j: 10 Termin bekommen schwierig to Difficult to get an appointment
>>>i: 16 j: 11 deutsches Gesundheitssystem kompliziert to German healthcare system complicated
>>>i: 16 j: 12 nicht jeder Englischkenntnisse to Not everyone English skills
>>>i: 16 j: 13 Englischkenntnisse im Gesundheitssystem to English skills in the health system
>>>i: 16 j: 14 Notfalltelefon verschiedene Sprachen to Emergency phone various languages
>>>i: 16 j: 15 Instructions verschiedene Sprachen to Instructions in various languages
>>>i: 16 j: 16 Rathaus to Town hall
>>>i: 16 j: 17 Wo Hilfe Nachts? to Where to get help at night?
>>>i: 16 j: 18 Arztberatung am Telefon to Doctor consultation by phone
>>>i: 16 j: 19 keine einheitliche Plattform to No unified platform
>>>i: 16 j: 20 Übersicht fehlt to Lack of overview
>>>i: 17 j: 1 viele Briefe to Many letters
>>>i: 17 j: 2 Pflegepersonal to Nursing staff
>>>i: 17 j: 3 keine Aufklärung Medikation to no information medication
>>>i: 17 j: 4 mangelnde Flexibilität Behandlung to Lack of treatment flexibility
>>>i: 17 j: 5 Sprachbarriere to Language barrier
>>>i: 17 j: 6 hat Patienten angeschrien to shouted at patients
>>>i: 17 j: 7 Kein Vertrauen inPflege to No trust in care
>>>i: 17 j: 8 schlechte infrastrukturelle Anbindung to poor infrastructural connection
>>>i: 17 j: 9 teilweise unhöflich to Sometimes rude
>>>i: 17 j: 10 falsche Station? to Wrong ward?
>>>i: 17 j: 11 andere Patienten sediert? to other patients sedated?
>>>i: 17 j: 12 menschlicher Faktor to Human factor
>>>i: 17 j: 13 Sozialarbeiterin to Social worker
>>>i: 17 j: 14 keine Informationen Gesundheitsversorgun to no information healthcare
>>>i: 17 j: 15 Ehemann ist Pflegebedürftig to Husband needs care
>>>i: 17 j: 16 Zuständigkeiten unklar to Unclear responsibilities
>>>i: 17 j: 17 Ärzte wenig Zeit to Doctors little time
>>>i: 17 j: 18 teilweise Kosten to partly cost
>>>i: 17 j: 19 Ablenkung to Distraction
>>>i: 17 j: 20 Ukrainisches Kulturzentrum to Ukrainian cultural center
>>>i: 17 j: 21 zuhause sein to Being at home
>>>i: 17 j: 22 kein Vertrauen Versorgung to no confidence in supply
>>>i: 17 j: 23 Schlafschwierigkeiten to sleeping difficulties
>>>i: 17 j: 24 Ärzte to Doctors
>>>i: 17 j: 25 Rumänischer Pfleger gut to Romanian caregiver good
>>>i: 17 j: 26 manche freundlich to Some friendly
>>>i: 17 j: 27 (Fehl-)Behandlung Ehemann to (Mis)treatment of husband
>>>i: 17 j: 28 lange Wartezeiten to Long waiting times
>>>i: 17 j: 29 Bürokratie to Bureaucracy
>>>i: 17 j: 30 weitere Schwierigkeiten to further difficulties
>>>i: 17 j: 31 Überforderung to exsessive demands
>>>i: 17 j: 32 HAUPTPROBLEM: keine Kommunikation to MAIN PROBLEM: no communication
>>>i: 18 j: 1 2. Hausarzt to 2. General Practioner
>>>i: 18 j: 2 lange Wartezeit to Long waiting time
>>>i: 18 j: 3 1. Selbst Medikation to 1. Self-medication
>>>i: 18 j: 4 wenn nicht hilft to If it doesn't help
>>>i: 18 j: 5 Symptome verschwinden alleine to Symptoms disappear on their own
>>>i: 18 j: 6 spazieren gehen to Go for a walk
>>>i: 18 j: 7 guten Film anschauen to Watch a good movie
>>>i: 18 j: 8 mit Freunden telefonieren to Talk to friends on the phone
>>>i: 18 j: 9 Süßigkeiten essen to Eating sweets
>>>i: 18 j: 10 Psychische Gesundheit to Mental health
>>>i: 18 j: 11 3. Spezieller Arzt to 3. Specialist doctor
>>>i: 18 j: 12 nicht Deutsch Muttersprache to Not native German
>>>i: 18 j: 13 Angst Termine telefonisch to fear appointments by phone
>>>i: 18 j: 14 schon Leute kennen to Already know people
>>>i: 18 j: 15 weniger Angst to less anxiety
>>>i: 18 j: 16 körperliche Gesundheit to Physical health
>>>i: 18 j: 17 Medikation to Medication
>>>i: 18 j: 18 Entspannung to Relaxation
>>>i: 18 j: 19 Psychotherapeut to Psychotherapist
[1] 19
>>>i: 19 j: 1 Fachärztliche Hilfe to Specialist help
>>>i: 19 j: 2 Gymnastik to Gymnastics
>>>i: 19 j: 3 Massage to Massage
>>>i: 19 j: 4 Einschränkungen to Limitations
>>>i: 19 j: 5 Wartenzeiten der Terminen to Waiting times for appointments
>>>i: 19 j: 6 finanzielle Grenze to Financial limit
>>>i: 19 j: 7 Krankenversicherung to health insurance coverage
>>>i: 19 j: 8 inkompetentes ärztliches Personal to Incompetent medical staff
>>>i: 19 j: 9 Selbstbildung to Self-education
>>>i: 19 j: 10 Medicine und Medikamenten to Medicine and medication
>>>i: 19 j: 11 Schwimmen to Swimming
Save files
translated CAM data
Save CAM file to upload on CAM-App / process further:
### get CAM data
writeLines("", "outputs/CAMdata_Germany_translated.txt") # create file
<- file("outputs/CAMdata_Germany_translated.txt", "a") # open connection to append
text_connection
for(i in 1:length(raw_CAM_Germany_translated)){
writeLines(jsonlite::toJSON(x = raw_CAM_Germany_translated[[i]], pretty = FALSE, auto_unbox = FALSE), text_connection)
}
close(text_connection) # close connection
network indicators
setwd("outputs")
# save network indicators German
## save as .xlsx file
::write.xlsx2(x = networkIndicators_German, file = "networkIndicators_German.xlsx")
xlsx## save as R object
saveRDS(networkIndicators_German, file = "networkIndicators_German.rds")
## save as csv object
write.csv2(networkIndicators_German, file = "networkIndicators_German.csv")
# save network indicators English
## save as .xlsx file
::write.xlsx2(x = networkIndicators_English, file = "networkIndicators_English.xlsx")
xlsx## save as R object
saveRDS(networkIndicators_English, file = "networkIndicators_English.rds")
## save as csv object
write.csv2(networkIndicators_English, file = "networkIndicators_English.csv")