ソースを参照

[dasksql] Adding NYC taxi data query example

Romain Rigaux 4 年 前
コミット
a86b08813e
1 ファイル変更20 行追加0 行削除
  1. 20 0
      apps/beeswax/data/queries.json

+ 20 - 0
apps/beeswax/data/queries.json

@@ -281,5 +281,25 @@
       "file_resources": [],
       "settings": []
     }
+  },
+  {
+    "name": "New York Taxi dataset Analysis",
+    "desc": "Regular SELECTs with custom Python UDF and create Machine Learning Model",
+    "dialects": ["dasksql"],
+    "type": "2",
+    "auto_load_only": false,
+    "data": {
+      "query": {
+        "query": "\nSELECT\n    FLOOR(trip_distance / 5) * 5 AS \"distance\",\n    AVG(tip_amount) AS \"given tip\",\n    AVG(predict_price(total_amount, trip_distance, passenger_count)) AS \"predicted tip\"\nFROM \"nyc-taxi\"\nWHERE\n    trip_distance > 0 AND trip_distance < 50\nGROUP BY\n    FLOOR(trip_distance / 5) * 5\n;\n",
+        "type": 0,
+        "email_notify": false,
+        "is_parameterized": false,
+        "database": ""
+      },
+      "functions": [],
+      "VERSION": "0.4.1",
+      "file_resources": [],
+      "settings": []
+    }
   }
 ]