-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnote.json
346 lines (346 loc) · 12.8 KB
/
note.json
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
{
"paragraphs": [
{
"text": "%md\n## Welcome to Zeppelin.\n##### This is a live tutorial, you can run the code yourself. (Shift-Enter to Run)",
"config": {
"colWidth": 12.0,
"graph": {
"mode": "table",
"height": 300.0,
"optionOpen": false,
"keys": [],
"values": [],
"groups": [],
"scatter": {}
},
"editorHide": false
},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1423836981412_-1007008116",
"id": "20150213-231621_168813393",
"result": {
"code": "SUCCESS",
"type": "HTML",
"msg": "\u003ch2\u003eWelcome to Zeppelin.\u003c/h2\u003e\n\u003ch5\u003eThis is a live tutorial, you can run the code yourself. (Shift-Enter to Run)\u003c/h5\u003e\n"
},
"dateCreated": "Feb 13, 2015 11:16:21 PM",
"dateStarted": "May 23, 2015 1:51:22 AM",
"dateFinished": "May 23, 2015 1:51:22 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"title": "Prepare data",
"text": "%sh\nrm ~/bank.zip\nrm -rf ~/data\ncd ~\nwget http://archive.ics.uci.edu/ml/machine-learning-databases/00222/bank.zip\nmkdir data\nunzip bank.zip -d data\nrm bank.zip\n\nhadoop fs -put ~/data/bank-full.csv .\nhadoop fs -ls -h bank-full.csv\n",
"config": {
"colWidth": 12.0,
"graph": {
"mode": "table",
"height": 300.0,
"optionOpen": false,
"keys": [],
"values": [],
"groups": [],
"scatter": {}
},
"title": true,
"tableHide": false
},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1417656535623_-196593192",
"id": "20141204-102855_1590713432",
"result": {
"code": "SUCCESS",
"type": "TEXT",
"msg": "rm: cannot remove `/home/zeppelin/bank.zip\u0027: No such file or directory\n--2015-06-14 08:18:36-- http://archive.ics.uci.edu/ml/machine-learning-databases/00222/bank.zip\nResolving archive.ics.uci.edu... 128.195.1.95\nConnecting to archive.ics.uci.edu|128.195.1.95|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 579043 (565K) [application/zip]\nSaving to: “bank.zip”\n\n 0K .......... .......... .......... .......... .......... 8% 752K 1s\n 50K .......... .......... .......... .......... .......... 17% 757K 1s\n 100K .......... .......... .......... .......... .......... 26% 1.60M 0s\n 150K .......... .......... .......... .......... .......... 35% 1.67M 0s\n 200K .......... .......... .......... .......... .......... 44% 3.12M 0s\n 250K .......... .......... .......... .......... .......... 53% 1.90M 0s\n 300K .......... .......... .......... .......... .......... 61% 10.9M 0s\n 350K .......... .......... .......... .......... .......... 70% 1.55M 0s\n 400K .......... .......... .......... .......... .......... 79% 5.75M 0s\n 450K .......... .......... .......... .......... .......... 88% 1.95M 0s\n 500K .......... .......... .......... .......... .......... 97% 10.5M 0s\n 550K .......... ..... 100% 2.34M\u003d0.3s\n\n2015-06-14 08:18:36 (1.76 MB/s) - “bank.zip” saved [579043/579043]\n\nArchive: bank.zip\n inflating: data/bank-full.csv \n inflating: data/bank-names.txt \n inflating: data/bank.csv \nput: `bank-full.csv\u0027: File exists\n-rw-r--r-- 1 zeppelin zeppelin 4.4 M 2015-06-14 07:13 bank-full.csv\n"
},
"dateCreated": "Dec 4, 2014 10:28:55 AM",
"dateStarted": "Jun 14, 2015 8:18:36 AM",
"dateFinished": "Jun 14, 2015 8:18:40 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"title": "Load data into table",
"text": "//import sys.process._\n// sc is an existing SparkContext.\nval sqlContext \u003d new org.apache.spark.sql.SQLContext(sc)\n\n\nval bankText \u003d sc.textFile(\"bank-full.csv\")\n\ncase class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\n\nval bank \u003d bankText.map(s \u003d\u003e s.split(\";\")).filter(s \u003d\u003e s(0) !\u003d \"\\\"age\\\"\").map(\n s \u003d\u003e Bank(s(0).toInt, \n s(1).replaceAll(\"\\\"\", \"\"),\n s(2).replaceAll(\"\\\"\", \"\"),\n s(3).replaceAll(\"\\\"\", \"\"),\n s(5).replaceAll(\"\\\"\", \"\").toInt\n )\n)\n// toDF() works only in spark 1.3.0.\n// For spark 1.1.x and spark 1.2.x,\n// use below instead:\n// bank.registerTempTable(\"bank\"\nbank.toDF().registerTempTable(\"bank\")\n\n",
"config": {
"colWidth": 12.0,
"graph": {
"mode": "table",
"height": 300.0,
"optionOpen": false,
"keys": [],
"values": [],
"groups": [],
"scatter": {}
},
"title": true,
"tableHide": false
},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1423500779206_-1502780787",
"id": "20150210-015259_1403135953",
"result": {
"code": "SUCCESS",
"type": "TEXT",
"msg": "sqlContext: org.apache.spark.sql.SQLContext \u003d org.apache.spark.sql.SQLContext@2bc81480\nbankText: org.apache.spark.rdd.RDD[String] \u003d bank-full.csv MapPartitionsRDD[42] at textFile at \u003cconsole\u003e:25\ndefined class Bank\nbank: org.apache.spark.rdd.RDD[Bank] \u003d MapPartitionsRDD[45] at map at \u003cconsole\u003e:28\n"
},
"dateCreated": "Feb 10, 2015 1:52:59 AM",
"dateStarted": "Jun 14, 2015 8:19:50 AM",
"dateFinished": "Jun 14, 2015 8:19:50 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"text": "%sql \nselect age, count(1) value\nfrom bank \nwhere age \u003c 30 \ngroup by age \norder by age",
"config": {
"colWidth": 4.0,
"graph": {
"mode": "stackedAreaChart",
"height": 300.0,
"optionOpen": false,
"keys": [
{
"name": "age",
"index": 0.0,
"aggr": "sum"
}
],
"values": [
{
"name": "value",
"index": 1.0,
"aggr": "sum"
}
],
"groups": [],
"scatter": {
"xAxis": {
"name": "age",
"index": 0.0,
"aggr": "sum"
},
"yAxis": {
"name": "value",
"index": 1.0,
"aggr": "sum"
}
}
},
"editorHide": false,
"tableHide": false
},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1423500782552_-1439281894",
"id": "20150210-015302_1492795503",
"result": {
"code": "SUCCESS",
"type": "TABLE",
"msg": "age\tvalue\n18\t12\n19\t35\n20\t50\n21\t79\n22\t129\n23\t202\n24\t302\n25\t527\n26\t805\n27\t909\n28\t1038\n29\t1185\n"
},
"dateCreated": "Feb 10, 2015 1:53:02 AM",
"dateStarted": "Jun 14, 2015 8:19:54 AM",
"dateFinished": "Jun 14, 2015 8:19:56 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"text": "%sql \nselect age, count(1) value \nfrom bank \nwhere age \u003c ${maxAge\u003d30} \ngroup by age \norder by age",
"config": {
"colWidth": 4.0,
"graph": {
"mode": "multiBarChart",
"height": 300.0,
"optionOpen": false,
"keys": [
{
"name": "age",
"index": 0.0,
"aggr": "sum"
}
],
"values": [
{
"name": "value",
"index": 1.0,
"aggr": "sum"
}
],
"groups": [],
"scatter": {
"xAxis": {
"name": "age",
"index": 0.0,
"aggr": "sum"
},
"yAxis": {
"name": "value",
"index": 1.0,
"aggr": "sum"
}
}
}
},
"settings": {
"params": {
"maxAge": "40"
},
"forms": {
"maxAge": {
"name": "maxAge",
"defaultValue": "30",
"hidden": false
}
}
},
"jobName": "paragraph_1423720444030_-1424110477",
"id": "20150212-145404_867439529",
"result": {
"code": "SUCCESS",
"type": "TABLE",
"msg": "age\tvalue\n18\t12\n19\t35\n20\t50\n21\t79\n22\t129\n23\t202\n24\t302\n25\t527\n26\t805\n27\t909\n28\t1038\n29\t1185\n30\t1757\n31\t1996\n32\t2085\n33\t1972\n34\t1930\n35\t1894\n36\t1806\n37\t1696\n38\t1466\n39\t1487\n"
},
"dateCreated": "Feb 12, 2015 2:54:04 PM",
"dateStarted": "Jun 14, 2015 8:19:57 AM",
"dateFinished": "Jun 14, 2015 8:19:59 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"text": "%sql \nselect age, count(1) value \nfrom bank \nwhere marital\u003d\"${marital\u003dsingle,single|divorced|married}\" \ngroup by age \norder by age",
"config": {
"colWidth": 4.0,
"graph": {
"mode": "multiBarChart",
"height": 300.0,
"optionOpen": false,
"keys": [
{
"name": "age",
"index": 0.0,
"aggr": "sum"
}
],
"values": [
{
"name": "value",
"index": 1.0,
"aggr": "sum"
}
],
"groups": [],
"scatter": {
"xAxis": {
"name": "age",
"index": 0.0,
"aggr": "sum"
},
"yAxis": {
"name": "value",
"index": 1.0,
"aggr": "sum"
}
}
}
},
"settings": {
"params": {
"marital": "single"
},
"forms": {
"marital": {
"name": "marital",
"defaultValue": "single",
"options": [
{
"value": "single"
},
{
"value": "divorced"
},
{
"value": "married"
}
],
"hidden": false
}
}
},
"jobName": "paragraph_1423836262027_-210588283",
"id": "20150213-230422_1600658137",
"result": {
"code": "SUCCESS",
"type": "TABLE",
"msg": "age\tvalue\n18\t12\n19\t35\n20\t47\n21\t74\n22\t120\n23\t175\n24\t248\n25\t423\n26\t615\n27\t658\n28\t697\n29\t683\n30\t1012\n31\t1017\n32\t941\n33\t746\n34\t650\n35\t631\n36\t538\n37\t453\n38\t394\n39\t346\n40\t257\n41\t241\n42\t218\n43\t183\n44\t170\n45\t146\n46\t130\n47\t100\n48\t124\n49\t101\n50\t76\n51\t72\n52\t62\n53\t71\n54\t55\n55\t54\n56\t45\n57\t38\n58\t35\n59\t36\n60\t27\n61\t5\n63\t2\n66\t5\n67\t3\n68\t4\n69\t2\n70\t1\n71\t1\n72\t5\n73\t2\n77\t1\n83\t2\n86\t1\n"
},
"dateCreated": "Feb 13, 2015 11:04:22 PM",
"dateStarted": "Jun 14, 2015 8:20:01 AM",
"dateFinished": "Jun 14, 2015 8:20:03 AM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"text": "%md\n## Congratulations, it\u0027s done.\n##### You can create your own notebook in \u0027Notebook\u0027 menu. Good luck!",
"config": {
"colWidth": 12.0,
"graph": {
"mode": "table",
"height": 300.0,
"optionOpen": false,
"keys": [],
"values": [],
"groups": [],
"scatter": {}
},
"editorHide": true
},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1423836268492_216498320",
"id": "20150213-230428_1231780373",
"result": {
"code": "SUCCESS",
"type": "HTML",
"msg": "\u003ch2\u003eCongratulations, it\u0027s done.\u003c/h2\u003e\n\u003ch5\u003eYou can create your own notebook in \u0027Notebook\u0027 menu. Good luck!\u003c/h5\u003e\n"
},
"dateCreated": "Feb 13, 2015 11:04:28 PM",
"dateStarted": "Apr 1, 2015 9:12:18 PM",
"dateFinished": "Apr 1, 2015 9:12:18 PM",
"status": "FINISHED",
"progressUpdateIntervalMs": 500
},
{
"config": {},
"settings": {
"params": {},
"forms": {}
},
"jobName": "paragraph_1427420818407_872443482",
"id": "20150326-214658_12335843",
"dateCreated": "Mar 26, 2015 9:46:58 PM",
"status": "READY",
"progressUpdateIntervalMs": 500
}
],
"name": "Zeppelin Tutorial",
"id": "2A94M5J1Z",
"angularObjects": {},
"config": {
"looknfeel": "default"
},
"info": {}
}