-
Notifications
You must be signed in to change notification settings - Fork 158
/
Copy pathnote.json
1 lines (1 loc) · 70.6 KB
/
note.json
1
{"paragraphs":[{"text":"%md\n## Using Zeppelin for Data Science Tasks: Data Ingestion, Data Formatting, Exploratory Analysis and Model Building.\n\n\nData Science involves a typical sequence of tasks: aquiring data, cleaning it, analyzing it for relationships, and then building a model. Zeppelin allows you to do all these from one unified interface.","dateUpdated":"2015-09-16T12:16:36+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":true,"tableHide":false,"editorMode":"ace/mode/markdown","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433202793823_1738131724","id":"20150601-165313_1826054142","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Using Zeppelin for Data Science Tasks: Data Ingestion, Data Formatting, Exploratory Analysis and Model Building.</h2>\n<p>Data Science involves a typical sequence of tasks: aquiring data, cleaning it, analyzing it for relationships, and then building a model. Zeppelin allows you to do all these from one unified interface.</p>\n"},"dateCreated":"2015-06-01T04:53:13+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:63"},{"text":"%md\n## First, let's load the data into HDFS and make sure we can access it.","dateUpdated":"2015-09-16T12:16:39+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":true,"tableHide":false,"editorMode":"ace/mode/markdown","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433202882496_-475824005","id":"20150601-165442_638366896","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>First, let's load the data into HDFS and make sure we can access it.</h2>\n"},"dateCreated":"2015-06-01T04:54:42+0000","dateStarted":"2015-08-12T11:01:55+0000","dateFinished":"2015-08-12T11:01:55+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:64"},{"text":"%sh\nwhoami\n\ncurl -sSL -O \"https://www.dropbox.com/s/ggj1robwxpl9vrt/iotdemo-notebook-data.zip\"\nunzip iotdemo-notebook-data.zip\n\nhadoop fs -mkdir -p /user/zeppelin/iotdemo\nhadoop fs -copyFromLocal -f trainingData /user/zeppelin/iotdemo/\nhadoop fs -copyFromLocal -f enrichedEvents /user/zeppelin/iotdemo/\n\nhadoop fs -ls /user/zeppelin/iotdemo/","dateUpdated":"2015-09-16T12:16:42+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"tableHide":false,"editorMode":"ace/mode/sh","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1439420411486_-1439319357","id":"20150812-230011_789008868","result":{"code":"SUCCESS","type":"TEXT","msg":"zeppelin\nArchive: iotdemo-notebook-data.zip\n inflating: trainingData \n inflating: enrichedEvents \nFound 2 items\n-rw-r--r-- 1 zeppelin zeppelin 63570 2015-09-16 00:16 /user/zeppelin/iotdemo/enrichedEvents\n-rw-r--r-- 1 zeppelin zeppelin 33084 2015-09-16 00:16 /user/zeppelin/iotdemo/trainingData\n"},"dateCreated":"2015-08-12T11:00:11+0000","dateStarted":"2015-09-16T12:16:42+0000","dateFinished":"2015-09-16T12:16:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:65"},{"text":"%sh\nhadoop fs -cat /user/zeppelin/iotdemo/enrichedEvents | tail -n 10","dateUpdated":"2015-09-16T12:16:59+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/sh"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433203221206_1623100026","id":"20150601-170021_1937004013","result":{"code":"SUCCESS","type":"TEXT","msg":"Overspeed,\"Y\",\"hours\",45,2773,-90.07,35.68,0,1,1\nLane Departure,\"Y\",\"hours\",45,2773,-90.04,35.19,1,1,0\nNormal,\"Y\",\"hours\",45,2773,-90.68,35.12,1,0,0\nNormal,\"Y\",\"hours\",45,2773,-91.14,34.96,0,0,0\nNormal,\"Y\",\"hours\",45,2773,-91.93,34.81,0,0,0\nNormal,\"Y\",\"hours\",45,2773,-92.31,34.78,0,1,0\nNormal,\"Y\",\"hours\",45,2773,-92.09,34.8,0,0,0\nNormal,\"Y\",\"hours\",45,2773,-91.93,34.81,0,0,0\nNormal,\"Y\",\"hours\",45,2773,-90.68,35.12,0,0,0\nNormal,\"Y\",\"hours\",45,2773,-91.74,34.89,0,0,0\n"},"dateCreated":"2015-06-01T05:00:21+0000","dateStarted":"2015-09-16T12:16:59+0000","dateFinished":"2015-09-16T12:17:02+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:66"},{"text":"%md\n## Let's do some Exploratory Data Analysis so that we have a better grasp on the nature of this data set.","dateUpdated":"2015-09-16T12:17:07+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"tableHide":false,"editorHide":true,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433203487236_1092114251","id":"20150601-170447_179499526","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Let's do some Exploratory Data Analysis so that we have a better grasp on the nature of this data set.</h2>\n"},"dateCreated":"2015-06-01T05:04:47+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:67"},{"text":"val sqlContext = new org.apache.spark.sql.SQLContext(sc)\n\nval eventsFile = sc.textFile(\"hdfs:///user/zeppelin/iotdemo/enrichedEvents\")\n\ncase class Event(eventType: String, \n isCertified: String, \n paymentScheme: String, \n hoursDriven: Int, \n milesDriven: Int, \n lat: Float, \n long: Float, \n isFoggy: Int, \n isRainy: Int, \n isWindy: Int)\n\nval eventsRDD = eventsFile.map(s => s.split(\",\")).map(\n s => Event(s(0), //eventType\n s(1).replaceAll(\"\\\"\", \"\"), //isCertified\n s(2).replaceAll(\"\\\"\", \"\"), //paymentScheme\n s(3).toInt, //hoursDriven\n s(4).toInt, //milesDriven\n s(5).toFloat, //latitude\n s(6).toFloat, //longitude\n s(7).toInt, //isFoggy\n s(8).toInt, //isRainy\n s(9).toInt //isWindy\n )\n )\n\n// scaleEvents(s(3).toInt), //hoursDriven\n\n\neventsRDD.count\n\neventsRDD.toDF().registerTempTable(\"enrichedEvents\")\n","dateUpdated":"2015-09-16T12:17:13+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433203808378_-1727850000","id":"20150601-171008_2061583323","result":{"code":"SUCCESS","type":"TEXT","msg":"sqlContext: org.apache.spark.sql.SQLContext = org.apache.spark.sql.SQLContext@1008331\neventsFile: org.apache.spark.rdd.RDD[String] = hdfs:///user/zeppelin/iotdemo/enrichedEvents MapPartitionsRDD[70] at textFile at <console>:24\ndefined class Event\neventsRDD: org.apache.spark.rdd.RDD[Event] = MapPartitionsRDD[72] at map at <console>:28\nres29: Long = 1359\n"},"dateCreated":"2015-06-01T05:10:08+0000","dateStarted":"2015-09-16T12:17:13+0000","dateFinished":"2015-09-16T12:17:15+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:68"},{"text":"%sql\n\nselect * from enrichedEvents order by hoursDriven desc limit 10\n","dateUpdated":"2015-09-16T12:17:27+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":true,"keys":[{"name":"eventType","index":0,"aggr":"sum"}],"values":[{"name":"isCertified","index":1,"aggr":"sum"}],"groups":[],"scatter":{"xAxis":{"name":"eventType","index":0,"aggr":"sum"},"yAxis":{"name":"isCertified","index":1,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433203909729_-294908823","id":"20150601-171149_802050103","result":{"code":"SUCCESS","type":"TABLE","msg":"eventType\tisCertified\tpaymentScheme\thoursDriven\tmilesDriven\tlat\tlong\tisFoggy\tisRainy\tisWindy\nNormal\tN\tmiles\t90\t4300\t-90.29\t40.96\t0\t0\t1\nLane Departure\tN\tmiles\t90\t4300\t-88.42\t41.11\t1\t1\t1\nNormal\tN\tmiles\t90\t4300\t-89.91\t40.86\t0\t0\t0\nOverspeed\tN\tmiles\t90\t4300\t-93.04\t41.71\t1\t0\t0\nUnsafe tail distance\tN\tmiles\t90\t4300\t-87.67\t41.87\t1\t1\t1\nNormal\tN\tmiles\t90\t4300\t-89.52\t40.7\t0\t0\t0\nNormal\tN\tmiles\t90\t4300\t-91.05\t41.72\t0\t0\t1\nNormal\tN\tmiles\t90\t4300\t-91.47\t41.74\t0\t0\t0\nLane Departure\tN\tmiles\t90\t4300\t-91.59\t41.7\t1\t0\t0\nUnsafe following distance\tN\tmiles\t90\t4300\t-88.77\t40.76\t0\t1\t1\n","comment":"","msgTable":[[{"key":"isCertified","value":"Normal"},{"key":"isCertified","value":"N"},{"key":"isCertified","value":"miles"},{"key":"isCertified","value":"90"},{"key":"isCertified","value":"4300"},{"key":"isCertified","value":"-90.29"},{"key":"isCertified","value":"40.96"},{"key":"isCertified","value":"0"},{"key":"isCertified","value":"0"},{"key":"isCertified","value":"1"}],[{"key":"paymentScheme","value":"Lane Departure"},{"key":"paymentScheme","value":"N"},{"key":"paymentScheme","value":"miles"},{"key":"paymentScheme","value":"90"},{"key":"paymentScheme","value":"4300"},{"key":"paymentScheme","value":"-88.42"},{"key":"paymentScheme","value":"41.11"},{"key":"paymentScheme","value":"1"},{"key":"paymentScheme","value":"1"},{"key":"paymentScheme","value":"1"}],[{"key":"hoursDriven","value":"Normal"},{"key":"hoursDriven","value":"N"},{"key":"hoursDriven","value":"miles"},{"key":"hoursDriven","value":"90"},{"key":"hoursDriven","value":"4300"},{"key":"hoursDriven","value":"-89.91"},{"key":"hoursDriven","value":"40.86"},{"key":"hoursDriven","value":"0"},{"key":"hoursDriven","value":"0"},{"key":"hoursDriven","value":"0"}],[{"key":"milesDriven","value":"Overspeed"},{"key":"milesDriven","value":"N"},{"key":"milesDriven","value":"miles"},{"key":"milesDriven","value":"90"},{"key":"milesDriven","value":"4300"},{"key":"milesDriven","value":"-93.04"},{"key":"milesDriven","value":"41.71"},{"key":"milesDriven","value":"1"},{"key":"milesDriven","value":"0"},{"key":"milesDriven","value":"0"}],[{"key":"lat","value":"Unsafe tail distance"},{"key":"lat","value":"N"},{"key":"lat","value":"miles"},{"key":"lat","value":"90"},{"key":"lat","value":"4300"},{"key":"lat","value":"-87.67"},{"key":"lat","value":"41.87"},{"key":"lat","value":"1"},{"key":"lat","value":"1"},{"key":"lat","value":"1"}],[{"key":"long","value":"Normal"},{"key":"long","value":"N"},{"key":"long","value":"miles"},{"key":"long","value":"90"},{"key":"long","value":"4300"},{"key":"long","value":"-89.52"},{"key":"long","value":"40.7"},{"key":"long","value":"0"},{"key":"long","value":"0"},{"key":"long","value":"0"}],[{"key":"isFoggy","value":"Normal"},{"key":"isFoggy","value":"N"},{"key":"isFoggy","value":"miles"},{"key":"isFoggy","value":"90"},{"key":"isFoggy","value":"4300"},{"key":"isFoggy","value":"-91.05"},{"key":"isFoggy","value":"41.72"},{"key":"isFoggy","value":"0"},{"key":"isFoggy","value":"0"},{"key":"isFoggy","value":"1"}],[{"key":"isRainy","value":"Normal"},{"key":"isRainy","value":"N"},{"key":"isRainy","value":"miles"},{"key":"isRainy","value":"90"},{"key":"isRainy","value":"4300"},{"key":"isRainy","value":"-91.47"},{"key":"isRainy","value":"41.74"},{"key":"isRainy","value":"0"},{"key":"isRainy","value":"0"},{"key":"isRainy","value":"0"}],[{"key":"isWindy","value":"Lane Departure"},{"key":"isWindy","value":"N"},{"key":"isWindy","value":"miles"},{"key":"isWindy","value":"90"},{"key":"isWindy","value":"4300"},{"key":"isWindy","value":"-91.59"},{"key":"isWindy","value":"41.7"},{"key":"isWindy","value":"1"},{"key":"isWindy","value":"0"},{"key":"isWindy","value":"0"}],[{"value":"Unsafe following distance"},{"value":"N"},{"value":"miles"},{"value":"90"},{"value":"4300"},{"value":"-88.77"},{"value":"40.76"},{"value":"0"},{"value":"1"},{"value":"1"}]],"columnNames":[{"name":"eventType","index":0,"aggr":"sum"},{"name":"isCertified","index":1,"aggr":"sum"},{"name":"paymentScheme","index":2,"aggr":"sum"},{"name":"hoursDriven","index":3,"aggr":"sum"},{"name":"milesDriven","index":4,"aggr":"sum"},{"name":"lat","index":5,"aggr":"sum"},{"name":"long","index":6,"aggr":"sum"},{"name":"isFoggy","index":7,"aggr":"sum"},{"name":"isRainy","index":8,"aggr":"sum"},{"name":"isWindy","index":9,"aggr":"sum"}],"rows":[["Normal","N","miles","90","4300","-90.29","40.96","0","0","1"],["Lane Departure","N","miles","90","4300","-88.42","41.11","1","1","1"],["Normal","N","miles","90","4300","-89.91","40.86","0","0","0"],["Overspeed","N","miles","90","4300","-93.04","41.71","1","0","0"],["Unsafe tail distance","N","miles","90","4300","-87.67","41.87","1","1","1"],["Normal","N","miles","90","4300","-89.52","40.7","0","0","0"],["Normal","N","miles","90","4300","-91.05","41.72","0","0","1"],["Normal","N","miles","90","4300","-91.47","41.74","0","0","0"],["Lane Departure","N","miles","90","4300","-91.59","41.7","1","0","0"],["Unsafe following distance","N","miles","90","4300","-88.77","40.76","0","1","1"]]},"dateCreated":"2015-06-01T05:11:49+0000","dateStarted":"2015-09-16T12:17:27+0000","dateFinished":"2015-09-16T12:17:27+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:69"},{"text":"%md\n## Do certified drivers have less violations?","dateUpdated":"2015-09-16T12:17:33+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":true,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433204311648_-1956652479","id":"20150601-171831_1908074493","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Do certified drivers have less violations?</h2>\n"},"dateCreated":"2015-06-01T05:18:31+0000","dateStarted":"2015-08-12T11:29:49+0000","dateFinished":"2015-08-12T11:29:49+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:70"},{"text":"%sql\n\nselect eventType, count(*) occurences from enrichedEvents group by eventType","dateUpdated":"2015-09-16T12:17:36+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":false,"keys":[{"name":"eventType","index":0,"aggr":"sum"}],"values":[{"name":"occurences","index":1,"aggr":"sum"}],"groups":[],"scatter":{"xAxis":{"name":"eventType","index":0,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433222577407_-292107706","id":"20150601-222257_227670657","result":{"code":"SUCCESS","type":"TABLE","msg":"eventType\toccurences\nUnsafe tail distance\t38\nOverspeed\t50\nLane Departure\t37\nUnsafe following distance\t34\nNormal\t1200\n","comment":"","msgTable":[[{"key":"occurences","value":"Unsafe tail distance"},{"key":"occurences","value":"38"}],[{"value":"Overspeed"},{"value":"50"}],[{"value":"Lane Departure"},{"value":"37"}],[{"value":"Unsafe following distance"},{"value":"34"}],[{"value":"Normal"},{"value":"1200"}]],"columnNames":[{"name":"eventType","index":0,"aggr":"sum"},{"name":"occurences","index":1,"aggr":"sum"}],"rows":[["Unsafe tail distance","38"],["Overspeed","50"],["Lane Departure","37"],["Unsafe following distance","34"],["Normal","1200"]]},"dateCreated":"2015-06-01T10:22:57+0000","dateStarted":"2015-09-16T12:17:36+0000","dateFinished":"2015-09-16T12:17:38+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:71"},{"text":"%sql\n\nselect isCertified, count(*) numViolations from enrichedEvents where eventType in (\"Unsafe tail distance\", \"Overspeed\", \"Lane Departure\", \"Unsafe following distance\") group by isCertified","dateUpdated":"2015-09-16T12:17:44+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":false,"keys":[{"name":"isCertified","index":0,"aggr":"sum"}],"values":[{"name":"numViolations","index":1,"aggr":"sum"}],"groups":[],"scatter":{"xAxis":{"name":"isCertified","index":0,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433227020120_-559934577","id":"20150601-233700_861079238","result":{"code":"SUCCESS","type":"TABLE","msg":"isCertified\tnumViolations\nN\t62\nY\t97\n","comment":"","msgTable":[[{"key":"numViolations","value":"N"},{"key":"numViolations","value":"62"}],[{"value":"Y"},{"value":"97"}]],"columnNames":[{"name":"isCertified","index":0,"aggr":"sum"},{"name":"numViolations","index":1,"aggr":"sum"}],"rows":[["N","62"],["Y","97"]]},"dateCreated":"2015-06-01T11:37:00+0000","dateStarted":"2015-09-16T12:17:44+0000","dateFinished":"2015-09-16T12:17:47+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:72"},{"text":"%sql\nselect eventType, isCertified, hoursDriven from enrichedEvents group by eventType, isCertified, hoursDriven","dateUpdated":"2015-09-16T12:17:54+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":true,"keys":[{"name":"hoursDriven","index":2,"aggr":"sum","$$hashKey":"object:8654"}],"values":[{"name":"eventType","index":0,"aggr":"sum","$$hashKey":"object:8656"}],"groups":[],"scatter":{"xAxis":{"name":"eventType","index":0,"aggr":"sum"},"yAxis":{"name":"hoursDriven","index":2,"aggr":"sum"},"group":{"name":"hoursDriven","index":2,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433231797674_17315998","id":"20150602-005637_838211375","result":{"code":"SUCCESS","type":"TABLE","msg":"eventType\tisCertified\thoursDriven\nUnsafe tail distance\tN\t90\nOverspeed\tN\t0\nNormal\tY\t45\nNormal\tY\t46\nNormal\tY\t47\nNormal\tY\t48\nNormal\tY\t49\nNormal\tY\t50\nNormal\tY\t51\nNormal\tY\t52\nNormal\tY\t53\nNormal\tY\t54\nNormal\tY\t55\nNormal\tY\t56\nNormal\tY\t57\nNormal\tY\t58\nNormal\tY\t59\nNormal\tY\t60\nLane Departure\tY\t45\nLane Departure\tY\t46\nNormal\tN\t70\nUnsafe following distance\tN\t0\nLane Departure\tY\t49\nLane Departure\tY\t51\nLane Departure\tY\t54\nLane Departure\tY\t56\nLane Departure\tY\t57\nLane Departure\tY\t58\nLane Departure\tY\t60\nLane Departure\tN\t70\nNormal\tN\t90\nOverspeed\tY\t45\nOverspeed\tY\t47\nLane Departure\tN\t90\nOverspeed\tY\t49\nOverspeed\tY\t50\nOverspeed\tY\t51\nOverspeed\tY\t52\nOverspeed\tY\t53\nOverspeed\tY\t55\nOverspeed\tY\t56\nOverspeed\tY\t58\nOverspeed\tY\t59\nOverspeed\tY\t60\nOverspeed\tN\t70\nUnsafe following distance\tY\t45\nUnsafe following distance\tY\t49\nUnsafe following distance\tY\t50\nUnsafe following distance\tY\t51\nUnsafe following distance\tY\t52\nUnsafe following distance\tY\t53\nUnsafe following distance\tY\t55\nUnsafe following distance\tY\t57\nUnsafe following distance\tY\t58\nUnsafe following distance\tY\t59\nUnsafe tail distance\tN\t0\nUnsafe following distance\tN\t70\nOverspeed\tN\t90\nUnsafe following distance\tN\t90\nUnsafe tail distance\tY\t47\nUnsafe tail distance\tY\t49\nUnsafe tail distance\tY\t50\nUnsafe tail distance\tY\t51\nUnsafe tail distance\tY\t52\nNormal\tN\t0\nUnsafe tail distance\tY\t53\nUnsafe tail distance\tY\t55\nUnsafe tail distance\tY\t56\nUnsafe tail distance\tY\t57\nUnsafe tail distance\tY\t59\nUnsafe tail distance\tY\t60\nLane Departure\tN\t0\n","comment":"","msgTable":[[{"key":"isCertified","value":"Unsafe tail distance"},{"key":"isCertified","value":"N"},{"key":"isCertified","value":"90"}],[{"key":"hoursDriven","value":"Overspeed"},{"key":"hoursDriven","value":"N"},{"key":"hoursDriven","value":"0"}],[{"value":"Normal"},{"value":"Y"},{"value":"45"}],[{"value":"Normal"},{"value":"Y"},{"value":"46"}],[{"value":"Normal"},{"value":"Y"},{"value":"47"}],[{"value":"Normal"},{"value":"Y"},{"value":"48"}],[{"value":"Normal"},{"value":"Y"},{"value":"49"}],[{"value":"Normal"},{"value":"Y"},{"value":"50"}],[{"value":"Normal"},{"value":"Y"},{"value":"51"}],[{"value":"Normal"},{"value":"Y"},{"value":"52"}],[{"value":"Normal"},{"value":"Y"},{"value":"53"}],[{"value":"Normal"},{"value":"Y"},{"value":"54"}],[{"value":"Normal"},{"value":"Y"},{"value":"55"}],[{"value":"Normal"},{"value":"Y"},{"value":"56"}],[{"value":"Normal"},{"value":"Y"},{"value":"57"}],[{"value":"Normal"},{"value":"Y"},{"value":"58"}],[{"value":"Normal"},{"value":"Y"},{"value":"59"}],[{"value":"Normal"},{"value":"Y"},{"value":"60"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"45"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"46"}],[{"value":"Normal"},{"value":"N"},{"value":"70"}],[{"value":"Unsafe following distance"},{"value":"N"},{"value":"0"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"49"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"51"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"54"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"56"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"57"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"58"}],[{"value":"Lane Departure"},{"value":"Y"},{"value":"60"}],[{"value":"Lane Departure"},{"value":"N"},{"value":"70"}],[{"value":"Normal"},{"value":"N"},{"value":"90"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"45"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"47"}],[{"value":"Lane Departure"},{"value":"N"},{"value":"90"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"49"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"50"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"51"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"52"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"53"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"55"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"56"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"58"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"59"}],[{"value":"Overspeed"},{"value":"Y"},{"value":"60"}],[{"value":"Overspeed"},{"value":"N"},{"value":"70"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"45"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"49"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"50"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"51"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"52"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"53"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"55"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"57"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"58"}],[{"value":"Unsafe following distance"},{"value":"Y"},{"value":"59"}],[{"value":"Unsafe tail distance"},{"value":"N"},{"value":"0"}],[{"value":"Unsafe following distance"},{"value":"N"},{"value":"70"}],[{"value":"Overspeed"},{"value":"N"},{"value":"90"}],[{"value":"Unsafe following distance"},{"value":"N"},{"value":"90"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"47"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"49"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"50"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"51"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"52"}],[{"value":"Normal"},{"value":"N"},{"value":"0"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"53"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"55"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"56"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"57"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"59"}],[{"value":"Unsafe tail distance"},{"value":"Y"},{"value":"60"}],[{"value":"Lane Departure"},{"value":"N"},{"value":"0"}]],"columnNames":[{"name":"eventType","index":0,"aggr":"sum","$$hashKey":"object:556"},{"name":"isCertified","index":1,"aggr":"sum","$$hashKey":"object:557"},{"name":"hoursDriven","index":2,"aggr":"sum","$$hashKey":"object:558"}],"rows":[["Unsafe tail distance","N","90"],["Overspeed","N","0"],["Normal","Y","45"],["Normal","Y","46"],["Normal","Y","47"],["Normal","Y","48"],["Normal","Y","49"],["Normal","Y","50"],["Normal","Y","51"],["Normal","Y","52"],["Normal","Y","53"],["Normal","Y","54"],["Normal","Y","55"],["Normal","Y","56"],["Normal","Y","57"],["Normal","Y","58"],["Normal","Y","59"],["Normal","Y","60"],["Lane Departure","Y","45"],["Lane Departure","Y","46"],["Normal","N","70"],["Unsafe following distance","N","0"],["Lane Departure","Y","49"],["Lane Departure","Y","51"],["Lane Departure","Y","54"],["Lane Departure","Y","56"],["Lane Departure","Y","57"],["Lane Departure","Y","58"],["Lane Departure","Y","60"],["Lane Departure","N","70"],["Normal","N","90"],["Overspeed","Y","45"],["Overspeed","Y","47"],["Lane Departure","N","90"],["Overspeed","Y","49"],["Overspeed","Y","50"],["Overspeed","Y","51"],["Overspeed","Y","52"],["Overspeed","Y","53"],["Overspeed","Y","55"],["Overspeed","Y","56"],["Overspeed","Y","58"],["Overspeed","Y","59"],["Overspeed","Y","60"],["Overspeed","N","70"],["Unsafe following distance","Y","45"],["Unsafe following distance","Y","49"],["Unsafe following distance","Y","50"],["Unsafe following distance","Y","51"],["Unsafe following distance","Y","52"],["Unsafe following distance","Y","53"],["Unsafe following distance","Y","55"],["Unsafe following distance","Y","57"],["Unsafe following distance","Y","58"],["Unsafe following distance","Y","59"],["Unsafe tail distance","N","0"],["Unsafe following distance","N","70"],["Overspeed","N","90"],["Unsafe following distance","N","90"],["Unsafe tail distance","Y","47"],["Unsafe tail distance","Y","49"],["Unsafe tail distance","Y","50"],["Unsafe tail distance","Y","51"],["Unsafe tail distance","Y","52"],["Normal","N","0"],["Unsafe tail distance","Y","53"],["Unsafe tail distance","Y","55"],["Unsafe tail distance","Y","56"],["Unsafe tail distance","Y","57"],["Unsafe tail distance","Y","59"],["Unsafe tail distance","Y","60"],["Lane Departure","N","0"]]},"dateCreated":"2015-06-02T12:56:37+0000","dateStarted":"2015-09-16T12:17:54+0000","dateFinished":"2015-09-16T12:17:57+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:73"},{"text":"%md \n## Does fatigue cause violations?","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433233880388_-964790890","id":"20150602-013120_170563003","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Does fatigue cause violations?</h2>\n"},"dateCreated":"2015-06-02T01:31:20+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:74"},{"text":"%sql\n\nselect hoursDriven, eventType, count(*) numOccurences from enrichedEvents where eventType not in (\"Normal\") group by hoursDriven, eventType order by hoursDriven\n\n","dateUpdated":"2015-09-16T12:18:03+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":232,"optionOpen":false,"keys":[{"name":"hoursDriven","index":0,"aggr":"sum"}],"values":[{"name":"numOccurences","index":2,"aggr":"count"}],"groups":[],"scatter":{"xAxis":{"name":"hoursDriven","index":0,"aggr":"sum"},"yAxis":{"name":"eventType","index":1,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{"eventType":"Normal"},"forms":{}},"jobName":"paragraph_1433289455598_1340450210","id":"20150602-165735_472251841","result":{"code":"SUCCESS","type":"TABLE","msg":"hoursDriven\teventType\tnumOccurences\n0\tUnsafe tail distance\t12\n0\tOverspeed\t11\n0\tLane Departure\t9\n0\tUnsafe following distance\t8\n45\tOverspeed\t5\n45\tLane Departure\t3\n45\tUnsafe following distance\t1\n46\tLane Departure\t1\n47\tUnsafe tail distance\t2\n47\tOverspeed\t1\n49\tOverspeed\t1\n49\tUnsafe tail distance\t1\n49\tLane Departure\t2\n49\tUnsafe following distance\t4\n50\tOverspeed\t1\n50\tUnsafe following distance\t1\n50\tUnsafe tail distance\t2\n51\tOverspeed\t4\n51\tUnsafe following distance\t5\n51\tLane Departure\t3\n51\tUnsafe tail distance\t2\n52\tUnsafe following distance\t1\n52\tUnsafe tail distance\t2\n52\tOverspeed\t2\n53\tUnsafe following distance\t1\n53\tUnsafe tail distance\t2\n53\tOverspeed\t4\n54\tLane Departure\t2\n55\tUnsafe tail distance\t3\n55\tUnsafe following distance\t5\n55\tOverspeed\t7\n56\tUnsafe tail distance\t2\n56\tOverspeed\t4\n56\tLane Departure\t1\n57\tUnsafe tail distance\t3\n57\tLane Departure\t1\n57\tUnsafe following distance\t2\n58\tLane Departure\t1\n58\tOverspeed\t1\n58\tUnsafe following distance\t1\n59\tUnsafe tail distance\t1\n59\tOverspeed\t1\n59\tUnsafe following distance\t1\n60\tLane Departure\t3\n60\tUnsafe tail distance\t4\n60\tOverspeed\t3\n70\tOverspeed\t1\n70\tLane Departure\t7\n70\tUnsafe following distance\t2\n90\tUnsafe tail distance\t2\n90\tOverspeed\t4\n90\tUnsafe following distance\t2\n90\tLane Departure\t4\n","comment":"","msgTable":[[{"key":"eventType","value":"0"},{"key":"eventType","value":"Unsafe tail distance"},{"key":"eventType","value":"12"}],[{"key":"numOccurences","value":"0"},{"key":"numOccurences","value":"Overspeed"},{"key":"numOccurences","value":"11"}],[{"value":"0"},{"value":"Lane Departure"},{"value":"9"}],[{"value":"0"},{"value":"Unsafe following distance"},{"value":"8"}],[{"value":"45"},{"value":"Overspeed"},{"value":"5"}],[{"value":"45"},{"value":"Lane Departure"},{"value":"3"}],[{"value":"45"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"46"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"47"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"47"},{"value":"Overspeed"},{"value":"1"}],[{"value":"49"},{"value":"Overspeed"},{"value":"1"}],[{"value":"49"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"49"},{"value":"Lane Departure"},{"value":"2"}],[{"value":"49"},{"value":"Unsafe following distance"},{"value":"4"}],[{"value":"50"},{"value":"Overspeed"},{"value":"1"}],[{"value":"50"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"50"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"51"},{"value":"Overspeed"},{"value":"4"}],[{"value":"51"},{"value":"Unsafe following distance"},{"value":"5"}],[{"value":"51"},{"value":"Lane Departure"},{"value":"3"}],[{"value":"51"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"52"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"52"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"52"},{"value":"Overspeed"},{"value":"2"}],[{"value":"53"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"53"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"53"},{"value":"Overspeed"},{"value":"4"}],[{"value":"54"},{"value":"Lane Departure"},{"value":"2"}],[{"value":"55"},{"value":"Unsafe tail distance"},{"value":"3"}],[{"value":"55"},{"value":"Unsafe following distance"},{"value":"5"}],[{"value":"55"},{"value":"Overspeed"},{"value":"7"}],[{"value":"56"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"56"},{"value":"Overspeed"},{"value":"4"}],[{"value":"56"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"57"},{"value":"Unsafe tail distance"},{"value":"3"}],[{"value":"57"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"57"},{"value":"Unsafe following distance"},{"value":"2"}],[{"value":"58"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"58"},{"value":"Overspeed"},{"value":"1"}],[{"value":"58"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"59"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"59"},{"value":"Overspeed"},{"value":"1"}],[{"value":"59"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"60"},{"value":"Lane Departure"},{"value":"3"}],[{"value":"60"},{"value":"Unsafe tail distance"},{"value":"4"}],[{"value":"60"},{"value":"Overspeed"},{"value":"3"}],[{"value":"70"},{"value":"Overspeed"},{"value":"1"}],[{"value":"70"},{"value":"Lane Departure"},{"value":"7"}],[{"value":"70"},{"value":"Unsafe following distance"},{"value":"2"}],[{"value":"90"},{"value":"Unsafe tail distance"},{"value":"2"}],[{"value":"90"},{"value":"Overspeed"},{"value":"4"}],[{"value":"90"},{"value":"Unsafe following distance"},{"value":"2"}],[{"value":"90"},{"value":"Lane Departure"},{"value":"4"}]],"columnNames":[{"name":"hoursDriven","index":0,"aggr":"sum"},{"name":"eventType","index":1,"aggr":"sum"},{"name":"numOccurences","index":2,"aggr":"sum"}],"rows":[["0","Unsafe tail distance","12"],["0","Overspeed","11"],["0","Lane Departure","9"],["0","Unsafe following distance","8"],["45","Overspeed","5"],["45","Lane Departure","3"],["45","Unsafe following distance","1"],["46","Lane Departure","1"],["47","Unsafe tail distance","2"],["47","Overspeed","1"],["49","Overspeed","1"],["49","Unsafe tail distance","1"],["49","Lane Departure","2"],["49","Unsafe following distance","4"],["50","Overspeed","1"],["50","Unsafe following distance","1"],["50","Unsafe tail distance","2"],["51","Overspeed","4"],["51","Unsafe following distance","5"],["51","Lane Departure","3"],["51","Unsafe tail distance","2"],["52","Unsafe following distance","1"],["52","Unsafe tail distance","2"],["52","Overspeed","2"],["53","Unsafe following distance","1"],["53","Unsafe tail distance","2"],["53","Overspeed","4"],["54","Lane Departure","2"],["55","Unsafe tail distance","3"],["55","Unsafe following distance","5"],["55","Overspeed","7"],["56","Unsafe tail distance","2"],["56","Overspeed","4"],["56","Lane Departure","1"],["57","Unsafe tail distance","3"],["57","Lane Departure","1"],["57","Unsafe following distance","2"],["58","Lane Departure","1"],["58","Overspeed","1"],["58","Unsafe following distance","1"],["59","Unsafe tail distance","1"],["59","Overspeed","1"],["59","Unsafe following distance","1"],["60","Lane Departure","3"],["60","Unsafe tail distance","4"],["60","Overspeed","3"],["70","Overspeed","1"],["70","Lane Departure","7"],["70","Unsafe following distance","2"],["90","Unsafe tail distance","2"],["90","Overspeed","4"],["90","Unsafe following distance","2"],["90","Lane Departure","4"]]},"dateCreated":"2015-06-02T04:57:35+0000","dateStarted":"2015-09-16T12:18:03+0000","dateFinished":"2015-09-16T12:18:05+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:75"},{"text":"%sql\n\nSELECT IF(((`enrichedEvents`.`eventType` = 'Lane Departure') OR (`enrichedEvents`.`eventType` = 'Overspeed') OR (`enrichedEvents`.`eventType` = 'Unsafe following distance') OR (`enrichedEvents`.`eventType` = 'Unsafe tail distance')),'Lane Departure',`enrichedEvents`.`eventType`) AS `grouped_events`, `enrichedEvents`.`hoursDriven` AS `none_hoursdriven_ok`, SUM(1) AS `sum_number_of_records_ok` FROM `enrichedEvents` `enrichedEvents` GROUP BY IF(((`enrichedEvents`.`eventType` = 'Lane Departure') OR (`enrichedEvents`.`eventType` = 'Overspeed') OR (`enrichedEvents`.`eventType` = 'Unsafe following distance') OR (`enrichedEvents`.`eventType` = 'Unsafe tail distance')),'Lane Departure',`enrichedEvents`.`eventType`), `enrichedEvents`.`hoursDriven`\n","dateUpdated":"2015-09-16T12:18:10+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":302,"optionOpen":false,"keys":[{"name":"none_hoursdriven_ok","index":1,"aggr":"sum"}],"values":[{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"groups":[{"name":"grouped_events","index":0,"aggr":"sum"}],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"none_hoursdriven_ok","index":1,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433289464470_-681790009","id":"20150602-165744_1812152248","result":{"code":"SUCCESS","type":"TABLE","msg":"grouped_events\tnone_hoursdriven_ok\tsum_number_of_records_ok\nLane Departure\t0\t40\nNormal\t0\t35\nLane Departure\t45\t9\nLane Departure\t46\t1\nLane Departure\t47\t3\nLane Departure\t49\t8\nLane Departure\t50\t4\nLane Departure\t51\t14\nLane Departure\t52\t5\nLane Departure\t53\t7\nLane Departure\t54\t2\nLane Departure\t55\t15\nLane Departure\t56\t7\nLane Departure\t57\t6\nLane Departure\t58\t3\nLane Departure\t59\t3\nLane Departure\t60\t10\nLane Departure\t70\t10\nNormal\t45\t97\nNormal\t46\t13\nNormal\t47\t12\nLane Departure\t90\t12\nNormal\t48\t5\nNormal\t49\t61\nNormal\t50\t53\nNormal\t51\t166\nNormal\t52\t48\nNormal\t53\t88\nNormal\t54\t54\nNormal\t55\t94\nNormal\t56\t73\nNormal\t57\t108\nNormal\t58\t31\nNormal\t59\t48\nNormal\t60\t137\nNormal\t70\t57\nNormal\t90\t20\n","comment":"","msgTable":[[{"key":"none_hoursdriven_ok","value":"Lane Departure"},{"key":"none_hoursdriven_ok","value":"0"},{"key":"none_hoursdriven_ok","value":"40"}],[{"key":"sum_number_of_records_ok","value":"Normal"},{"key":"sum_number_of_records_ok","value":"0"},{"key":"sum_number_of_records_ok","value":"35"}],[{"value":"Lane Departure"},{"value":"45"},{"value":"9"}],[{"value":"Lane Departure"},{"value":"46"},{"value":"1"}],[{"value":"Lane Departure"},{"value":"47"},{"value":"3"}],[{"value":"Lane Departure"},{"value":"49"},{"value":"8"}],[{"value":"Lane Departure"},{"value":"50"},{"value":"4"}],[{"value":"Lane Departure"},{"value":"51"},{"value":"14"}],[{"value":"Lane Departure"},{"value":"52"},{"value":"5"}],[{"value":"Lane Departure"},{"value":"53"},{"value":"7"}],[{"value":"Lane Departure"},{"value":"54"},{"value":"2"}],[{"value":"Lane Departure"},{"value":"55"},{"value":"15"}],[{"value":"Lane Departure"},{"value":"56"},{"value":"7"}],[{"value":"Lane Departure"},{"value":"57"},{"value":"6"}],[{"value":"Lane Departure"},{"value":"58"},{"value":"3"}],[{"value":"Lane Departure"},{"value":"59"},{"value":"3"}],[{"value":"Lane Departure"},{"value":"60"},{"value":"10"}],[{"value":"Lane Departure"},{"value":"70"},{"value":"10"}],[{"value":"Normal"},{"value":"45"},{"value":"97"}],[{"value":"Normal"},{"value":"46"},{"value":"13"}],[{"value":"Normal"},{"value":"47"},{"value":"12"}],[{"value":"Lane Departure"},{"value":"90"},{"value":"12"}],[{"value":"Normal"},{"value":"48"},{"value":"5"}],[{"value":"Normal"},{"value":"49"},{"value":"61"}],[{"value":"Normal"},{"value":"50"},{"value":"53"}],[{"value":"Normal"},{"value":"51"},{"value":"166"}],[{"value":"Normal"},{"value":"52"},{"value":"48"}],[{"value":"Normal"},{"value":"53"},{"value":"88"}],[{"value":"Normal"},{"value":"54"},{"value":"54"}],[{"value":"Normal"},{"value":"55"},{"value":"94"}],[{"value":"Normal"},{"value":"56"},{"value":"73"}],[{"value":"Normal"},{"value":"57"},{"value":"108"}],[{"value":"Normal"},{"value":"58"},{"value":"31"}],[{"value":"Normal"},{"value":"59"},{"value":"48"}],[{"value":"Normal"},{"value":"60"},{"value":"137"}],[{"value":"Normal"},{"value":"70"},{"value":"57"}],[{"value":"Normal"},{"value":"90"},{"value":"20"}]],"columnNames":[{"name":"grouped_events","index":0,"aggr":"sum"},{"name":"none_hoursdriven_ok","index":1,"aggr":"sum"},{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"rows":[["Lane Departure","0","40"],["Normal","0","35"],["Lane Departure","45","9"],["Lane Departure","46","1"],["Lane Departure","47","3"],["Lane Departure","49","8"],["Lane Departure","50","4"],["Lane Departure","51","14"],["Lane Departure","52","5"],["Lane Departure","53","7"],["Lane Departure","54","2"],["Lane Departure","55","15"],["Lane Departure","56","7"],["Lane Departure","57","6"],["Lane Departure","58","3"],["Lane Departure","59","3"],["Lane Departure","60","10"],["Lane Departure","70","10"],["Normal","45","97"],["Normal","46","13"],["Normal","47","12"],["Lane Departure","90","12"],["Normal","48","5"],["Normal","49","61"],["Normal","50","53"],["Normal","51","166"],["Normal","52","48"],["Normal","53","88"],["Normal","54","54"],["Normal","55","94"],["Normal","56","73"],["Normal","57","108"],["Normal","58","31"],["Normal","59","48"],["Normal","60","137"],["Normal","70","57"],["Normal","90","20"]]},"dateCreated":"2015-06-02T04:57:44+0000","dateStarted":"2015-09-16T12:18:10+0000","dateFinished":"2015-09-16T12:18:14+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:76"},{"text":"%sql\n\nSELECT IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType) AS `grouped_events`, isCertified AS num_certified, SUM(1) AS sum_number_of_records FROM enrichedEvents enrichedEvents GROUP BY IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType), isCertified","dateUpdated":"2015-09-16T12:18:19+0000","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":true,"keys":[{"name":"grouped_events","index":0,"aggr":"sum","$$hashKey":"object:8685"}],"values":[{"name":"sum_number_of_records","index":2,"aggr":"sum","$$hashKey":"object:8689"}],"groups":[{"name":"num_certified","index":1,"aggr":"sum","$$hashKey":"object:8687"}],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"num_certified","index":1,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"editorMode":"ace/mode/sql","enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433295544133_-734307154","id":"20150602-183904_189812181","result":{"code":"SUCCESS","type":"TABLE","msg":"grouped_events\tnum_certified\tsum_number_of_records\nLane Departure\tN\t62\nLane Departure\tY\t97\nNormal\tN\t112\nNormal\tY\t1088\n","comment":"","msgTable":[[{"key":"num_certified","value":"Lane Departure"},{"key":"num_certified","value":"N"},{"key":"num_certified","value":"62"}],[{"key":"sum_number_of_records","value":"Lane Departure"},{"key":"sum_number_of_records","value":"Y"},{"key":"sum_number_of_records","value":"97"}],[{"value":"Normal"},{"value":"N"},{"value":"112"}],[{"value":"Normal"},{"value":"Y"},{"value":"1088"}]],"columnNames":[{"name":"grouped_events","index":0,"aggr":"sum","$$hashKey":"object:566"},{"name":"num_certified","index":1,"aggr":"sum","$$hashKey":"object:567"},{"name":"sum_number_of_records","index":2,"aggr":"sum","$$hashKey":"object:568"}],"rows":[["Lane Departure","N","62"],["Lane Departure","Y","97"],["Normal","N","112"],["Normal","Y","1088"]]},"dateCreated":"2015-06-02T06:39:04+0000","dateStarted":"2015-09-16T12:18:19+0000","dateFinished":"2015-09-16T12:18:22+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:77"},{"text":"%md\n## What's the impact of fog on driving?","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":true,"keys":[{"name":"grouped_events","index":0,"aggr":"sum"}],"values":[{"name":"none_hoursdriven_ok","index":1,"aggr":"sum"}],"groups":[],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"none_hoursdriven_ok","index":1,"aggr":"sum"}}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433296656688_187548446","id":"20150602-185736_1176020804","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>What's the impact of fog on driving?</h2>\n"},"dateCreated":"2015-06-02T06:57:36+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:78"},{"text":"%sql\n\n\n\nSELECT IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType) AS `grouped_events`, isFoggy AS `num_foggy`, SUM(1) AS sum_number_of_records FROM enrichedEvents enrichedEvents GROUP BY IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType), isFoggy","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":false,"keys":[{"name":"grouped_events","index":0,"aggr":"sum"}],"values":[{"name":"sum_number_of_records","index":2,"aggr":"sum"}],"groups":[{"name":"num_foggy","index":1,"aggr":"sum"}],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"num_foggy","index":1,"aggr":"sum"}}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433318032982_-1518445662","id":"20150603-005352_2051370027","result":{"code":"SUCCESS","type":"TABLE","msg":"grouped_events\tnum_foggy\tsum_number_of_records\nNormal\t0\t1036\nNormal\t1\t164\nLane Departure\t0\t48\nLane Departure\t1\t111\n","comment":"","msgTable":[[{"key":"num_foggy","value":"Normal"},{"key":"num_foggy","value":"0"},{"key":"num_foggy","value":"1036"}],[{"key":"sum_number_of_records","value":"Normal"},{"key":"sum_number_of_records","value":"1"},{"key":"sum_number_of_records","value":"164"}],[{"value":"Lane Departure"},{"value":"0"},{"value":"48"}],[{"value":"Lane Departure"},{"value":"1"},{"value":"111"}]],"columnNames":[{"name":"grouped_events","index":0,"aggr":"sum"},{"name":"num_foggy","index":1,"aggr":"sum"},{"name":"sum_number_of_records","index":2,"aggr":"sum"}],"rows":[["Normal","0","1036"],["Normal","1","164"],["Lane Departure","0","48"],["Lane Departure","1","111"]]},"dateCreated":"2015-06-03T12:53:52+0000","dateStarted":"2015-08-12T11:31:07+0000","dateFinished":"2015-08-12T11:31:09+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:79"},{"text":"%md \n##What's the impact of rain on driving?","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433345301682_15649197","id":"20150603-082821_53714184","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>What's the impact of rain on driving?</h2>\n"},"dateCreated":"2015-06-03T08:28:21+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:80"},{"text":"%sql\n\nSELECT IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType) AS `grouped_events`, isRainy AS `none_rainy_ok`, SUM(1) AS `sum_number_of_records_ok` FROM enrichedEvents enrichedEvents GROUP BY IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType), isRainy","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":false,"keys":[{"name":"grouped_events","index":0,"aggr":"sum"}],"values":[{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"groups":[{"name":"none_rainy_ok","index":1,"aggr":"sum"}],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"none_rainy_ok","index":1,"aggr":"sum"}}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433373411124_1297893117","id":"20150603-161651_886203277","result":{"code":"SUCCESS","type":"TABLE","msg":"grouped_events\tnone_rainy_ok\tsum_number_of_records_ok\nNormal\t0\t1038\nNormal\t1\t162\nLane Departure\t0\t63\nLane Departure\t1\t96\n","comment":"","msgTable":[[{"key":"none_rainy_ok","value":"Normal"},{"key":"none_rainy_ok","value":"0"},{"key":"none_rainy_ok","value":"1038"}],[{"key":"sum_number_of_records_ok","value":"Normal"},{"key":"sum_number_of_records_ok","value":"1"},{"key":"sum_number_of_records_ok","value":"162"}],[{"value":"Lane Departure"},{"value":"0"},{"value":"63"}],[{"value":"Lane Departure"},{"value":"1"},{"value":"96"}]],"columnNames":[{"name":"grouped_events","index":0,"aggr":"sum"},{"name":"none_rainy_ok","index":1,"aggr":"sum"},{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"rows":[["Normal","0","1038"],["Normal","1","162"],["Lane Departure","0","63"],["Lane Departure","1","96"]]},"dateCreated":"2015-06-03T04:16:51+0000","dateStarted":"2015-08-12T11:31:15+0000","dateFinished":"2015-08-12T11:31:16+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:81"},{"text":"%md\n\n## What's the impact of wind on driving?","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433346694294_-606100092","id":"20150603-085134_652083579","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>What's the impact of wind on driving?</h2>\n"},"dateCreated":"2015-06-03T08:51:34+0000","dateStarted":"2015-08-12T11:01:54+0000","dateFinished":"2015-08-12T11:01:54+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:82"},{"text":"%sql\n\nSELECT IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType) AS `grouped_events`, isWindy AS `none_windy_ok`, SUM(1) AS `sum_number_of_records_ok` FROM enrichedEvents enrichedEvents GROUP BY IF(((eventType = 'Lane Departure') OR (eventType = 'Overspeed') OR (eventType = 'Unsafe following distance') OR (eventType = 'Unsafe tail distance')),'Lane Departure', eventType), isWindy","config":{"colWidth":12,"graph":{"mode":"multiBarChart","height":300,"optionOpen":false,"keys":[{"name":"grouped_events","index":0,"aggr":"sum"}],"values":[{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"groups":[{"name":"none_windy_ok","index":1,"aggr":"sum"}],"scatter":{"xAxis":{"name":"grouped_events","index":0,"aggr":"sum"},"yAxis":{"name":"none_windy_ok","index":1,"aggr":"sum"}}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/sql"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433346901928_1438565001","id":"20150603-085501_2095284086","result":{"code":"SUCCESS","type":"TABLE","msg":"grouped_events\tnone_windy_ok\tsum_number_of_records_ok\nNormal\t0\t891\nNormal\t1\t309\nLane Departure\t0\t108\nLane Departure\t1\t51\n","comment":"","msgTable":[[{"key":"none_windy_ok","value":"Normal"},{"key":"none_windy_ok","value":"0"},{"key":"none_windy_ok","value":"891"}],[{"key":"sum_number_of_records_ok","value":"Normal"},{"key":"sum_number_of_records_ok","value":"1"},{"key":"sum_number_of_records_ok","value":"309"}],[{"value":"Lane Departure"},{"value":"0"},{"value":"108"}],[{"value":"Lane Departure"},{"value":"1"},{"value":"51"}]],"columnNames":[{"name":"grouped_events","index":0,"aggr":"sum"},{"name":"none_windy_ok","index":1,"aggr":"sum"},{"name":"sum_number_of_records_ok","index":2,"aggr":"sum"}],"rows":[["Normal","0","891"],["Normal","1","309"],["Lane Departure","0","108"],["Lane Departure","1","51"]]},"dateCreated":"2015-06-03T08:55:01+0000","dateStarted":"2015-08-12T11:31:23+0000","dateFinished":"2015-08-12T11:31:24+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:83"},{"text":"%md\n\n## Does location have any impact on incidents?","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1434130260374_-1499763657","id":"20150612-103100_302525333","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Does location have any impact on incidents?</h2>\n"},"dateCreated":"2015-06-12T10:31:00+0000","dateStarted":"2015-08-12T11:01:55+0000","dateFinished":"2015-08-12T11:01:55+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:84"},{"text":"%sql\n\nselect lat, long, eventType, isFoggy from enrichedEvents where eventType not in ('Normal') and isFoggy = 1 group by lat, long, eventType, isFoggy ","config":{"colWidth":12,"graph":{"mode":"scatterChart","height":288,"optionOpen":true,"keys":[{"name":"eventType","index":2,"aggr":"sum"}],"values":[{"name":"long","index":1,"aggr":"sum"}],"groups":[{"name":"eventType","index":2,"aggr":"sum"}],"scatter":{"xAxis":{"name":"long","index":1,"aggr":"sum"},"yAxis":{"name":"lat","index":0,"aggr":"sum"},"group":{"name":"isFoggy","index":3,"aggr":"sum"}}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/sql"},"settings":{"params":{"eventType":"Unsafe tail distance"},"forms":{}},"jobName":"paragraph_1433381177597_1963267495","id":"20150603-182617_1986095422","result":{"code":"SUCCESS","type":"TABLE","msg":"lat\tlong\teventType\tisFoggy\n-94.57\t35.37\tOverspeed\t1\n-89.52\t40.7\tLane Departure\t1\n-90.79\t38.83\tUnsafe following distance\t1\n-91.18\t38.22\tUnsafe following distance\t1\n-90.04\t35.19\tLane Departure\t1\n-89.17\t40.38\tUnsafe following distance\t1\n-94.23\t37.09\tLane Departure\t1\n-94.58\t37.03\tUnsafe following distance\t1\n-91.33\t38.87\tLane Departure\t1\n-90.79\t38.83\tOverspeed\t1\n-89.74\t39.1\tUnsafe tail distance\t1\n-89.52\t40.7\tUnsafe following distance\t1\n-89.91\t40.86\tOverspeed\t1\n-90.04\t35.19\tUnsafe following distance\t1\n-94.57\t35.37\tLane Departure\t1\n-90.37\t35.21\tLane Departure\t1\n-88.96\t42.25\tUnsafe tail distance\t1\n-94.23\t37.09\tUnsafe following distance\t1\n-90.82\t41.66\tOverspeed\t1\n-91.33\t38.87\tUnsafe following distance\t1\n-88.42\t41.11\tLane Departure\t1\n-90.64\t41.56\tUnsafe tail distance\t1\n-88.07\t41.48\tUnsafe tail distance\t1\n-92.99\t37.34\tOverspeed\t1\n-94.38\t38.99\tOverspeed\t1\n-89.03\t41.92\tOverspeed\t1\n-94.38\t38.67\tUnsafe tail distance\t1\n-91.94\t41.71\tUnsafe following distance\t1\n-94.57\t35.37\tUnsafe following distance\t1\n-90.04\t35.19\tUnsafe tail distance\t1\n-89.91\t40.86\tLane Departure\t1\n-89.63\t39.84\tOverspeed\t1\n-89.63\t39.84\tUnsafe tail distance\t1\n-91.78\t42.23\tUnsafe following distance\t1\n-92.31\t34.78\tUnsafe tail distance\t1\n-88.42\t41.11\tUnsafe following distance\t1\n-91.33\t38.87\tUnsafe tail distance\t1\n-91.94\t41.71\tOverspeed\t1\n-90.52\t39.71\tOverspeed\t1\n-90.64\t41.56\tLane Departure\t1\n-88.07\t41.48\tLane Departure\t1\n-87.67\t41.87\tOverspeed\t1\n-87.67\t41.87\tUnsafe tail distance\t1\n-94.57\t35.37\tUnsafe tail distance\t1\n-95.99\t36.17\tOverspeed\t1\n-88.02\t42.04\tLane Departure\t1\n-89.03\t41.92\tLane Departure\t1\n-88.96\t42.25\tUnsafe following distance\t1\n-92.4\t41.78\tLane Departure\t1\n-94.28\t39.53\tOverspeed\t1\n-95.5\t36.37\tLane Departure\t1\n-94.28\t39.53\tUnsafe tail distance\t1\n-94.88\t35.47\tOverspeed\t1\n-90.79\t38.83\tUnsafe tail distance\t1\n-89.03\t41.92\tUnsafe following distance\t1\n-89.91\t40.86\tUnsafe tail distance\t1\n-89.8\t35.94\tLane Departure\t1\n-90.34\t38.58\tOverspeed\t1\n-89.71\t37.47\tUnsafe tail distance\t1\n-90.64\t41.56\tOverspeed\t1\n-88.07\t41.48\tOverspeed\t1\n-91.59\t41.7\tLane Departure\t1\n-89.52\t40.7\tOverspeed\t1\n-94.38\t38.67\tOverspeed\t1\n-89.52\t40.7\tUnsafe tail distance\t1\n-90.04\t35.19\tOverspeed\t1\n-89.03\t41.92\tUnsafe tail distance\t1\n-94.88\t35.47\tLane Departure\t1\n-95.99\t36.17\tUnsafe following distance\t1\n-89.54\t36.84\tOverspeed\t1\n-92.31\t34.78\tOverspeed\t1\n-88.77\t40.76\tUnsafe tail distance\t1\n-91.18\t38.22\tLane Departure\t1\n-93.04\t41.71\tOverspeed\t1\n","comment":"","msgTable":[[{"key":"long","value":"-94.57"},{"key":"long","value":"35.37"},{"key":"long","value":"Overspeed"},{"key":"long","value":"1"}],[{"key":"eventType","value":"-89.52"},{"key":"eventType","value":"40.7"},{"key":"eventType","value":"Lane Departure"},{"key":"eventType","value":"1"}],[{"key":"isFoggy","value":"-90.79"},{"key":"isFoggy","value":"38.83"},{"key":"isFoggy","value":"Unsafe following distance"},{"key":"isFoggy","value":"1"}],[{"value":"-91.18"},{"value":"38.22"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-90.04"},{"value":"35.19"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-89.17"},{"value":"40.38"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-94.23"},{"value":"37.09"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-94.58"},{"value":"37.03"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-91.33"},{"value":"38.87"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-90.79"},{"value":"38.83"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.74"},{"value":"39.1"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-89.52"},{"value":"40.7"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-89.91"},{"value":"40.86"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-90.04"},{"value":"35.19"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-94.57"},{"value":"35.37"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-90.37"},{"value":"35.21"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-88.96"},{"value":"42.25"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-94.23"},{"value":"37.09"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-90.82"},{"value":"41.66"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-91.33"},{"value":"38.87"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-88.42"},{"value":"41.11"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-90.64"},{"value":"41.56"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-88.07"},{"value":"41.48"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-92.99"},{"value":"37.34"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-94.38"},{"value":"38.99"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.03"},{"value":"41.92"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-94.38"},{"value":"38.67"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-91.94"},{"value":"41.71"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-94.57"},{"value":"35.37"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-90.04"},{"value":"35.19"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-89.91"},{"value":"40.86"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-89.63"},{"value":"39.84"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.63"},{"value":"39.84"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-91.78"},{"value":"42.23"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-92.31"},{"value":"34.78"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-88.42"},{"value":"41.11"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-91.33"},{"value":"38.87"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-91.94"},{"value":"41.71"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-90.52"},{"value":"39.71"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-90.64"},{"value":"41.56"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-88.07"},{"value":"41.48"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-87.67"},{"value":"41.87"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-87.67"},{"value":"41.87"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-94.57"},{"value":"35.37"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-95.99"},{"value":"36.17"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-88.02"},{"value":"42.04"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-89.03"},{"value":"41.92"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-88.96"},{"value":"42.25"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-92.4"},{"value":"41.78"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-94.28"},{"value":"39.53"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-95.5"},{"value":"36.37"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-94.28"},{"value":"39.53"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-94.88"},{"value":"35.47"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-90.79"},{"value":"38.83"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-89.03"},{"value":"41.92"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-89.91"},{"value":"40.86"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-89.8"},{"value":"35.94"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-90.34"},{"value":"38.58"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.71"},{"value":"37.47"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-90.64"},{"value":"41.56"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-88.07"},{"value":"41.48"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-91.59"},{"value":"41.7"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-89.52"},{"value":"40.7"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-94.38"},{"value":"38.67"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.52"},{"value":"40.7"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-90.04"},{"value":"35.19"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-89.03"},{"value":"41.92"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-94.88"},{"value":"35.47"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-95.99"},{"value":"36.17"},{"value":"Unsafe following distance"},{"value":"1"}],[{"value":"-89.54"},{"value":"36.84"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-92.31"},{"value":"34.78"},{"value":"Overspeed"},{"value":"1"}],[{"value":"-88.77"},{"value":"40.76"},{"value":"Unsafe tail distance"},{"value":"1"}],[{"value":"-91.18"},{"value":"38.22"},{"value":"Lane Departure"},{"value":"1"}],[{"value":"-93.04"},{"value":"41.71"},{"value":"Overspeed"},{"value":"1"}]],"columnNames":[{"name":"lat","index":0,"aggr":"sum","$$hashKey":"object:577"},{"name":"long","index":1,"aggr":"sum","$$hashKey":"object:578"},{"name":"eventType","index":2,"aggr":"sum","$$hashKey":"object:579"},{"name":"isFoggy","index":3,"aggr":"sum","$$hashKey":"object:580"}],"rows":[["-94.57","35.37","Overspeed","1"],["-89.52","40.7","Lane Departure","1"],["-90.79","38.83","Unsafe following distance","1"],["-91.18","38.22","Unsafe following distance","1"],["-90.04","35.19","Lane Departure","1"],["-89.17","40.38","Unsafe following distance","1"],["-94.23","37.09","Lane Departure","1"],["-94.58","37.03","Unsafe following distance","1"],["-91.33","38.87","Lane Departure","1"],["-90.79","38.83","Overspeed","1"],["-89.74","39.1","Unsafe tail distance","1"],["-89.52","40.7","Unsafe following distance","1"],["-89.91","40.86","Overspeed","1"],["-90.04","35.19","Unsafe following distance","1"],["-94.57","35.37","Lane Departure","1"],["-90.37","35.21","Lane Departure","1"],["-88.96","42.25","Unsafe tail distance","1"],["-94.23","37.09","Unsafe following distance","1"],["-90.82","41.66","Overspeed","1"],["-91.33","38.87","Unsafe following distance","1"],["-88.42","41.11","Lane Departure","1"],["-90.64","41.56","Unsafe tail distance","1"],["-88.07","41.48","Unsafe tail distance","1"],["-92.99","37.34","Overspeed","1"],["-94.38","38.99","Overspeed","1"],["-89.03","41.92","Overspeed","1"],["-94.38","38.67","Unsafe tail distance","1"],["-91.94","41.71","Unsafe following distance","1"],["-94.57","35.37","Unsafe following distance","1"],["-90.04","35.19","Unsafe tail distance","1"],["-89.91","40.86","Lane Departure","1"],["-89.63","39.84","Overspeed","1"],["-89.63","39.84","Unsafe tail distance","1"],["-91.78","42.23","Unsafe following distance","1"],["-92.31","34.78","Unsafe tail distance","1"],["-88.42","41.11","Unsafe following distance","1"],["-91.33","38.87","Unsafe tail distance","1"],["-91.94","41.71","Overspeed","1"],["-90.52","39.71","Overspeed","1"],["-90.64","41.56","Lane Departure","1"],["-88.07","41.48","Lane Departure","1"],["-87.67","41.87","Overspeed","1"],["-87.67","41.87","Unsafe tail distance","1"],["-94.57","35.37","Unsafe tail distance","1"],["-95.99","36.17","Overspeed","1"],["-88.02","42.04","Lane Departure","1"],["-89.03","41.92","Lane Departure","1"],["-88.96","42.25","Unsafe following distance","1"],["-92.4","41.78","Lane Departure","1"],["-94.28","39.53","Overspeed","1"],["-95.5","36.37","Lane Departure","1"],["-94.28","39.53","Unsafe tail distance","1"],["-94.88","35.47","Overspeed","1"],["-90.79","38.83","Unsafe tail distance","1"],["-89.03","41.92","Unsafe following distance","1"],["-89.91","40.86","Unsafe tail distance","1"],["-89.8","35.94","Lane Departure","1"],["-90.34","38.58","Overspeed","1"],["-89.71","37.47","Unsafe tail distance","1"],["-90.64","41.56","Overspeed","1"],["-88.07","41.48","Overspeed","1"],["-91.59","41.7","Lane Departure","1"],["-89.52","40.7","Overspeed","1"],["-94.38","38.67","Overspeed","1"],["-89.52","40.7","Unsafe tail distance","1"],["-90.04","35.19","Overspeed","1"],["-89.03","41.92","Unsafe tail distance","1"],["-94.88","35.47","Lane Departure","1"],["-95.99","36.17","Unsafe following distance","1"],["-89.54","36.84","Overspeed","1"],["-92.31","34.78","Overspeed","1"],["-88.77","40.76","Unsafe tail distance","1"],["-91.18","38.22","Lane Departure","1"],["-93.04","41.71","Overspeed","1"]]},"dateCreated":"2015-06-03T06:26:17+0000","dateStarted":"2015-08-12T11:31:30+0000","dateFinished":"2015-08-12T11:31:31+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:85"},{"text":"%md\n\n## Done with data analysis, let's build a regression model to predict violations","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"editorHide":false,"tableHide":false,"enabled":true,"editorMode":"ace/mode/markdown"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1434130319543_1918204365","id":"20150612-103159_813648130","result":{"code":"SUCCESS","type":"HTML","msg":"<h2>Done with data analysis, let's build a regression model to predict violations</h2>\n"},"dateCreated":"2015-06-12T10:31:59+0000","dateStarted":"2015-08-12T11:01:55+0000","dateFinished":"2015-08-12T11:01:55+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:86"},{"text":"import org.apache.spark.mllib.util.MLUtils;\nimport org.apache.spark.mllib.optimization;\nimport org.apache.spark.mllib.classification.LogisticRegressionWithSGD;\nimport org.apache.spark.mllib.optimization.SquaredL2Updater;\nimport org.apache.spark.mllib.evaluation.BinaryClassificationMetrics;\n\n val examples = MLUtils.loadLabeledData(sc,\"hdfs:///user/zeppelin/iotdemo/trainingData\").cache()\n\n val splits = examples.randomSplit(Array(0.8, 0.2))\n val training = splits(0).cache()\n val test = splits(1).cache()\n\n val numTraining = training.count()\n val numTest = test.count()\n println(s\"Training: $numTraining, test: $numTest.\")\n \n val updater = new SquaredL2Updater()\n \n val model = {\n val algorithm = new LogisticRegressionWithSGD()\n algorithm.optimizer.setNumIterations(200).setStepSize(1.0).setUpdater(updater).setRegParam(0.1)\n algorithm.run(training).clearThreshold()\n } \n \n val rprediction = model.predict(test.map(_.features))\n val rpredictionAndLabel = rprediction.zip(test.map(_.label))\n val rmetrics = new BinaryClassificationMetrics(rpredictionAndLabel)\n\n println(\"\\n\");\n println(\"Certification Weight \" + model.weights(0))\n println(\"Wage Plan Weight \" + model.weights(1))\n println(\"Fatigue by Hours Weight \" + model.weights(2))\n println(\"Fatigue by Miles Weight \" + model.weights(3))\n println(\"Foggy weather Weight \" + model.weights(4))\n println(\"Rainy weather Weight \" + model.weights(5))\n println(\"Windy weather Weight \" + model.weights(6))\n println(\"\\n\")\n println(\"Intercept \" + model.intercept)\n println(s\"Test areaUnderPR = ${rmetrics.areaUnderPR()}.\")\n println(s\"Test areaUnderROC = ${rmetrics.areaUnderROC()}.\")","dateUpdated":"2015-09-16T12:18:43+0000","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433346778546_-396503363","id":"20150603-085258_1341928479","result":{"code":"SUCCESS","type":"TEXT","msg":"import org.apache.spark.mllib.util.MLUtils\nimport org.apache.spark.mllib.optimization\nimport org.apache.spark.mllib.classification.LogisticRegressionWithSGD\nimport org.apache.spark.mllib.optimization.SquaredL2Updater\nimport org.apache.spark.mllib.evaluation.BinaryClassificationMetrics\nwarning: there were 1 deprecation warning(s); re-run with -deprecation for details\nexamples: org.apache.spark.rdd.RDD[org.apache.spark.mllib.regression.LabeledPoint] = MapPartitionsRDD[123] at map at MLUtils.scala:214\nsplits: Array[org.apache.spark.rdd.RDD[org.apache.spark.mllib.regression.LabeledPoint]] = Array(PartitionwiseSampledRDD[124] at randomSplit at <console>:31, PartitionwiseSampledRDD[125] at randomSplit at <console>:31)\ntraining: org.apache.spark.rdd.RDD[org.apache.spark.mllib.regression.LabeledPoint] = PartitionwiseSampledRDD[124] at randomSplit at <console>:31\ntest: org.apache.spark.rdd.RDD[org.apache.spark.mllib.regression.LabeledPoint] = PartitionwiseSampledRDD[125] at randomSplit at <console>:31\nnumTraining: Long = 1090\nnumTest: Long = 269\nTraining: 1090, test: 269.\nupdater: org.apache.spark.mllib.optimization.SquaredL2Updater = org.apache.spark.mllib.optimization.SquaredL2Updater@733d9f5f\nmodel: org.apache.spark.mllib.classification.LogisticRegressionModel = (weights=[0.0,0.0,-1.0696997090115388,-0.5326624739600438,0.09417762325888844,0.07260443129982698,-0.40083013794384265], intercept=0.0)\nrprediction: org.apache.spark.rdd.RDD[Double] = MapPartitionsRDD[530] at mapPartitions at GeneralizedLinearAlgorithm.scala:63\nrpredictionAndLabel: org.apache.spark.rdd.RDD[(Double, Double)] = ZippedPartitionsRDD2[532] at zip at <console>:42\nrmetrics: org.apache.spark.mllib.evaluation.BinaryClassificationMetrics = org.apache.spark.mllib.evaluation.BinaryClassificationMetrics@16574ed6\n\n\nCertification Weight 0.0\nWage Plan Weight 0.0\nFatigue by Hours Weight -1.0696997090115388\nFatigue by Miles Weight -0.5326624739600438\nFoggy weather Weight 0.09417762325888844\nRainy weather Weight 0.07260443129982698\nWindy weather Weight -0.40083013794384265\n\n\nIntercept 0.0\nTest areaUnderPR = 0.38286500959082215.\nTest areaUnderROC = 0.6509373394966617.\n"},"dateCreated":"2015-06-03T08:52:58+0000","dateStarted":"2015-09-16T12:18:43+0000","dateFinished":"2015-09-16T12:19:03+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:87"},{"text":"","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"tableHide":false,"editorHide":false,"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1433476111218_1826499704","id":"20150604-204831_1742166011","result":{"code":"SUCCESS","type":"TEXT"},"dateCreated":"2015-06-04T08:48:31+0000","dateStarted":"2015-08-12T11:02:27+0000","dateFinished":"2015-08-12T11:02:46+0000","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:88"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"tableHide":false,"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1439419151828_-1935440169","id":"20150812-223911_1229239436","dateCreated":"2015-08-12T10:39:11+0000","status":"READY","progressUpdateIntervalMs":500,"$$hashKey":"object:89"}],"name":"Demos / IoT / Trucking Data Analysis","id":"2AS5TY6AQ","angularObjects":{},"config":{"looknfeel":"default"},"info":{}}