-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreprocessing.R
73 lines (60 loc) · 1.74 KB
/
preprocessing.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
library(tidyverse)
library(ggplot2)
library(ggthemes)
library(patchwork)
#-----------------------------------------
# import data
#-----------------------------------------
Data <- read_csv2("data.csv")
Data <- Data %>% rename(Luzerner = v_100, Sex = v_6, Altergruppe = v_22, Beziehungstatus = v_7, Quartier = v_113, Zuzug =
v_99, Bildung = v_142, HH = v_14, Kinder_Schule= v_158, Erwerb=v_15, Lebensqualallg=v_206, ArbeitsplatzLuzern=v_66,
Corona=v_224)
#-----------------------------------------
# carole preprocessing
#-----------------------------------------
df <- Data
colnames(df)
drop <- c("rts6466760",
"rts6466864",
"rts6466868",
"rts6466874",
"rts6466875",
"rts6466878",
"rts6466879",
"rts6466883",
"rts6467471",
"rts6467480",
"rts6467680",
"rts6467691",
"rts6468126",
"rts6468129",
"rts6468397",
"rts6469068",
"rts6469074",
"rts6469300",
"rts6469580",
"rts6484772",
"browser",
"referer",
"device_type",
"quota",
"quota_assignment",
"page_history",
"hflip",
"vflip",
"output_mode",
"javascript",
"flash",
"session_id",
"language",
"cleaned",
"ats",
"datetime",
"date_of_last_access",
"date_of_first_mail",
"external_lfdn",
"tester",
"dispcode",
"v_371")
df <- dplyr::select(df, -drop)
write.csv2(df, file="cleaned_data.csv")