-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.r
45 lines (32 loc) · 903 Bytes
/
make.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
# hi Slovakia
source("load.r")
source("functions.r")
source("parties.r")
# folders
dir.create("data" , showWarnings = FALSE)
dir.create("plots" , showWarnings = FALSE)
if (file.exists("photos.zip"))
unzip("photos.zip")
dir.create("photos", showWarnings = FALSE)
if (file.exists("raw.zip"))
unzip("raw.zip")
dir.create("raw", showWarnings = FALSE)
# parameters
plot = TRUE
gexf = TRUE
mode = "fruchtermanreingold"
meta = c(
"cty" = "Slovakia",
"lang" = "sk", # Wikipedia language for chamber and constituencies
"ch" = "Národná_rada_Slovenskej_republiky",
"type" = "Unicameral",
"ipu" = 2285,
"seats" = 150
)
# build routine
source("data.r") # scrape bills and sponsors
source("build.r") # assemble the networks
source("comm.r") # add committee co-membership
save(list = ls(pattern = "^(co)?(net|edges|bills)_sk\\d{4}$"),
file = "data/net_sk.rda")
# have a nice day