-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
57 lines (48 loc) · 1.36 KB
/
run.py
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
from utils import write_json
import sources.esv as esv
import sources.stkt as stkt
import sources.scb as scb
import sources.wikidata as wd
import sources.sfs as sfs
import sources.agv as agv
import sources.handlingar as handlingar
DOWNLOAD = False
if DOWNLOAD:
print("Downloading from ESV...")
esv.download()
print("Extracting from ESV...")
esv_data = esv.extract()
write_json(esv_data, "data/esv")
if DOWNLOAD:
print("Downloading from Statskontoret...")
stkt.download()
print("Extracting from Statskontoret...")
stkt_data = stkt.extract()
write_json(stkt_data, "data/stkt")
if DOWNLOAD:
print("Downloading from SCB...")
scb.download()
print("Extracting from SCB...")
scb_data = scb.extract()
write_json(scb_data, "data/scb")
if DOWNLOAD:
print("Downloading from Wikidata...")
wd.download()
print("Extracting from Wikidata...")
wd_data = wd.extract()
write_json(wd_data, "data/wd")
if DOWNLOAD:
print("Downloading from SFS...")
sfs.download()
print("Extracting from SFS...")
sfs_data = sfs.extract()
write_json(sfs_data, "data/sfs")
print("Extracting from Arbetsgivarverket...")
agv_data = agv.extract()
write_json(agv_data, "data/agv")
if DOWNLOAD:
print("Downloading from Handlingar...")
handlingar.download()
print("Extracting from Handlingar...")
handlingar_data = handlingar.extract()
write_json(handlingar_data, "data/handlingar")