-
Notifications
You must be signed in to change notification settings - Fork 0
/
converter_csv.py
235 lines (162 loc) · 10.8 KB
/
converter_csv.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import pandas as pd
# Converting JSON Data to CSV
#Rettungswachen
df = pd.read_json (r'data/json/ambulance_station/ambulancestation_dispo_srz.geojson')
df.to_csv (r'data/csv/ambulance_station/ambulancestation_dispo_srz.csv', index = None)
# Defibrillatoren
df = pd.read_json (r'data/json/defis/defis_dispo_srz.geojson')
df.to_csv (r'data/csv/defis/defis_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/defis/defis_dispo_srz.geojson')
df.to_csv (r'data/csv/defis/defis_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/defis/defis_kt_zh.geojson')
df.to_csv (r'data/csv/defis/defis_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/defis/defis_stadt_zh.geojson')
df.to_csv (r'data/csv/defis/defis_stadt_zh.csv', index = None)
# Feuerwachen
df = pd.read_json (r'data/json/fire_station/firestation_kt_zh.geojson')
df.to_csv (r'data/csv/fire_station/firestation_kt_zh.csv', index = None)
# Tore
df = pd.read_json (r'data/json/access/gates/gates_dispo_srz.geojson')
df.to_csv (r'data/csv/access/gates/gates_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/access/gates/gates_kt_sh.geojson')
df.to_csv (r'data/csv/access/gates/gates_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/access/gates/gates_kt_sz.geojson')
df.to_csv (r'data/csv/access/gates/gates_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/access/gates/gates_kt_zg.geojson')
df.to_csv (r'data/csv/access/gates/gates_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/access/gates/gates_kt_zh.geojson')
df.to_csv (r'data/csv/access/gates/gates_kt_zh.csv', index = None)
#Helipads
df = pd.read_json (r'data/json/helipad/helipads_dispo_srz.geojson')
df.to_csv (r'data/csv/helipad/helipads_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/helipad/helipads_switzerland.geojson')
df.to_csv (r'data/csv/helipad/helipads_switzerland.csv', index = None)
#Spitäler
df = pd.read_json (r'data/json/facilities/hospital/hospital_dispo_srz.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_kt_sh.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_kt_sz.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_kt_zg.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_kt_zh.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_kt_sh.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/facilities/hospital/hospital_switzerland.geojson')
df.to_csv (r'data/csv/facilities/hospital/hospital_switzerland.csv', index = None)
#Heime
df = pd.read_json (r'data/json/facilities/nursing_home/nursing_home_dispo_srz.geojson')
df.to_csv (r'data/csv/facilities/nursing_home/nursing_home_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/facilities/nursing_home/nursing_home_kt_sh.geojson')
df.to_csv (r'data/csv/facilities/nursing_home/nursing_home_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/facilities/nursing_home/nursing_home_kt_sz.geojson')
df.to_csv (r'data/csv/facilities/nursing_home/nursing_home_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/facilities/nursing_home/nursing_home_kt_zg.geojson')
df.to_csv (r'data/csv/facilities/nursing_home/nursing_home_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/facilities/nursing_home/nursing_home_kt_zh.geojson')
df.to_csv (r'data/csv/facilities/nursing_home/nursing_home_kt_zh.csv', index = None)
#Sozialeinrichtungen
df = pd.read_json (r'data/json/facilities/social_facilities/social_facilities_dispo_srz.geojson')
df.to_csv (r'data/csv/facilities/social_facilities/social_facilities_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/facilities/social_facilities/social_facilities_kt_sh.geojson')
df.to_csv (r'data/csv/facilities/social_facilities/social_facilities_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/facilities/social_facilities/social_facilities_kt_sz.geojson')
df.to_csv (r'data/csv/facilities/social_facilities/social_facilities_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/facilities/social_facilities/social_facilities_kt_zg.geojson')
df.to_csv (r'data/csv/facilities/social_facilities/social_facilities_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/facilities/social_facilities/social_facilities_kt_zh.geojson')
df.to_csv (r'data/csv/facilities/social_facilities/social_facilities_kt_zh.csv', index = None)
#Apotheken
df = pd.read_json (r'data/json/pharmacy/pharmacy_dispo_srz.geojson')
df.to_csv (r'data/csv/pharmacy/pharmacy_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/pharmacy/pharmacy_kt_sh.geojson')
df.to_csv (r'data/csv/pharmacy/pharmacy_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/pharmacy/pharmacy_kt_sz.geojson')
df.to_csv (r'data/csv/pharmacy/pharmacy_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/pharmacy/pharmacy_kt_zg.geojson')
df.to_csv (r'data/csv/pharmacy/pharmacy_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/pharmacy/pharmacy_kt_zh.geojson')
df.to_csv (r'data/csv/pharmacy/pharmacy_kt_zh.csv', index = None)
#Polizeiwachen
df = pd.read_json (r'data/json/police_station/police_station_dispo_srz.geojson')
df.to_csv (r'data/csv/police_station/police_station_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/police_station/police_station_kt_sh.geojson')
df.to_csv (r'data/csv/police_station/police_station_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/police_station/police_station_kt_sz.geojson')
df.to_csv (r'data/csv/police_station/police_station_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/police_station/police_station_kt_zg.geojson')
df.to_csv (r'data/csv/police_station/police_station_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/police_station/police_station_kt_zh.geojson')
df.to_csv (r'data/csv/police_station/police_station_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/police_station/police_station_stadt_zh.geojson')
df.to_csv (r'data/csv/police_station/police_station_stadt_zh.csv', index = None)
#Schulen
df = pd.read_json (r'data/json/schools/schools_dispo_srz.geojson')
df.to_csv (r'data/csv/schools/schools_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/schools/schools_kt_sh.geojson')
df.to_csv (r'data/csv/schools/schools_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/schools/schools_kt_sz.geojson')
df.to_csv (r'data/csv/schools/schools_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/schools/schools_kt_zg.geojson')
df.to_csv (r'data/csv/schools/schools_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/schools/schools_kt_zh.geojson')
df.to_csv (r'data/csv/schools/schools_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/schools/schools_stadt_zh.geojson')
df.to_csv (r'data/csv/schools/schools_stadt_zh.csv', index = None)
#Kindergarten
df = pd.read_json (r'data/json/kindergarten/kindergarten_dispo_srz.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/kindergarten/kindergarten_kt_zh.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/kindergarten/kindergarten_kt_sz.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/kindergarten/kindergarten_kt_zg.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/kindergarten/kindergarten_kt_sh.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/kindergarten/kindergarten_stadt_zh.geojson')
df.to_csv (r'data/csv/kindergarten/kindergarten_stadt_zh.csv', index = None)
#Kindergarten
df = pd.read_json (r'data/json/childcare/childcare_dispo_srz.geojson')
df.to_csv (r'data/csv/childcare/childcare_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/childcare/childcare_kt_zh.geojson')
df.to_csv (r'data/csv/childcare/childcare_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/childcare/childcare_kt_sz.geojson')
df.to_csv (r'data/csv/childcare/childcare_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/childcare/childcare_kt_zg.geojson')
df.to_csv (r'data/csv/childcare/childcare_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/childcare/childcare_kt_sh.geojson')
df.to_csv (r'data/csv/childcare/childcare_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/childcare/childcare_stadt_zh.geojson')
df.to_csv (r'data/csv/childcare/childcare_stadt_zh.csv', index = None)
#Impfzentren
df = pd.read_json (r'data/json/vaccination/vaccination_dispo_srz.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_dispo_srz.csv', index = None)
df = pd.read_json (r'data/json/vaccination/vaccination_kt_sh.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_kt_sh.csv', index = None)
df = pd.read_json (r'data/json/vaccination/vaccination_kt_sz.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_kt_sz.csv', index = None)
df = pd.read_json (r'data/json/vaccination/vaccination_kt_zg.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/vaccination/vaccination_kt_zh.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/vaccination/vaccination_switzerland.geojson')
df.to_csv (r'data/csv/vaccination/vaccination_switzerland.csv', index = None)
#Autobahnen
df = pd.read_json (r'data/json/highway/motorway/motorway_dispo_srz.geojson')
df.to_csv (r'data/csv/highway/motorway/motorway_dispo_srz.csv', index = None)
#Autostrassen
df = pd.read_json (r'data/json/highway/trunk/trunk_dispo_srz.geojson')
df.to_csv (r'data/csv/highway/trunk/trunk_dispo_srz.csv', index = None)
#Rettungspunkte
df = pd.read_json (r'data/json/highway/emergency/emergency_access_point_stadt_zh.geojson')
df.to_csv (r'data/csv/highway/emergency/emergency_access_point_stadt_zh.csv', index = None)
#Notfalltreffpunkte
df = pd.read_json (r'data/json/disaster_help_point/disaster_help_point_kt_zh.geojson')
df.to_csv (r'data/csv/disaster_help_point/disaster_help_point_kt_zh.csv', index = None)
df = pd.read_json (r'data/json/disaster_help_point/disaster_help_point_kt_zg.geojson')
df.to_csv (r'data/csv/disaster_help_point/disaster_help_point_kt_zg.csv', index = None)
df = pd.read_json (r'data/json/disaster_help_point/disaster_help_point_kt_sh.geojson')
df.to_csv (r'data/csv/disaster_help_point/disaster_help_point_kt_sh.csv', index = None)