diff --git a/notebooks/stride_tests.ipynb b/notebooks/stride_tests.ipynb
new file mode 100644
index 00000000..90d143d6
--- /dev/null
+++ b/notebooks/stride_tests.ipynb
@@ -0,0 +1,5980 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true
+ },
+ "source": [
+ "# Install Stride"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "hidden": true
+ },
+ "source": [
+ "Documentation: https://open-bus-stride-api.hasadna.org.il/docs#/"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:14.232583Z",
+ "start_time": "2022-04-21T11:04:14.224588Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "# !pip install open-bus-stride-client"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:14.248596Z",
+ "start_time": "2022-04-21T11:04:14.236582Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "# !pip install --upgrade open-bus-stride-client"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true
+ },
+ "source": [
+ "# Test1: plot siri_vehicle_locations on a map"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## Imports & Functions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.473662Z",
+ "start_time": "2022-04-21T11:04:14.253571Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "import stride\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "import datetime\n",
+ "from dateutil import tz\n",
+ "\n",
+ "import gmaps\n",
+ "\n",
+ "pd.options.display.max_rows = 1000\n",
+ "pd.options.display.max_columns = 1000\n",
+ "pd.options.display.max_colwidth = 1000\n",
+ "\n",
+ "%matplotlib inline"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.489128Z",
+ "start_time": "2022-04-21T11:04:15.477664Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "# !jupyter nbextension enable --py gmaps\n",
+ "# !jupyter nbextension enable --py widgetsnbextension"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.504653Z",
+ "start_time": "2022-04-21T11:04:15.492130Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "gmaps.configure(api_key='************************')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.520721Z",
+ "start_time": "2022-04-21T11:04:15.507659Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "def localize_dates(data, dt_columns = []):\n",
+ " data = data.copy()\n",
+ " \n",
+ " for c in dt_columns:\n",
+ " data[c] = pd.to_datetime(data[c]).dt.tz_convert('Israel')\n",
+ " \n",
+ " return data"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## get data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.647016Z",
+ "start_time": "2022-04-21T11:04:15.523724Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "dt = datetime.datetime(2022,3, 18, tzinfo=tz.gettz('Israel'))\n",
+ "dt_str = str(dt.date())"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:15.974093Z",
+ "start_time": "2022-04-21T11:04:15.652164Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " date \n",
+ " line_ref \n",
+ " operator_ref \n",
+ " route_short_name \n",
+ " route_long_name \n",
+ " route_mkt \n",
+ " route_direction \n",
+ " route_alternative \n",
+ " agency_name \n",
+ " route_type \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 27269 \n",
+ " 2022-03-18 \n",
+ " 12405 \n",
+ " 3 \n",
+ " 15 \n",
+ " תחנה תפעולית/ביטוח לאומי-ירושלים<->האומן/ברעם-ירושלים-1# \n",
+ " 59015 \n",
+ " 1 \n",
+ " # \n",
+ " אגד \n",
+ " 3 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 27270 \n",
+ " 2022-03-18 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 15 \n",
+ " האומן/ברעם-ירושלים<->שדרות יצחק רבין/נתנאל לורך-ירושלים-2# \n",
+ " 59015 \n",
+ " 2 \n",
+ " # \n",
+ " אגד \n",
+ " 3 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id date line_ref operator_ref route_short_name \\\n",
+ "0 27269 2022-03-18 12405 3 15 \n",
+ "1 27270 2022-03-18 12406 3 15 \n",
+ "\n",
+ " route_long_name route_mkt \\\n",
+ "0 תחנה תפעולית/ביטוח לאומי-ירושלים<->האומן/ברעם-ירושלים-1# 59015 \n",
+ "1 האומן/ברעם-ירושלים<->שדרות יצחק רבין/נתנאל לורך-ירושלים-2# 59015 \n",
+ "\n",
+ " route_direction route_alternative agency_name route_type \n",
+ "0 1 # אגד 3 \n",
+ "1 2 # אגד 3 "
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " date \n",
+ " line_ref \n",
+ " operator_ref \n",
+ " route_short_name \n",
+ " route_long_name \n",
+ " route_mkt \n",
+ " route_direction \n",
+ " route_alternative \n",
+ " agency_name \n",
+ " route_type \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 26837 \n",
+ " 2022-03-18 \n",
+ " 10802 \n",
+ " 3 \n",
+ " 19 \n",
+ " כניסה ראשית/הדסה עין כרם-ירושלים<->מסוף הר הצופים/מרטין בובר-ירושלים-1א \n",
+ " 15019 \n",
+ " 1 \n",
+ " א \n",
+ " אגד \n",
+ " 3 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 26838 \n",
+ " 2022-03-18 \n",
+ " 10804 \n",
+ " 3 \n",
+ " 19 \n",
+ " מסוף הר הצופים/בנימין מזר-ירושלים<->כניסה ראשית/הדסה עין כרם-ירושלים-2# \n",
+ " 15019 \n",
+ " 2 \n",
+ " # \n",
+ " אגד \n",
+ " 3 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 26839 \n",
+ " 2022-03-18 \n",
+ " 10806 \n",
+ " 3 \n",
+ " 19 \n",
+ " מסוף אגד/צביה ויצחק-ירושלים<->כניסה ראשית/הדסה עין כרם-ירושלים-2ב \n",
+ " 15019 \n",
+ " 2 \n",
+ " ב \n",
+ " אגד \n",
+ " 3 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id date line_ref operator_ref route_short_name \\\n",
+ "0 26837 2022-03-18 10802 3 19 \n",
+ "1 26838 2022-03-18 10804 3 19 \n",
+ "2 26839 2022-03-18 10806 3 19 \n",
+ "\n",
+ " route_long_name \\\n",
+ "0 כניסה ראשית/הדסה עין כרם-ירושלים<->מסוף הר הצופים/מרטין בובר-ירושלים-1א \n",
+ "1 מסוף הר הצופים/בנימין מזר-ירושלים<->כניסה ראשית/הדסה עין כרם-ירושלים-2# \n",
+ "2 מסוף אגד/צביה ויצחק-ירושלים<->כניסה ראשית/הדסה עין כרם-ירושלים-2ב \n",
+ "\n",
+ " route_mkt route_direction route_alternative agency_name route_type \n",
+ "0 15019 1 א אגד 3 \n",
+ "1 15019 2 # אגד 3 \n",
+ "2 15019 2 ב אגד 3 "
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "display(pd.DataFrame(stride.get('/gtfs_routes/list', {'route_short_name':15,\n",
+ " 'agency_name': 'אגד',\n",
+ " 'route_long_name_contains': 'ירושלים',\n",
+ " 'date_from': dt_str,\n",
+ " 'date_to': dt_str})))\n",
+ "\n",
+ "\n",
+ "display(pd.DataFrame(stride.get('/gtfs_routes/list', {'route_short_name':19,\n",
+ " 'agency_name': 'אגד',\n",
+ " 'route_long_name_contains': 'ירושלים',\n",
+ " 'date_from': dt_str,\n",
+ " 'date_to': dt_str})))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:30.315960Z",
+ "start_time": "2022-04-21T11:04:15.979051Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(2168, 22)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(2707, 22)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(4875, 22)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 100511354 \n",
+ " 32626 \n",
+ " 48714207 \n",
+ " 2022-03-18T14:41:03+00:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/42 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18T13:30:00+00:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 100452051 \n",
+ " 32605 \n",
+ " 48714207 \n",
+ " 2022-03-18T14:37:07+00:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/38 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18T13:30:00+00:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 100406543 \n",
+ " 32589 \n",
+ " 48714207 \n",
+ " 2022-03-18T14:34:10+00:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/35 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18T13:30:00+00:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 100392511 \n",
+ " 32583 \n",
+ " 48714207 \n",
+ " 2022-03-18T14:32:32+00:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/34 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18T13:30:00+00:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 100375602 \n",
+ " 32578 \n",
+ " 48714207 \n",
+ " 2022-03-18T14:32:32+00:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/33 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18T13:30:00+00:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id siri_snapshot_id siri_ride_stop_id recorded_at_time \\\n",
+ "0 100511354 32626 48714207 2022-03-18T14:41:03+00:00 \n",
+ "1 100452051 32605 48714207 2022-03-18T14:37:07+00:00 \n",
+ "2 100406543 32589 48714207 2022-03-18T14:34:10+00:00 \n",
+ "3 100392511 32583 48714207 2022-03-18T14:32:32+00:00 \n",
+ "4 100375602 32578 48714207 2022-03-18T14:32:32+00:00 \n",
+ "\n",
+ " lon lat bearing velocity distance_from_journey_start \\\n",
+ "0 35.21199 31.744764 210 0 8707 \n",
+ "1 35.21199 31.744764 210 0 8707 \n",
+ "2 35.21199 31.744764 210 0 8707 \n",
+ "3 35.21199 31.744764 210 0 8707 \n",
+ "4 35.21199 31.744764 210 0 8707 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 4867.0 2022/03/18/14/42 \n",
+ "1 4867.0 2022/03/18/14/38 \n",
+ "2 4867.0 2022/03/18/14/35 \n",
+ "3 4867.0 2022/03/18/14/34 \n",
+ "4 4867.0 2022/03/18/14/33 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1080 12406 3 \n",
+ "1 1080 12406 3 \n",
+ "2 1080 12406 3 \n",
+ "3 1080 12406 3 \n",
+ "4 1080 12406 3 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 1904879 2022-03-18-37317044 2022-03-18T13:30:00+00:00 \n",
+ "1 1904879 2022-03-18-37317044 2022-03-18T13:30:00+00:00 \n",
+ "2 1904879 2022-03-18-37317044 2022-03-18T13:30:00+00:00 \n",
+ "3 1904879 2022-03-18-37317044 2022-03-18T13:30:00+00:00 \n",
+ "4 1904879 2022-03-18-37317044 2022-03-18T13:30:00+00:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7813169 99341924 \n",
+ "1 7813169 99341924 \n",
+ "2 7813169 99341924 \n",
+ "3 7813169 99341924 \n",
+ "4 7813169 99341924 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 100511354 74 \n",
+ "1 100511354 74 \n",
+ "2 100511354 74 \n",
+ "3 100511354 74 \n",
+ "4 100511354 74 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 441196.0 \n",
+ "1 441196.0 \n",
+ "2 441196.0 \n",
+ "3 441196.0 \n",
+ "4 441196.0 "
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "siri_vehicle_locations_15 = pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'siri_routes__line_ref': '12406',\n",
+ " 'siri_rides__schedualed_start_time_from': dt,\n",
+ " 'siri_rides__schedualed_start_time_to': dt+datetime.timedelta(days=1),\n",
+ " 'order_by': 'recorded_at_time desc'\n",
+ "}, limit=1000000))\n",
+ "\n",
+ "display(siri_vehicle_locations_15.shape)\n",
+ "\n",
+ "\n",
+ "siri_vehicle_locations_19 = pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'siri_routes__line_ref': '10802',\n",
+ " 'siri_rides__schedualed_start_time_from': dt,\n",
+ " 'siri_rides__schedualed_start_time_to': dt+datetime.timedelta(days=1),\n",
+ " 'order_by': 'recorded_at_time desc'\n",
+ "}, limit=1000000))\n",
+ "\n",
+ "display(siri_vehicle_locations_19.shape)\n",
+ "\n",
+ "\n",
+ "\n",
+ "siri_vehicle_locations = siri_vehicle_locations_15.append(siri_vehicle_locations_19)\n",
+ "\n",
+ "display(siri_vehicle_locations.shape)\n",
+ "\n",
+ "siri_vehicle_locations.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:30.539262Z",
+ "start_time": "2022-04-21T11:04:30.318956Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 100511354 \n",
+ " 32626 \n",
+ " 48714207 \n",
+ " 2022-03-18 16:41:03+02:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/42 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18 15:30:00+02:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 100452051 \n",
+ " 32605 \n",
+ " 48714207 \n",
+ " 2022-03-18 16:37:07+02:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/38 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18 15:30:00+02:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 100406543 \n",
+ " 32589 \n",
+ " 48714207 \n",
+ " 2022-03-18 16:34:10+02:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/35 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18 15:30:00+02:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 100392511 \n",
+ " 32583 \n",
+ " 48714207 \n",
+ " 2022-03-18 16:32:32+02:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/34 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18 15:30:00+02:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 100375602 \n",
+ " 32578 \n",
+ " 48714207 \n",
+ " 2022-03-18 16:32:32+02:00 \n",
+ " 35.21199 \n",
+ " 31.744764 \n",
+ " 210 \n",
+ " 0 \n",
+ " 8707 \n",
+ " 4867.0 \n",
+ " 2022/03/18/14/33 \n",
+ " 1080 \n",
+ " 12406 \n",
+ " 3 \n",
+ " 1904879 \n",
+ " 2022-03-18-37317044 \n",
+ " 2022-03-18 15:30:00+02:00 \n",
+ " 7813169 \n",
+ " 99341924 \n",
+ " 100511354 \n",
+ " 74 \n",
+ " 441196.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id siri_snapshot_id siri_ride_stop_id recorded_at_time \\\n",
+ "0 100511354 32626 48714207 2022-03-18 16:41:03+02:00 \n",
+ "1 100452051 32605 48714207 2022-03-18 16:37:07+02:00 \n",
+ "2 100406543 32589 48714207 2022-03-18 16:34:10+02:00 \n",
+ "3 100392511 32583 48714207 2022-03-18 16:32:32+02:00 \n",
+ "4 100375602 32578 48714207 2022-03-18 16:32:32+02:00 \n",
+ "\n",
+ " lon lat bearing velocity distance_from_journey_start \\\n",
+ "0 35.21199 31.744764 210 0 8707 \n",
+ "1 35.21199 31.744764 210 0 8707 \n",
+ "2 35.21199 31.744764 210 0 8707 \n",
+ "3 35.21199 31.744764 210 0 8707 \n",
+ "4 35.21199 31.744764 210 0 8707 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 4867.0 2022/03/18/14/42 \n",
+ "1 4867.0 2022/03/18/14/38 \n",
+ "2 4867.0 2022/03/18/14/35 \n",
+ "3 4867.0 2022/03/18/14/34 \n",
+ "4 4867.0 2022/03/18/14/33 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1080 12406 3 \n",
+ "1 1080 12406 3 \n",
+ "2 1080 12406 3 \n",
+ "3 1080 12406 3 \n",
+ "4 1080 12406 3 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 1904879 2022-03-18-37317044 2022-03-18 15:30:00+02:00 \n",
+ "1 1904879 2022-03-18-37317044 2022-03-18 15:30:00+02:00 \n",
+ "2 1904879 2022-03-18-37317044 2022-03-18 15:30:00+02:00 \n",
+ "3 1904879 2022-03-18-37317044 2022-03-18 15:30:00+02:00 \n",
+ "4 1904879 2022-03-18-37317044 2022-03-18 15:30:00+02:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7813169 99341924 \n",
+ "1 7813169 99341924 \n",
+ "2 7813169 99341924 \n",
+ "3 7813169 99341924 \n",
+ "4 7813169 99341924 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 100511354 74 \n",
+ "1 100511354 74 \n",
+ "2 100511354 74 \n",
+ "3 100511354 74 \n",
+ "4 100511354 74 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 441196.0 \n",
+ "1 441196.0 \n",
+ "2 441196.0 \n",
+ "3 441196.0 \n",
+ "4 441196.0 "
+ ]
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "### localize dates\n",
+ "\n",
+ "dt_columns = ['recorded_at_time','siri_ride__scheduled_start_time']\n",
+ "\n",
+ "siri_vehicle_locations = localize_dates(siri_vehicle_locations, dt_columns)\n",
+ "\n",
+ "siri_vehicle_locations.head()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-03-05T22:44:22.309839Z",
+ "start_time": "2022-03-05T22:44:22.297843Z"
+ },
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## plot"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:30.585784Z",
+ "start_time": "2022-04-21T11:04:30.545262Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " siri_route__line_ref \n",
+ " 10802 \n",
+ " 12406 \n",
+ " \n",
+ " \n",
+ " siri_ride__scheduled_start_time \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 00:00:00 \n",
+ " NaN \n",
+ " 28.0 \n",
+ " \n",
+ " \n",
+ " 00:10:00 \n",
+ " 49.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 00:20:00 \n",
+ " NaN \n",
+ " 13.0 \n",
+ " \n",
+ " \n",
+ " 00:30:00 \n",
+ " 43.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 01:00:00 \n",
+ " 50.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 01:31:00 \n",
+ " 49.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 01:56:00 \n",
+ " 44.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 05:30:00 \n",
+ " 39.0 \n",
+ " 27.0 \n",
+ " \n",
+ " \n",
+ " 05:45:00 \n",
+ " NaN \n",
+ " 26.0 \n",
+ " \n",
+ " \n",
+ " 05:50:00 \n",
+ " 44.0 \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 06:00:00 \n",
+ " NaN \n",
+ " 25.0 \n",
+ " \n",
+ " \n",
+ " 06:10:00 \n",
+ " 49.0 \n",
+ " 27.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ "siri_route__line_ref 10802 12406\n",
+ "siri_ride__scheduled_start_time \n",
+ "00:00:00 NaN 28.0\n",
+ "00:10:00 49.0 NaN\n",
+ "00:20:00 NaN 13.0\n",
+ "00:30:00 43.0 NaN\n",
+ "01:00:00 50.0 NaN\n",
+ "01:31:00 49.0 NaN\n",
+ "01:56:00 44.0 NaN\n",
+ "05:30:00 39.0 27.0\n",
+ "05:45:00 NaN 26.0\n",
+ "05:50:00 44.0 NaN\n",
+ "06:00:00 NaN 25.0\n",
+ "06:10:00 49.0 27.0"
+ ]
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "siri_vehicle_locations.siri_route__line_ref.groupby(\n",
+ " siri_vehicle_locations.siri_ride__scheduled_start_time.dt.time).value_counts().sort_index().unstack().head(12)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:30.791969Z",
+ "start_time": "2022-04-21T11:04:30.589737Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "103ec70d14bb4fb4a9def5934626fc6f",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Figure(layout=FigureLayout(height='420px'))"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "### filter data for ploting\n",
+ "data2plot = siri_vehicle_locations[siri_vehicle_locations.siri_ride__scheduled_start_time.dt.time.astype(str)=='05:30:00'\n",
+ " ][['siri_ride__scheduled_start_time', 'siri_route__line_ref',\n",
+ " 'id','recorded_at_time','lat','lon']]\n",
+ "\n",
+ "### reset column names\n",
+ "data2plot.rename(columns={'siri_ride__scheduled_start_time': 'scheduled_start_time',\n",
+ " 'siri_route__line_ref': 'line_ref'}, inplace=True)\n",
+ "\n",
+ "### get locations (lat,lon)\n",
+ "locations = data2plot.apply(lambda x: (x.lat, x.lon), axis=1)\n",
+ "\n",
+ "### generate location information data\n",
+ "info_box_template = \"\"\"\n",
+ "\n",
+ "ID {id} \n",
+ "LineRef {line_ref} \n",
+ "ScheduledStartTime {scheduled_start_time} \n",
+ "RecordedAtTime {recorded_at_time} \n",
+ " \n",
+ "\"\"\"\n",
+ "\n",
+ "data2plot_lst = []\n",
+ "\n",
+ "for i in data2plot.index:\n",
+ " d = {}\n",
+ " for c in data2plot.columns:\n",
+ " d[c] = data2plot[c].loc[i]\n",
+ " \n",
+ " data2plot_lst.append(d)\n",
+ "\n",
+ "info = [info_box_template.format(**pt) for pt in data2plot_lst]\n",
+ "\n",
+ "### plot\n",
+ "marker_layer = gmaps.marker_layer(locations, info_box_content=info)\n",
+ "fig = gmaps.figure()\n",
+ "fig.add_layer(marker_layer)\n",
+ "\n",
+ "# heatmap_layer = gmaps.heatmap_layer(locations)\n",
+ "# fig.add_layer(heatmap_layer)\n",
+ "\n",
+ "fig"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-03-01T22:16:05.120545Z",
+ "start_time": "2022-03-01T22:16:04.940648Z"
+ },
+ "heading_collapsed": true
+ },
+ "source": [
+ "# Test2: SIRI raw data vs Stride siri_vehicle_locations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-03-01T22:29:35.451402Z",
+ "start_time": "2022-03-01T22:29:35.427412Z"
+ },
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## Imports & Functions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:04:30.823948Z",
+ "start_time": "2022-04-21T11:04:30.794965Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": [
+ "import pandas as pd\n",
+ "import brotli\n",
+ "import urllib.request\n",
+ "\n",
+ "def extract_siri(yyyy, mm, dd, HH, MM,\n",
+ " base_path = \"https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester\"):\n",
+ " \n",
+ " ### get and extract br file\n",
+ " file_path = f\"{base_path}/{yyyy}/{mm}/{dd}/{HH}/{MM}.br\"\n",
+ " print(file_path)\n",
+ " with urllib.request.urlopen(file_path) as response:\n",
+ " siri_points = eval(brotli.decompress(response.read())\n",
+ " )['Siri']['ServiceDelivery']['StopMonitoringDelivery'][0]['MonitoredStopVisit']\n",
+ " \n",
+ " ### set result df\n",
+ " siri_df = pd.DataFrame(columns=['RecordedAtTime','LineRef','OperatorRef',\n",
+ " 'OriginAimedDepartureTime','Longitude','Latitude',\n",
+ " 'VehicleRef'])\n",
+ " \n",
+ " for i,j in enumerate(siri_points):\n",
+ " siri_df.loc[i] = None\n",
+ " siri_df.loc[i]['RecordedAtTime'] = siri_points[i]['RecordedAtTime']\n",
+ " siri_df.loc[i]['LineRef'] = siri_points[i]['MonitoredVehicleJourney']['LineRef']\n",
+ " siri_df.loc[i]['OperatorRef'] = siri_points[i]['MonitoredVehicleJourney']['OperatorRef']\n",
+ " siri_df.loc[i]['OriginAimedDepartureTime'] = siri_points[i]['MonitoredVehicleJourney']['OriginAimedDepartureTime']\n",
+ " siri_df.loc[i]['VehicleRef'] = siri_points[i]['MonitoredVehicleJourney']['VehicleRef']\n",
+ " \n",
+ " if 'VehicleLocation' in siri_points[i]['MonitoredVehicleJourney']:\n",
+ " siri_df.loc[i]['Longitude'] = siri_points[i]['MonitoredVehicleJourney']['VehicleLocation']['Longitude']\n",
+ " siri_df.loc[i]['Latitude'] = siri_points[i]['MonitoredVehicleJourney']['VehicleLocation']['Latitude']\n",
+ " \n",
+ " ### set dtypes\n",
+ " siri_df['RecordedAtTime'] = pd.to_datetime(siri_df['RecordedAtTime']).dt.tz_convert('Israel')\n",
+ " siri_df['LineRef'] = siri_df['LineRef'].astype(int)\n",
+ " siri_df['OperatorRef'] = siri_df['OperatorRef'].astype(int)\n",
+ " siri_df['OriginAimedDepartureTime'] = pd.to_datetime(siri_df['OriginAimedDepartureTime']).dt.tz_convert('Israel')\n",
+ " siri_df['Longitude'] = siri_df['Longitude'].astype(float)\n",
+ " siri_df['Latitude'] = siri_df['Latitude'].astype(float)\n",
+ " \n",
+ " \n",
+ " return siri_df"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## Get raw data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:06:36.628198Z",
+ "start_time": "2022-04-21T11:04:30.826947Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/00.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(5084, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/01.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(10256, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/02.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(15427, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/03.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(20548, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/04.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(25604, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "https://openbus-stride-public.s3.eu-west-1.amazonaws.com/stride-siri-requester/2022/04/14/09/05.br\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(30603, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 2022-04-14 11:59:39+03:00 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 35.048725 \n",
+ " 32.766769 \n",
+ " 7704369 \n",
+ " 2022/04/14/09/00 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 2022-04-14 11:59:36+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 35.026424 \n",
+ " 32.778793 \n",
+ " 7789069 \n",
+ " 2022/04/14/09/00 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 2022-04-14 11:59:31+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 35.046074 \n",
+ " 32.760738 \n",
+ " 7723769 \n",
+ " 2022/04/14/09/00 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 2022-04-14 11:59:35+03:00 \n",
+ " 10298 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 34.727573 \n",
+ " 31.647406 \n",
+ " 8886401 \n",
+ " 2022/04/14/09/00 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 2022-04-14 11:59:37+03:00 \n",
+ " 10295 \n",
+ " 15 \n",
+ " 2022-04-14 10:30:00+03:00 \n",
+ " 34.593292 \n",
+ " 31.423051 \n",
+ " 77400202 \n",
+ " 2022/04/14/09/00 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef OriginAimedDepartureTime \\\n",
+ "0 2022-04-14 11:59:39+03:00 3916 3 2022-04-14 11:30:00+03:00 \n",
+ "1 2022-04-14 11:59:36+03:00 3918 3 2022-04-14 11:15:00+03:00 \n",
+ "2 2022-04-14 11:59:31+03:00 3918 3 2022-04-14 11:45:00+03:00 \n",
+ "3 2022-04-14 11:59:35+03:00 10298 3 2022-04-14 11:45:00+03:00 \n",
+ "4 2022-04-14 11:59:37+03:00 10295 15 2022-04-14 10:30:00+03:00 \n",
+ "\n",
+ " Longitude Latitude VehicleRef file \n",
+ "0 35.048725 32.766769 7704369 2022/04/14/09/00 \n",
+ "1 35.026424 32.778793 7789069 2022/04/14/09/00 \n",
+ "2 35.046074 32.760738 7723769 2022/04/14/09/00 \n",
+ "3 34.727573 31.647406 8886401 2022/04/14/09/00 \n",
+ "4 34.593292 31.423051 77400202 2022/04/14/09/00 "
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "yyyy = \"2022\"\n",
+ "mm = \"04\"\n",
+ "dd = \"14\"\n",
+ "hour = \"09\"\n",
+ "minutes = [\"00\",\"01\",\"02\",\"03\",\"04\",\"05\"]\n",
+ "\n",
+ "for i in minutes:\n",
+ " \n",
+ " res = extract_siri(yyyy, mm, dd, hour, i)\n",
+ " res['file'] = f\"{yyyy}/{mm}/{dd}/{hour}/{i}\"\n",
+ " \n",
+ " if minutes.index(i) == 0:\n",
+ " siri_source = res.copy()\n",
+ " else:\n",
+ " siri_source = siri_source.append(res)\n",
+ "\n",
+ " display(siri_source.shape)\n",
+ "\n",
+ "siri_source.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:06:36.644193Z",
+ "start_time": "2022-04-21T11:06:36.631221Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "3 8484\n",
+ "5 4021\n",
+ "18 3487\n",
+ "15 2793\n",
+ "25 2052\n",
+ "Name: OperatorRef, dtype: int64"
+ ]
+ },
+ "execution_count": 15,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "siri_source.OperatorRef.value_counts().head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:06:36.756036Z",
+ "start_time": "2022-04-21T11:06:36.649190Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "12:00:00 1150\n",
+ "11:55:00 588\n",
+ "12:02:37 299\n",
+ "12:02:38 263\n",
+ "12:00:38 260\n",
+ "11:59:38 259\n",
+ "11:59:37 247\n",
+ "12:02:36 246\n",
+ "12:03:36 244\n",
+ "12:03:37 243\n",
+ "Name: RecordedAtTime, dtype: int64"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "pd.to_datetime(siri_source.RecordedAtTime).dt.time.value_counts().head(10)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-03-01T22:00:11.254243Z",
+ "start_time": "2022-03-01T22:00:11.203252Z"
+ },
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## Compare with Stride data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:09.521897Z",
+ "start_time": "2022-04-21T11:06:36.759014Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(31410, 22)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 252934168 \n",
+ " 82487 \n",
+ " 122852930 \n",
+ " 2022-04-14T09:00:35+00:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 202 \n",
+ " 32 \n",
+ " 11295 \n",
+ " 16.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 1 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 4809932 \n",
+ " 2022-04-14-16153305 \n",
+ " 2022-04-14T08:30:00+00:00 \n",
+ " 7704369 \n",
+ " 252783045 \n",
+ " 252999811 \n",
+ " 45 \n",
+ " 5077708.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 252934169 \n",
+ " 82487 \n",
+ " 122852931 \n",
+ " 2022-04-14T09:00:40+00:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 284 \n",
+ " 44 \n",
+ " 0 \n",
+ " NaN \n",
+ " 2022/04/14/09/01 \n",
+ " 1 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 4812918 \n",
+ " 2022-04-14-9832116 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 7723569 \n",
+ " 252934169 \n",
+ " 253252540 \n",
+ " 61 \n",
+ " 5077709.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 252934170 \n",
+ " 82487 \n",
+ " 122852932 \n",
+ " 2022-04-14T09:00:33+00:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 282 \n",
+ " 14 \n",
+ " 18801 \n",
+ " 83.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 4808392 \n",
+ " 2022-04-14-10015338 \n",
+ " 2022-04-14T08:15:00+00:00 \n",
+ " 7789069 \n",
+ " 252709213 \n",
+ " 252969506 \n",
+ " 54 \n",
+ " 5069399.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 252934171 \n",
+ " 82487 \n",
+ " 122852933 \n",
+ " 2022-04-14T09:00:38+00:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 18 \n",
+ " 25 \n",
+ " 7052 \n",
+ " 67.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 4810802 \n",
+ " 2022-04-14-10382494 \n",
+ " 2022-04-14T08:45:00+00:00 \n",
+ " 7723769 \n",
+ " 252837167 \n",
+ " 253156752 \n",
+ " 64 \n",
+ " 5067780.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 252934172 \n",
+ " 82487 \n",
+ " 122850738 \n",
+ " 2022-04-14T09:00:40+00:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 250 \n",
+ " 90 \n",
+ " 10908 \n",
+ " 1967.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 3990 \n",
+ " 10298 \n",
+ " 3 \n",
+ " 4810803 \n",
+ " 2022-04-14-12479321 \n",
+ " 2022-04-14T08:45:00+00:00 \n",
+ " 8886401 \n",
+ " 252837168 \n",
+ " 253130028 \n",
+ " 59 \n",
+ " 5107396.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id siri_snapshot_id siri_ride_stop_id recorded_at_time \\\n",
+ "0 252934168 82487 122852930 2022-04-14T09:00:35+00:00 \n",
+ "1 252934169 82487 122852931 2022-04-14T09:00:40+00:00 \n",
+ "2 252934170 82487 122852932 2022-04-14T09:00:33+00:00 \n",
+ "3 252934171 82487 122852933 2022-04-14T09:00:38+00:00 \n",
+ "4 252934172 82487 122850738 2022-04-14T09:00:40+00:00 \n",
+ "\n",
+ " lon lat bearing velocity distance_from_journey_start \\\n",
+ "0 35.050468 32.763882 202 32 11295 \n",
+ "1 35.023163 32.782009 284 44 0 \n",
+ "2 35.023861 32.780495 282 14 18801 \n",
+ "3 35.047249 32.762596 18 25 7052 \n",
+ "4 34.709671 31.645548 250 90 10908 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 16.0 2022/04/14/09/01 \n",
+ "1 NaN 2022/04/14/09/01 \n",
+ "2 83.0 2022/04/14/09/01 \n",
+ "3 67.0 2022/04/14/09/01 \n",
+ "4 1967.0 2022/04/14/09/01 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1 3916 3 \n",
+ "1 1 3916 3 \n",
+ "2 2 3918 3 \n",
+ "3 2 3918 3 \n",
+ "4 3990 10298 3 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 4809932 2022-04-14-16153305 2022-04-14T08:30:00+00:00 \n",
+ "1 4812918 2022-04-14-9832116 2022-04-14T09:00:00+00:00 \n",
+ "2 4808392 2022-04-14-10015338 2022-04-14T08:15:00+00:00 \n",
+ "3 4810802 2022-04-14-10382494 2022-04-14T08:45:00+00:00 \n",
+ "4 4810803 2022-04-14-12479321 2022-04-14T08:45:00+00:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7704369 252783045 \n",
+ "1 7723569 252934169 \n",
+ "2 7789069 252709213 \n",
+ "3 7723769 252837167 \n",
+ "4 8886401 252837168 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 252999811 45 \n",
+ "1 253252540 61 \n",
+ "2 252969506 54 \n",
+ "3 253156752 64 \n",
+ "4 253130028 59 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 5077708.0 \n",
+ "1 5077709.0 \n",
+ "2 5069399.0 \n",
+ "3 5067780.0 \n",
+ "4 5107396.0 "
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "siri_vehicle_locations = pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'recorded_at_time_from': datetime.datetime(int(yyyy),int(mm), int(dd), int(hour), int(minutes[0]),\n",
+ " tzinfo=tz.gettz('UTC')),\n",
+ " 'recorded_at_time_to': datetime.datetime(int(yyyy),int(mm), int(dd), int(hour), int(minutes[len(minutes)-1])+1,\n",
+ " tzinfo=tz.gettz('UTC'))\n",
+ "}, limit=100000))\n",
+ "\n",
+ "display(siri_vehicle_locations.shape)\n",
+ "\n",
+ "siri_vehicle_locations.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:09.631842Z",
+ "start_time": "2022-04-21T11:11:09.524900Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 252934168 \n",
+ " 82487 \n",
+ " 122852930 \n",
+ " 2022-04-14 12:00:35+03:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 202 \n",
+ " 32 \n",
+ " 11295 \n",
+ " 16.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 1 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 4809932 \n",
+ " 2022-04-14-16153305 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 7704369 \n",
+ " 252783045 \n",
+ " 252999811 \n",
+ " 45 \n",
+ " 5077708.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 252934169 \n",
+ " 82487 \n",
+ " 122852931 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 284 \n",
+ " 44 \n",
+ " 0 \n",
+ " NaN \n",
+ " 2022/04/14/09/01 \n",
+ " 1 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 4812918 \n",
+ " 2022-04-14-9832116 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 7723569 \n",
+ " 252934169 \n",
+ " 253252540 \n",
+ " 61 \n",
+ " 5077709.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 252934170 \n",
+ " 82487 \n",
+ " 122852932 \n",
+ " 2022-04-14 12:00:33+03:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 282 \n",
+ " 14 \n",
+ " 18801 \n",
+ " 83.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 4808392 \n",
+ " 2022-04-14-10015338 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 7789069 \n",
+ " 252709213 \n",
+ " 252969506 \n",
+ " 54 \n",
+ " 5069399.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 252934171 \n",
+ " 82487 \n",
+ " 122852933 \n",
+ " 2022-04-14 12:00:38+03:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 18 \n",
+ " 25 \n",
+ " 7052 \n",
+ " 67.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 4810802 \n",
+ " 2022-04-14-10382494 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 7723769 \n",
+ " 252837167 \n",
+ " 253156752 \n",
+ " 64 \n",
+ " 5067780.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 252934172 \n",
+ " 82487 \n",
+ " 122850738 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 250 \n",
+ " 90 \n",
+ " 10908 \n",
+ " 1967.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 3990 \n",
+ " 10298 \n",
+ " 3 \n",
+ " 4810803 \n",
+ " 2022-04-14-12479321 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 8886401 \n",
+ " 252837168 \n",
+ " 253130028 \n",
+ " 59 \n",
+ " 5107396.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " id siri_snapshot_id siri_ride_stop_id recorded_at_time \\\n",
+ "0 252934168 82487 122852930 2022-04-14 12:00:35+03:00 \n",
+ "1 252934169 82487 122852931 2022-04-14 12:00:40+03:00 \n",
+ "2 252934170 82487 122852932 2022-04-14 12:00:33+03:00 \n",
+ "3 252934171 82487 122852933 2022-04-14 12:00:38+03:00 \n",
+ "4 252934172 82487 122850738 2022-04-14 12:00:40+03:00 \n",
+ "\n",
+ " lon lat bearing velocity distance_from_journey_start \\\n",
+ "0 35.050468 32.763882 202 32 11295 \n",
+ "1 35.023163 32.782009 284 44 0 \n",
+ "2 35.023861 32.780495 282 14 18801 \n",
+ "3 35.047249 32.762596 18 25 7052 \n",
+ "4 34.709671 31.645548 250 90 10908 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 16.0 2022/04/14/09/01 \n",
+ "1 NaN 2022/04/14/09/01 \n",
+ "2 83.0 2022/04/14/09/01 \n",
+ "3 67.0 2022/04/14/09/01 \n",
+ "4 1967.0 2022/04/14/09/01 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1 3916 3 \n",
+ "1 1 3916 3 \n",
+ "2 2 3918 3 \n",
+ "3 2 3918 3 \n",
+ "4 3990 10298 3 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 4809932 2022-04-14-16153305 2022-04-14 11:30:00+03:00 \n",
+ "1 4812918 2022-04-14-9832116 2022-04-14 12:00:00+03:00 \n",
+ "2 4808392 2022-04-14-10015338 2022-04-14 11:15:00+03:00 \n",
+ "3 4810802 2022-04-14-10382494 2022-04-14 11:45:00+03:00 \n",
+ "4 4810803 2022-04-14-12479321 2022-04-14 11:45:00+03:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7704369 252783045 \n",
+ "1 7723569 252934169 \n",
+ "2 7789069 252709213 \n",
+ "3 7723769 252837167 \n",
+ "4 8886401 252837168 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 252999811 45 \n",
+ "1 253252540 61 \n",
+ "2 252969506 54 \n",
+ "3 253156752 64 \n",
+ "4 253130028 59 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 5077708.0 \n",
+ "1 5077709.0 \n",
+ "2 5069399.0 \n",
+ "3 5067780.0 \n",
+ "4 5107396.0 "
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "### localize dates\n",
+ "\n",
+ "dt_columns = ['recorded_at_time','siri_ride__scheduled_start_time']\n",
+ "\n",
+ "siri_vehicle_locations = localize_dates(siri_vehicle_locations, dt_columns)\n",
+ "\n",
+ "siri_vehicle_locations.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:12.387015Z",
+ "start_time": "2022-04-21T11:11:09.635836Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(30519, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24391, 8)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24391, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24461, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24461, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 2022-04-14 12:00:35+03:00 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 7704369 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934168.0 \n",
+ " 82487.0 \n",
+ " 122852930.0 \n",
+ " 2022-04-14 12:00:35+03:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 202.0 \n",
+ " 32.0 \n",
+ " 11295.0 \n",
+ " 16.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 1.0 \n",
+ " 3916.0 \n",
+ " 3.0 \n",
+ " 4809932.0 \n",
+ " 2022-04-14-16153305 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 7704369 \n",
+ " 252783045.0 \n",
+ " 252999811.0 \n",
+ " 45.0 \n",
+ " 5077708.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 7723569 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934169.0 \n",
+ " 82487.0 \n",
+ " 122852931.0 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 284.0 \n",
+ " 44.0 \n",
+ " 0.0 \n",
+ " NaN \n",
+ " 2022/04/14/09/01 \n",
+ " 1.0 \n",
+ " 3916.0 \n",
+ " 3.0 \n",
+ " 4812918.0 \n",
+ " 2022-04-14-9832116 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 7723569 \n",
+ " 252934169.0 \n",
+ " 253252540.0 \n",
+ " 61.0 \n",
+ " 5077709.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 2022-04-14 12:00:33+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 7789069 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934170.0 \n",
+ " 82487.0 \n",
+ " 122852932.0 \n",
+ " 2022-04-14 12:00:33+03:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 282.0 \n",
+ " 14.0 \n",
+ " 18801.0 \n",
+ " 83.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2.0 \n",
+ " 3918.0 \n",
+ " 3.0 \n",
+ " 4808392.0 \n",
+ " 2022-04-14-10015338 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 7789069 \n",
+ " 252709213.0 \n",
+ " 252969506.0 \n",
+ " 54.0 \n",
+ " 5069399.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 2022-04-14 12:00:38+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 7723769 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934171.0 \n",
+ " 82487.0 \n",
+ " 122852933.0 \n",
+ " 2022-04-14 12:00:38+03:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 18.0 \n",
+ " 25.0 \n",
+ " 7052.0 \n",
+ " 67.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2.0 \n",
+ " 3918.0 \n",
+ " 3.0 \n",
+ " 4810802.0 \n",
+ " 2022-04-14-10382494 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 7723769 \n",
+ " 252837167.0 \n",
+ " 253156752.0 \n",
+ " 64.0 \n",
+ " 5067780.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 10298 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 8886401 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934172.0 \n",
+ " 82487.0 \n",
+ " 122850738.0 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 250.0 \n",
+ " 90.0 \n",
+ " 10908.0 \n",
+ " 1967.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 3990.0 \n",
+ " 10298.0 \n",
+ " 3.0 \n",
+ " 4810803.0 \n",
+ " 2022-04-14-12479321 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 8886401 \n",
+ " 252837168.0 \n",
+ " 253130028.0 \n",
+ " 59.0 \n",
+ " 5107396.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef OriginAimedDepartureTime \\\n",
+ "0 2022-04-14 12:00:35+03:00 3916 3 2022-04-14 11:30:00+03:00 \n",
+ "1 2022-04-14 12:00:40+03:00 3916 3 2022-04-14 12:00:00+03:00 \n",
+ "2 2022-04-14 12:00:33+03:00 3918 3 2022-04-14 11:15:00+03:00 \n",
+ "3 2022-04-14 12:00:38+03:00 3918 3 2022-04-14 11:45:00+03:00 \n",
+ "4 2022-04-14 12:00:40+03:00 10298 3 2022-04-14 11:45:00+03:00 \n",
+ "\n",
+ " Longitude Latitude VehicleRef file id \\\n",
+ "0 35.050468 32.763882 7704369 2022/04/14/09/01 252934168.0 \n",
+ "1 35.023163 32.782009 7723569 2022/04/14/09/01 252934169.0 \n",
+ "2 35.023861 32.780495 7789069 2022/04/14/09/01 252934170.0 \n",
+ "3 35.047249 32.762596 7723769 2022/04/14/09/01 252934171.0 \n",
+ "4 34.709671 31.645548 8886401 2022/04/14/09/01 252934172.0 \n",
+ "\n",
+ " siri_snapshot_id siri_ride_stop_id recorded_at_time lon \\\n",
+ "0 82487.0 122852930.0 2022-04-14 12:00:35+03:00 35.050468 \n",
+ "1 82487.0 122852931.0 2022-04-14 12:00:40+03:00 35.023163 \n",
+ "2 82487.0 122852932.0 2022-04-14 12:00:33+03:00 35.023861 \n",
+ "3 82487.0 122852933.0 2022-04-14 12:00:38+03:00 35.047249 \n",
+ "4 82487.0 122850738.0 2022-04-14 12:00:40+03:00 34.709671 \n",
+ "\n",
+ " lat bearing velocity distance_from_journey_start \\\n",
+ "0 32.763882 202.0 32.0 11295.0 \n",
+ "1 32.782009 284.0 44.0 0.0 \n",
+ "2 32.780495 282.0 14.0 18801.0 \n",
+ "3 32.762596 18.0 25.0 7052.0 \n",
+ "4 31.645548 250.0 90.0 10908.0 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 16.0 2022/04/14/09/01 \n",
+ "1 NaN 2022/04/14/09/01 \n",
+ "2 83.0 2022/04/14/09/01 \n",
+ "3 67.0 2022/04/14/09/01 \n",
+ "4 1967.0 2022/04/14/09/01 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1.0 3916.0 3.0 \n",
+ "1 1.0 3916.0 3.0 \n",
+ "2 2.0 3918.0 3.0 \n",
+ "3 2.0 3918.0 3.0 \n",
+ "4 3990.0 10298.0 3.0 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 4809932.0 2022-04-14-16153305 2022-04-14 11:30:00+03:00 \n",
+ "1 4812918.0 2022-04-14-9832116 2022-04-14 12:00:00+03:00 \n",
+ "2 4808392.0 2022-04-14-10015338 2022-04-14 11:15:00+03:00 \n",
+ "3 4810802.0 2022-04-14-10382494 2022-04-14 11:45:00+03:00 \n",
+ "4 4810803.0 2022-04-14-12479321 2022-04-14 11:45:00+03:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7704369 252783045.0 \n",
+ "1 7723569 252934169.0 \n",
+ "2 7789069 252709213.0 \n",
+ "3 7723769 252837167.0 \n",
+ "4 8886401 252837168.0 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 252999811.0 45.0 \n",
+ "1 253252540.0 61.0 \n",
+ "2 252969506.0 54.0 \n",
+ "3 253156752.0 64.0 \n",
+ "4 253130028.0 59.0 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 5077708.0 \n",
+ "1 5077709.0 \n",
+ "2 5069399.0 \n",
+ "3 5067780.0 \n",
+ "4 5107396.0 "
+ ]
+ },
+ "execution_count": 19,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "siri_vehicle_locations_key_cols = ['recorded_at_time','siri_route__line_ref',\n",
+ " 'siri_route__operator_ref','siri_ride__scheduled_start_time',\n",
+ " 'lon','lat','siri_ride__vehicle_ref','siri_snapshot__snapshot_id']\n",
+ "\n",
+ "siri_source_key_cols = siri_source.columns.tolist()\n",
+ "\n",
+ "merged = siri_source[(siri_source.RecordedAtTime.dt.time.astype(str).between('12:00:00','12:06:00')) \n",
+ " ].drop_duplicates(subset=siri_source_key_cols\n",
+ " ).merge(siri_vehicle_locations, how = 'left', \n",
+ " left_on=siri_source_key_cols,\n",
+ " right_on=siri_vehicle_locations_key_cols)\n",
+ "\n",
+ "\n",
+ "display(siri_source.drop_duplicates(subset=siri_source_key_cols).shape,\n",
+ " siri_source[(siri_source.RecordedAtTime.dt.time.astype(str).between('12:00:00','12:06:00'))\n",
+ " ].drop_duplicates(subset=siri_source_key_cols).shape,\n",
+ " merged.drop_duplicates(siri_source_key_cols).shape,\n",
+ " merged.drop_duplicates().shape,\n",
+ " merged.shape)\n",
+ "\n",
+ "\n",
+ "merged.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:12.435001Z",
+ "start_time": "2022-04-21T11:11:12.389968Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "0.979"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "round(merged.drop_duplicates(subset=siri_source_key_cols).lon.notnull().mean(),3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:12.752781Z",
+ "start_time": "2022-04-21T11:11:12.437940Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlYAAAFACAYAAAB+wjIEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzsnXd4JFeV9t9b1UHdrZylkSZne4LtGecwHo8DNrZZjMFm8a5hPzKsTViWnPbjY1niArtgdgETDQYDNvaAjXO2Z+zxzHhyHmmkUY7dUqe63x9Vt7qqurrVCq2+ks7veebRdKvUKvXtqnvue957DuOcgyAIgiAIgpg8SqFPgCAIgiAIYrZAgRVBEARBEMQUQYEVQRAEQRDEFEGBFUEQBEEQxBRBgRVBEARBEMQUQYEVQRAEQRDEFEGBFUEQBEEQxBRBgRVBEARBEMQUQYEVQRAEQRDEFOEp1C+urq7mCxcuLNSvJwiCIAiCyJlXXnmlm3NeM9ZxBQusFi5ciO3btxfq1xMEQRAEQeQMY+xELsdRKpAgCIIgCGKKoMCKIAiCIAhiiqDAiiAIgiAIYoqgwIogCIIgCGKKoMCKIAiCIAhiiqDAiiAIgiAIYoqgwIogCIIgCGKKGDOwYoz9hDHWyRh7PcP3GWPsu4yxw4yxXYyxs6f+NAmCIAiCIOQnF8XqbgDXZPn+GwAsM/69B8APJn9aBEEQBEEQM48xK69zzp9mjC3McsiNAH7OOecAXmSMlTPGGjjn7VN0jhOipTeCpw914bo1DSgP+gAAnHP89fXT6B+Ju/5MaZEX166pB2MMO072Yf/pobRjNi6swNLaEkQTSWzd3Y7RuDYl59tQVoRNK2oBAE8e6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OLEyMzMzq4kTKzMzM7Oa/D+EkoVhsOnpSgAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "merged.drop_duplicates(siri_source_key_cols).lon.notnull().groupby(\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).RecordedAtTime.dt.time).mean(\n",
+ " ).plot(figsize=(10,5))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:12.879736Z",
+ "start_time": "2022-04-21T11:11:12.755757Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " count \n",
+ " mean \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " RecordedAtTime \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 12 \n",
+ " 0 \n",
+ " 5990 \n",
+ " 0.982 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 4896 \n",
+ " 0.979 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 4769 \n",
+ " 0.978 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 4611 \n",
+ " 0.978 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 4125 \n",
+ " 0.976 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " count mean\n",
+ "RecordedAtTime RecordedAtTime \n",
+ "12 0 5990 0.982\n",
+ " 1 4896 0.979\n",
+ " 2 4769 0.978\n",
+ " 3 4611 0.978\n",
+ " 4 4125 0.976"
+ ]
+ },
+ "execution_count": 22,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged.drop_duplicates(siri_source_key_cols).lon.notnull().groupby(\n",
+ " [merged.drop_duplicates(subset=siri_source_key_cols).RecordedAtTime.dt.hour,\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).RecordedAtTime.dt.minute]).agg(['count','mean']\n",
+ " ).round(3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:12.975706Z",
+ "start_time": "2022-04-21T11:11:12.887736Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count \n",
+ " mean \n",
+ " \n",
+ " \n",
+ " OperatorRef \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 6936 \n",
+ " 0.995 \n",
+ " \n",
+ " \n",
+ " 5 \n",
+ " 2978 \n",
+ " 0.993 \n",
+ " \n",
+ " \n",
+ " 18 \n",
+ " 2829 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 15 \n",
+ " 2223 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 25 \n",
+ " 1617 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 16 \n",
+ " 1594 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 14 \n",
+ " 957 \n",
+ " 0.990 \n",
+ " \n",
+ " \n",
+ " 31 \n",
+ " 821 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 32 \n",
+ " 650 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 495 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 34 \n",
+ " 426 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 6 \n",
+ " 415 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 7 \n",
+ " 364 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 35 \n",
+ " 338 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 37 \n",
+ " 272 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 23 \n",
+ " 251 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 220 \n",
+ " 0.000 \n",
+ " \n",
+ " \n",
+ " 42 \n",
+ " 145 \n",
+ " 0.966 \n",
+ " \n",
+ " \n",
+ " 8 \n",
+ " 136 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 92 \n",
+ " 102 \n",
+ " 0.176 \n",
+ " \n",
+ " \n",
+ " 45 \n",
+ " 101 \n",
+ " 0.842 \n",
+ " \n",
+ " \n",
+ " 24 \n",
+ " 89 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 44 \n",
+ " 84 \n",
+ " 0.940 \n",
+ " \n",
+ " \n",
+ " 50 \n",
+ " 62 \n",
+ " 0.548 \n",
+ " \n",
+ " \n",
+ " 47 \n",
+ " 60 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 97 \n",
+ " 60 \n",
+ " 0.250 \n",
+ " \n",
+ " \n",
+ " 49 \n",
+ " 48 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ " 98 \n",
+ " 34 \n",
+ " 0.765 \n",
+ " \n",
+ " \n",
+ " 91 \n",
+ " 30 \n",
+ " 0.500 \n",
+ " \n",
+ " \n",
+ " 51 \n",
+ " 28 \n",
+ " 0.821 \n",
+ " \n",
+ " \n",
+ " 93 \n",
+ " 21 \n",
+ " 0.286 \n",
+ " \n",
+ " \n",
+ " 10 \n",
+ " 5 \n",
+ " 1.000 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " count mean\n",
+ "OperatorRef \n",
+ "3 6936 0.995\n",
+ "5 2978 0.993\n",
+ "18 2829 1.000\n",
+ "15 2223 1.000\n",
+ "25 1617 1.000\n",
+ "16 1594 1.000\n",
+ "14 957 0.990\n",
+ "31 821 1.000\n",
+ "32 650 1.000\n",
+ "4 495 1.000\n",
+ "34 426 1.000\n",
+ "6 415 1.000\n",
+ "7 364 1.000\n",
+ "35 338 1.000\n",
+ "37 272 1.000\n",
+ "23 251 1.000\n",
+ "2 220 0.000\n",
+ "42 145 0.966\n",
+ "8 136 1.000\n",
+ "92 102 0.176\n",
+ "45 101 0.842\n",
+ "24 89 1.000\n",
+ "44 84 0.940\n",
+ "50 62 0.548\n",
+ "47 60 1.000\n",
+ "97 60 0.250\n",
+ "49 48 1.000\n",
+ "98 34 0.765\n",
+ "91 30 0.500\n",
+ "51 28 0.821\n",
+ "93 21 0.286\n",
+ "10 5 1.000"
+ ]
+ },
+ "execution_count": 23,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged.drop_duplicates(siri_source_key_cols).lon.notnull().groupby(\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).OperatorRef).agg(['count','mean']\n",
+ " ).round(3).sort_values(by='count', ascending=False)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:13.007789Z",
+ "start_time": "2022-04-21T11:11:12.979683Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "08:59:00 5\n",
+ "09:28:00 5\n",
+ "09:32:00 3\n",
+ "09:48:00 10\n",
+ "09:50:00 5\n",
+ "10:03:00 5\n",
+ "10:15:00 10\n",
+ "10:18:00 5\n",
+ "10:37:00 5\n",
+ "10:42:00 15\n",
+ "10:45:00 5\n",
+ "10:48:00 10\n",
+ "10:50:00 15\n",
+ "10:55:00 5\n",
+ "10:57:00 5\n",
+ "11:02:00 5\n",
+ "11:03:00 5\n",
+ "11:04:59 5\n",
+ "11:06:00 5\n",
+ "11:07:00 15\n",
+ "11:12:00 5\n",
+ "11:13:00 3\n",
+ "11:15:00 5\n",
+ "11:17:00 5\n",
+ "11:17:59 4\n",
+ "11:18:00 5\n",
+ "11:20:00 6\n",
+ "11:21:00 5\n",
+ "11:23:14 5\n",
+ "11:25:00 5\n",
+ "11:27:00 10\n",
+ "11:29:44 5\n",
+ "11:30:00 3\n",
+ "11:31:00 5\n",
+ "11:32:00 10\n",
+ "11:33:00 10\n",
+ "11:36:00 1\n",
+ "11:36:15 5\n",
+ "11:37:00 10\n",
+ "11:37:43 3\n",
+ "11:39:00 5\n",
+ "11:40:00 21\n",
+ "11:41:00 10\n",
+ "11:42:00 10\n",
+ "11:44:55 5\n",
+ "11:45:00 5\n",
+ "11:45:52 5\n",
+ "11:46:00 10\n",
+ "11:47:00 5\n",
+ "11:48:00 15\n",
+ "11:48:49 5\n",
+ "11:49:00 10\n",
+ "11:49:30 5\n",
+ "11:50:00 20\n",
+ "11:51:00 7\n",
+ "11:53:00 5\n",
+ "11:54:00 5\n",
+ "11:55:00 5\n",
+ "11:56:00 10\n",
+ "11:57:00 5\n",
+ "11:57:25 5\n",
+ "11:59:00 10\n",
+ "11:59:33 5\n",
+ "12:00:00 10\n",
+ "12:01:00 4\n",
+ "12:02:00 3\n",
+ "12:02:44 2\n",
+ "12:03:00 6\n",
+ "12:05:00 1\n",
+ "12:06:00 10\n",
+ "12:07:00 5\n",
+ "12:12:00 15\n",
+ "12:15:00 5\n",
+ "12:18:00 5\n",
+ "12:20:00 5\n",
+ "Name: OriginAimedDepartureTime, dtype: int64"
+ ]
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged[(merged.recorded_at_time.isnull())].OriginAimedDepartureTime.dt.time.value_counts().sort_index()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "hidden": true
+ },
+ "source": [
+ "**The overall match rate between SIRI source and the DB is 98% (large operators match rate is even higher)**"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "heading_collapsed": true,
+ "hidden": true
+ },
+ "source": [
+ "## Missing Rows Deep Dive"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:13.103711Z",
+ "start_time": "2022-04-21T11:11:13.010784Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 1815 \n",
+ " 2022-04-14 12:00:13+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771492 \n",
+ " 31.815269 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/01 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 6599 \n",
+ " 2022-04-14 12:01:11+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771095 \n",
+ " 31.815252 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/02 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 11583 \n",
+ " 2022-04-14 12:02:36+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771450 \n",
+ " 31.816154 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/03 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 16566 \n",
+ " 2022-04-14 12:03:30+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.774731 \n",
+ " 31.818487 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/04 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 21515 \n",
+ " 2022-04-14 12:04:40+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.775620 \n",
+ " 31.820726 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/05 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 1916 \n",
+ " 2022-04-14 12:00:45+03:00 \n",
+ " 29246 \n",
+ " 91 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.745441 \n",
+ " 32.017395 \n",
+ " 8703126 \n",
+ " 2022/04/14/09/01 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 6709 \n",
+ " 2022-04-14 12:01:57+03:00 \n",
+ " 29246 \n",
+ " 91 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.747719 \n",
+ " 32.016590 \n",
+ " 8703126 \n",
+ " 2022/04/14/09/02 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 11697 \n",
+ " 2022-04-14 12:02:56+03:00 \n",
+ " 29246 \n",
+ " 91 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.747379 \n",
+ " 32.012444 \n",
+ " 8703126 \n",
+ " 2022/04/14/09/03 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 16680 \n",
+ " 2022-04-14 12:03:52+03:00 \n",
+ " 29246 \n",
+ " 91 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.750046 \n",
+ " 32.012291 \n",
+ " 8703126 \n",
+ " 2022/04/14/09/04 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 21629 \n",
+ " 2022-04-14 12:04:40+03:00 \n",
+ " 29246 \n",
+ " 91 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.752792 \n",
+ " 32.013870 \n",
+ " 8703126 \n",
+ " 2022/04/14/09/05 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef \\\n",
+ "1815 2022-04-14 12:00:13+03:00 2974 3 \n",
+ "6599 2022-04-14 12:01:11+03:00 2974 3 \n",
+ "11583 2022-04-14 12:02:36+03:00 2974 3 \n",
+ "16566 2022-04-14 12:03:30+03:00 2974 3 \n",
+ "21515 2022-04-14 12:04:40+03:00 2974 3 \n",
+ "1916 2022-04-14 12:00:45+03:00 29246 91 \n",
+ "6709 2022-04-14 12:01:57+03:00 29246 91 \n",
+ "11697 2022-04-14 12:02:56+03:00 29246 91 \n",
+ "16680 2022-04-14 12:03:52+03:00 29246 91 \n",
+ "21629 2022-04-14 12:04:40+03:00 29246 91 \n",
+ "\n",
+ " OriginAimedDepartureTime Longitude Latitude VehicleRef \\\n",
+ "1815 2022-04-14 11:41:00+03:00 34.771492 31.815269 7763669 \n",
+ "6599 2022-04-14 11:41:00+03:00 34.771095 31.815252 7763669 \n",
+ "11583 2022-04-14 11:41:00+03:00 34.771450 31.816154 7763669 \n",
+ "16566 2022-04-14 11:41:00+03:00 34.774731 31.818487 7763669 \n",
+ "21515 2022-04-14 11:41:00+03:00 34.775620 31.820726 7763669 \n",
+ "1916 2022-04-14 11:41:00+03:00 34.745441 32.017395 8703126 \n",
+ "6709 2022-04-14 11:41:00+03:00 34.747719 32.016590 8703126 \n",
+ "11697 2022-04-14 11:41:00+03:00 34.747379 32.012444 8703126 \n",
+ "16680 2022-04-14 11:41:00+03:00 34.750046 32.012291 8703126 \n",
+ "21629 2022-04-14 11:41:00+03:00 34.752792 32.013870 8703126 \n",
+ "\n",
+ " file id siri_snapshot_id siri_ride_stop_id \\\n",
+ "1815 2022/04/14/09/01 NaN NaN NaN \n",
+ "6599 2022/04/14/09/02 NaN NaN NaN \n",
+ "11583 2022/04/14/09/03 NaN NaN NaN \n",
+ "16566 2022/04/14/09/04 NaN NaN NaN \n",
+ "21515 2022/04/14/09/05 NaN NaN NaN \n",
+ "1916 2022/04/14/09/01 NaN NaN NaN \n",
+ "6709 2022/04/14/09/02 NaN NaN NaN \n",
+ "11697 2022/04/14/09/03 NaN NaN NaN \n",
+ "16680 2022/04/14/09/04 NaN NaN NaN \n",
+ "21629 2022/04/14/09/05 NaN NaN NaN \n",
+ "\n",
+ " recorded_at_time lon lat bearing velocity \\\n",
+ "1815 NaT NaN NaN NaN NaN \n",
+ "6599 NaT NaN NaN NaN NaN \n",
+ "11583 NaT NaN NaN NaN NaN \n",
+ "16566 NaT NaN NaN NaN NaN \n",
+ "21515 NaT NaN NaN NaN NaN \n",
+ "1916 NaT NaN NaN NaN NaN \n",
+ "6709 NaT NaN NaN NaN NaN \n",
+ "11697 NaT NaN NaN NaN NaN \n",
+ "16680 NaT NaN NaN NaN NaN \n",
+ "21629 NaT NaN NaN NaN NaN \n",
+ "\n",
+ " distance_from_journey_start distance_from_siri_ride_stop_meters \\\n",
+ "1815 NaN NaN \n",
+ "6599 NaN NaN \n",
+ "11583 NaN NaN \n",
+ "16566 NaN NaN \n",
+ "21515 NaN NaN \n",
+ "1916 NaN NaN \n",
+ "6709 NaN NaN \n",
+ "11697 NaN NaN \n",
+ "16680 NaN NaN \n",
+ "21629 NaN NaN \n",
+ "\n",
+ " siri_snapshot__snapshot_id siri_route__id siri_route__line_ref \\\n",
+ "1815 NaN NaN NaN \n",
+ "6599 NaN NaN NaN \n",
+ "11583 NaN NaN NaN \n",
+ "16566 NaN NaN NaN \n",
+ "21515 NaN NaN NaN \n",
+ "1916 NaN NaN NaN \n",
+ "6709 NaN NaN NaN \n",
+ "11697 NaN NaN NaN \n",
+ "16680 NaN NaN NaN \n",
+ "21629 NaN NaN NaN \n",
+ "\n",
+ " siri_route__operator_ref siri_ride__id siri_ride__journey_ref \\\n",
+ "1815 NaN NaN NaN \n",
+ "6599 NaN NaN NaN \n",
+ "11583 NaN NaN NaN \n",
+ "16566 NaN NaN NaN \n",
+ "21515 NaN NaN NaN \n",
+ "1916 NaN NaN NaN \n",
+ "6709 NaN NaN NaN \n",
+ "11697 NaN NaN NaN \n",
+ "16680 NaN NaN NaN \n",
+ "21629 NaN NaN NaN \n",
+ "\n",
+ " siri_ride__scheduled_start_time siri_ride__vehicle_ref \\\n",
+ "1815 NaT NaN \n",
+ "6599 NaT NaN \n",
+ "11583 NaT NaN \n",
+ "16566 NaT NaN \n",
+ "21515 NaT NaN \n",
+ "1916 NaT NaN \n",
+ "6709 NaT NaN \n",
+ "11697 NaT NaN \n",
+ "16680 NaT NaN \n",
+ "21629 NaT NaN \n",
+ "\n",
+ " siri_ride__first_vehicle_location_id \\\n",
+ "1815 NaN \n",
+ "6599 NaN \n",
+ "11583 NaN \n",
+ "16566 NaN \n",
+ "21515 NaN \n",
+ "1916 NaN \n",
+ "6709 NaN \n",
+ "11697 NaN \n",
+ "16680 NaN \n",
+ "21629 NaN \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "1815 NaN NaN \n",
+ "6599 NaN NaN \n",
+ "11583 NaN NaN \n",
+ "16566 NaN NaN \n",
+ "21515 NaN NaN \n",
+ "1916 NaN NaN \n",
+ "6709 NaN NaN \n",
+ "11697 NaN NaN \n",
+ "16680 NaN NaN \n",
+ "21629 NaN NaN \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "1815 NaN \n",
+ "6599 NaN \n",
+ "11583 NaN \n",
+ "16566 NaN \n",
+ "21515 NaN \n",
+ "1916 NaN \n",
+ "6709 NaN \n",
+ "11697 NaN \n",
+ "16680 NaN \n",
+ "21629 NaN "
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged[(merged.recorded_at_time.isnull())&(\n",
+ " merged.OriginAimedDepartureTime.dt.time.astype(str)=='11:41:00')].sort_values(by=['LineRef',\n",
+ " 'RecordedAtTime'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:13.182166Z",
+ "start_time": "2022-04-21T11:11:13.106710Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 1815 \n",
+ " 2022-04-14 12:00:13+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771492 \n",
+ " 31.815269 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/01 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 6599 \n",
+ " 2022-04-14 12:01:11+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771095 \n",
+ " 31.815252 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/02 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 11583 \n",
+ " 2022-04-14 12:02:36+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.771450 \n",
+ " 31.816154 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/03 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 16566 \n",
+ " 2022-04-14 12:03:30+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.774731 \n",
+ " 31.818487 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/04 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 21515 \n",
+ " 2022-04-14 12:04:40+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 11:41:00+03:00 \n",
+ " 34.775620 \n",
+ " 31.820726 \n",
+ " 7763669 \n",
+ " 2022/04/14/09/05 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 1816 \n",
+ " 2022-04-14 12:00:36+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 34.783833 \n",
+ " 31.800688 \n",
+ " 23289602 \n",
+ " 2022/04/14/09/01 \n",
+ " 252936248.0 \n",
+ " 82487.0 \n",
+ " 122853925.0 \n",
+ " 2022-04-14 12:00:36+03:00 \n",
+ " 34.783833 \n",
+ " 31.800688 \n",
+ " 23.0 \n",
+ " 29.0 \n",
+ " 201.0 \n",
+ " 181.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 973.0 \n",
+ " 2974.0 \n",
+ " 3.0 \n",
+ " 4812140.0 \n",
+ " 2022-04-14-43644475 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 23289602 \n",
+ " 252911122.0 \n",
+ " 253084559.0 \n",
+ " 35.0 \n",
+ " 5070283.0 \n",
+ " \n",
+ " \n",
+ " 6600 \n",
+ " 2022-04-14 12:01:40+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 34.787083 \n",
+ " 31.801245 \n",
+ " 23289602 \n",
+ " 2022/04/14/09/02 \n",
+ " 252941377.0 \n",
+ " 82488.0 \n",
+ " 122856486.0 \n",
+ " 2022-04-14 12:01:40+03:00 \n",
+ " 34.787083 \n",
+ " 31.801245 \n",
+ " 308.0 \n",
+ " 29.0 \n",
+ " 845.0 \n",
+ " 13.0 \n",
+ " 2022/04/14/09/02 \n",
+ " 973.0 \n",
+ " 2974.0 \n",
+ " 3.0 \n",
+ " 4812140.0 \n",
+ " 2022-04-14-43644475 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 23289602 \n",
+ " 252911122.0 \n",
+ " 253084559.0 \n",
+ " 35.0 \n",
+ " 5070283.0 \n",
+ " \n",
+ " \n",
+ " 11584 \n",
+ " 2022-04-14 12:02:36+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 34.787285 \n",
+ " 31.803877 \n",
+ " 23289602 \n",
+ " 2022/04/14/09/03 \n",
+ " 252946481.0 \n",
+ " 82489.0 \n",
+ " 122858975.0 \n",
+ " 2022-04-14 12:02:36+03:00 \n",
+ " 34.787285 \n",
+ " 31.803877 \n",
+ " 352.0 \n",
+ " 36.0 \n",
+ " 1329.0 \n",
+ " 101.0 \n",
+ " 2022/04/14/09/03 \n",
+ " 973.0 \n",
+ " 2974.0 \n",
+ " 3.0 \n",
+ " 4812140.0 \n",
+ " 2022-04-14-43644475 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 23289602 \n",
+ " 252911122.0 \n",
+ " 253084559.0 \n",
+ " 35.0 \n",
+ " 5070283.0 \n",
+ " \n",
+ " \n",
+ " 16567 \n",
+ " 2022-04-14 12:03:35+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 34.784889 \n",
+ " 31.805428 \n",
+ " 23289602 \n",
+ " 2022/04/14/09/04 \n",
+ " 252951525.0 \n",
+ " 82490.0 \n",
+ " 122861536.0 \n",
+ " 2022-04-14 12:03:35+03:00 \n",
+ " 34.784889 \n",
+ " 31.805428 \n",
+ " 342.0 \n",
+ " 0.0 \n",
+ " 1549.0 \n",
+ " 10.0 \n",
+ " 2022/04/14/09/04 \n",
+ " 973.0 \n",
+ " 2974.0 \n",
+ " 3.0 \n",
+ " 4812140.0 \n",
+ " 2022-04-14-43644475 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 23289602 \n",
+ " 252911122.0 \n",
+ " 253084559.0 \n",
+ " 35.0 \n",
+ " 5070283.0 \n",
+ " \n",
+ " \n",
+ " 21516 \n",
+ " 2022-04-14 12:04:36+03:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 34.786331 \n",
+ " 31.807804 \n",
+ " 23289602 \n",
+ " 2022/04/14/09/05 \n",
+ " 252956507.0 \n",
+ " 82491.0 \n",
+ " 122863999.0 \n",
+ " 2022-04-14 12:04:36+03:00 \n",
+ " 34.786331 \n",
+ " 31.807804 \n",
+ " 34.0 \n",
+ " 25.0 \n",
+ " 1818.0 \n",
+ " 27.0 \n",
+ " 2022/04/14/09/05 \n",
+ " 973.0 \n",
+ " 2974.0 \n",
+ " 3.0 \n",
+ " 4812140.0 \n",
+ " 2022-04-14-43644475 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 23289602 \n",
+ " 252911122.0 \n",
+ " 253084559.0 \n",
+ " 35.0 \n",
+ " 5070283.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef \\\n",
+ "1815 2022-04-14 12:00:13+03:00 2974 3 \n",
+ "6599 2022-04-14 12:01:11+03:00 2974 3 \n",
+ "11583 2022-04-14 12:02:36+03:00 2974 3 \n",
+ "16566 2022-04-14 12:03:30+03:00 2974 3 \n",
+ "21515 2022-04-14 12:04:40+03:00 2974 3 \n",
+ "1816 2022-04-14 12:00:36+03:00 2974 3 \n",
+ "6600 2022-04-14 12:01:40+03:00 2974 3 \n",
+ "11584 2022-04-14 12:02:36+03:00 2974 3 \n",
+ "16567 2022-04-14 12:03:35+03:00 2974 3 \n",
+ "21516 2022-04-14 12:04:36+03:00 2974 3 \n",
+ "\n",
+ " OriginAimedDepartureTime Longitude Latitude VehicleRef \\\n",
+ "1815 2022-04-14 11:41:00+03:00 34.771492 31.815269 7763669 \n",
+ "6599 2022-04-14 11:41:00+03:00 34.771095 31.815252 7763669 \n",
+ "11583 2022-04-14 11:41:00+03:00 34.771450 31.816154 7763669 \n",
+ "16566 2022-04-14 11:41:00+03:00 34.774731 31.818487 7763669 \n",
+ "21515 2022-04-14 11:41:00+03:00 34.775620 31.820726 7763669 \n",
+ "1816 2022-04-14 12:00:00+03:00 34.783833 31.800688 23289602 \n",
+ "6600 2022-04-14 12:00:00+03:00 34.787083 31.801245 23289602 \n",
+ "11584 2022-04-14 12:00:00+03:00 34.787285 31.803877 23289602 \n",
+ "16567 2022-04-14 12:00:00+03:00 34.784889 31.805428 23289602 \n",
+ "21516 2022-04-14 12:00:00+03:00 34.786331 31.807804 23289602 \n",
+ "\n",
+ " file id siri_snapshot_id siri_ride_stop_id \\\n",
+ "1815 2022/04/14/09/01 NaN NaN NaN \n",
+ "6599 2022/04/14/09/02 NaN NaN NaN \n",
+ "11583 2022/04/14/09/03 NaN NaN NaN \n",
+ "16566 2022/04/14/09/04 NaN NaN NaN \n",
+ "21515 2022/04/14/09/05 NaN NaN NaN \n",
+ "1816 2022/04/14/09/01 252936248.0 82487.0 122853925.0 \n",
+ "6600 2022/04/14/09/02 252941377.0 82488.0 122856486.0 \n",
+ "11584 2022/04/14/09/03 252946481.0 82489.0 122858975.0 \n",
+ "16567 2022/04/14/09/04 252951525.0 82490.0 122861536.0 \n",
+ "21516 2022/04/14/09/05 252956507.0 82491.0 122863999.0 \n",
+ "\n",
+ " recorded_at_time lon lat bearing velocity \\\n",
+ "1815 NaT NaN NaN NaN NaN \n",
+ "6599 NaT NaN NaN NaN NaN \n",
+ "11583 NaT NaN NaN NaN NaN \n",
+ "16566 NaT NaN NaN NaN NaN \n",
+ "21515 NaT NaN NaN NaN NaN \n",
+ "1816 2022-04-14 12:00:36+03:00 34.783833 31.800688 23.0 29.0 \n",
+ "6600 2022-04-14 12:01:40+03:00 34.787083 31.801245 308.0 29.0 \n",
+ "11584 2022-04-14 12:02:36+03:00 34.787285 31.803877 352.0 36.0 \n",
+ "16567 2022-04-14 12:03:35+03:00 34.784889 31.805428 342.0 0.0 \n",
+ "21516 2022-04-14 12:04:36+03:00 34.786331 31.807804 34.0 25.0 \n",
+ "\n",
+ " distance_from_journey_start distance_from_siri_ride_stop_meters \\\n",
+ "1815 NaN NaN \n",
+ "6599 NaN NaN \n",
+ "11583 NaN NaN \n",
+ "16566 NaN NaN \n",
+ "21515 NaN NaN \n",
+ "1816 201.0 181.0 \n",
+ "6600 845.0 13.0 \n",
+ "11584 1329.0 101.0 \n",
+ "16567 1549.0 10.0 \n",
+ "21516 1818.0 27.0 \n",
+ "\n",
+ " siri_snapshot__snapshot_id siri_route__id siri_route__line_ref \\\n",
+ "1815 NaN NaN NaN \n",
+ "6599 NaN NaN NaN \n",
+ "11583 NaN NaN NaN \n",
+ "16566 NaN NaN NaN \n",
+ "21515 NaN NaN NaN \n",
+ "1816 2022/04/14/09/01 973.0 2974.0 \n",
+ "6600 2022/04/14/09/02 973.0 2974.0 \n",
+ "11584 2022/04/14/09/03 973.0 2974.0 \n",
+ "16567 2022/04/14/09/04 973.0 2974.0 \n",
+ "21516 2022/04/14/09/05 973.0 2974.0 \n",
+ "\n",
+ " siri_route__operator_ref siri_ride__id siri_ride__journey_ref \\\n",
+ "1815 NaN NaN NaN \n",
+ "6599 NaN NaN NaN \n",
+ "11583 NaN NaN NaN \n",
+ "16566 NaN NaN NaN \n",
+ "21515 NaN NaN NaN \n",
+ "1816 3.0 4812140.0 2022-04-14-43644475 \n",
+ "6600 3.0 4812140.0 2022-04-14-43644475 \n",
+ "11584 3.0 4812140.0 2022-04-14-43644475 \n",
+ "16567 3.0 4812140.0 2022-04-14-43644475 \n",
+ "21516 3.0 4812140.0 2022-04-14-43644475 \n",
+ "\n",
+ " siri_ride__scheduled_start_time siri_ride__vehicle_ref \\\n",
+ "1815 NaT NaN \n",
+ "6599 NaT NaN \n",
+ "11583 NaT NaN \n",
+ "16566 NaT NaN \n",
+ "21515 NaT NaN \n",
+ "1816 2022-04-14 12:00:00+03:00 23289602 \n",
+ "6600 2022-04-14 12:00:00+03:00 23289602 \n",
+ "11584 2022-04-14 12:00:00+03:00 23289602 \n",
+ "16567 2022-04-14 12:00:00+03:00 23289602 \n",
+ "21516 2022-04-14 12:00:00+03:00 23289602 \n",
+ "\n",
+ " siri_ride__first_vehicle_location_id \\\n",
+ "1815 NaN \n",
+ "6599 NaN \n",
+ "11583 NaN \n",
+ "16566 NaN \n",
+ "21515 NaN \n",
+ "1816 252911122.0 \n",
+ "6600 252911122.0 \n",
+ "11584 252911122.0 \n",
+ "16567 252911122.0 \n",
+ "21516 252911122.0 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "1815 NaN NaN \n",
+ "6599 NaN NaN \n",
+ "11583 NaN NaN \n",
+ "16566 NaN NaN \n",
+ "21515 NaN NaN \n",
+ "1816 253084559.0 35.0 \n",
+ "6600 253084559.0 35.0 \n",
+ "11584 253084559.0 35.0 \n",
+ "16567 253084559.0 35.0 \n",
+ "21516 253084559.0 35.0 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "1815 NaN \n",
+ "6599 NaN \n",
+ "11583 NaN \n",
+ "16566 NaN \n",
+ "21515 NaN \n",
+ "1816 5070283.0 \n",
+ "6600 5070283.0 \n",
+ "11584 5070283.0 \n",
+ "16567 5070283.0 \n",
+ "21516 5070283.0 "
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged[(merged.LineRef==2974)].sort_values(by=['OriginAimedDepartureTime', 'RecordedAtTime'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:13.975934Z",
+ "start_time": "2022-04-21T11:11:13.186165Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " recorded_at_time \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " lon \n",
+ " lat \n",
+ " siri_snapshot__snapshot_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 2022-04-14T09:00:13+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.771492 \n",
+ " 31.815269 \n",
+ " 2022/04/14/09/01 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 2022-04-14T09:01:11+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.771095 \n",
+ " 31.815252 \n",
+ " 2022/04/14/09/02 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 2022-04-14T09:02:36+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.771450 \n",
+ " 31.816154 \n",
+ " 2022/04/14/09/03 \n",
+ " \n",
+ " \n",
+ " 6 \n",
+ " 2022-04-14T09:03:30+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.774731 \n",
+ " 31.818487 \n",
+ " 2022/04/14/09/04 \n",
+ " \n",
+ " \n",
+ " 8 \n",
+ " 2022-04-14T09:04:40+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.775620 \n",
+ " 31.820726 \n",
+ " 2022/04/14/09/05 \n",
+ " \n",
+ " \n",
+ " 10 \n",
+ " 2022-04-14T09:05:32+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T08:40:00+00:00 \n",
+ " 7763669 \n",
+ " 34.777260 \n",
+ " 31.821730 \n",
+ " 2022/04/14/09/06 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 2022-04-14T09:00:36+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.783833 \n",
+ " 31.800688 \n",
+ " 2022/04/14/09/01 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 2022-04-14T09:01:40+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.787083 \n",
+ " 31.801245 \n",
+ " 2022/04/14/09/02 \n",
+ " \n",
+ " \n",
+ " 5 \n",
+ " 2022-04-14T09:02:36+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.787285 \n",
+ " 31.803877 \n",
+ " 2022/04/14/09/03 \n",
+ " \n",
+ " \n",
+ " 7 \n",
+ " 2022-04-14T09:03:35+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.784889 \n",
+ " 31.805428 \n",
+ " 2022/04/14/09/04 \n",
+ " \n",
+ " \n",
+ " 9 \n",
+ " 2022-04-14T09:04:36+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.786331 \n",
+ " 31.807804 \n",
+ " 2022/04/14/09/05 \n",
+ " \n",
+ " \n",
+ " 11 \n",
+ " 2022-04-14T09:05:39+00:00 \n",
+ " 2974 \n",
+ " 3 \n",
+ " 2022-04-14T09:00:00+00:00 \n",
+ " 23289602 \n",
+ " 34.785545 \n",
+ " 31.812361 \n",
+ " 2022/04/14/09/06 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " recorded_at_time siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 2022-04-14T09:00:13+00:00 2974 3 \n",
+ "2 2022-04-14T09:01:11+00:00 2974 3 \n",
+ "4 2022-04-14T09:02:36+00:00 2974 3 \n",
+ "6 2022-04-14T09:03:30+00:00 2974 3 \n",
+ "8 2022-04-14T09:04:40+00:00 2974 3 \n",
+ "10 2022-04-14T09:05:32+00:00 2974 3 \n",
+ "1 2022-04-14T09:00:36+00:00 2974 3 \n",
+ "3 2022-04-14T09:01:40+00:00 2974 3 \n",
+ "5 2022-04-14T09:02:36+00:00 2974 3 \n",
+ "7 2022-04-14T09:03:35+00:00 2974 3 \n",
+ "9 2022-04-14T09:04:36+00:00 2974 3 \n",
+ "11 2022-04-14T09:05:39+00:00 2974 3 \n",
+ "\n",
+ " siri_ride__scheduled_start_time siri_ride__vehicle_ref lon \\\n",
+ "0 2022-04-14T08:40:00+00:00 7763669 34.771492 \n",
+ "2 2022-04-14T08:40:00+00:00 7763669 34.771095 \n",
+ "4 2022-04-14T08:40:00+00:00 7763669 34.771450 \n",
+ "6 2022-04-14T08:40:00+00:00 7763669 34.774731 \n",
+ "8 2022-04-14T08:40:00+00:00 7763669 34.775620 \n",
+ "10 2022-04-14T08:40:00+00:00 7763669 34.777260 \n",
+ "1 2022-04-14T09:00:00+00:00 23289602 34.783833 \n",
+ "3 2022-04-14T09:00:00+00:00 23289602 34.787083 \n",
+ "5 2022-04-14T09:00:00+00:00 23289602 34.787285 \n",
+ "7 2022-04-14T09:00:00+00:00 23289602 34.784889 \n",
+ "9 2022-04-14T09:00:00+00:00 23289602 34.786331 \n",
+ "11 2022-04-14T09:00:00+00:00 23289602 34.785545 \n",
+ "\n",
+ " lat siri_snapshot__snapshot_id \n",
+ "0 31.815269 2022/04/14/09/01 \n",
+ "2 31.815252 2022/04/14/09/02 \n",
+ "4 31.816154 2022/04/14/09/03 \n",
+ "6 31.818487 2022/04/14/09/04 \n",
+ "8 31.820726 2022/04/14/09/05 \n",
+ "10 31.821730 2022/04/14/09/06 \n",
+ "1 31.800688 2022/04/14/09/01 \n",
+ "3 31.801245 2022/04/14/09/02 \n",
+ "5 31.803877 2022/04/14/09/03 \n",
+ "7 31.805428 2022/04/14/09/04 \n",
+ "9 31.807804 2022/04/14/09/05 \n",
+ "11 31.812361 2022/04/14/09/06 "
+ ]
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import pandas as pd\n",
+ "import stride\n",
+ "import datetime\n",
+ "from dateutil import tz\n",
+ "\n",
+ "pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'recorded_at_time_from': datetime.datetime(2022,4, 14, 9, 0, tzinfo=tz.gettz('UTC')),\n",
+ " 'recorded_at_time_to': datetime.datetime(2022,4, 14, 9, 6, tzinfo=tz.gettz('UTC')),\n",
+ " 'siri_routes__operator_ref': '3',\n",
+ " 'siri_routes__line_ref': '2974'\n",
+ "}, limit=1000))[['recorded_at_time',\n",
+ " 'siri_route__line_ref',\n",
+ " 'siri_route__operator_ref', 'siri_ride__scheduled_start_time','siri_ride__vehicle_ref',\n",
+ " 'lon','lat','siri_snapshot__snapshot_id']].sort_values(by=['siri_ride__scheduled_start_time',\n",
+ " 'recorded_at_time'])"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-09T17:07:53.345391Z",
+ "start_time": "2022-04-09T17:07:53.232456Z"
+ },
+ "hidden": true
+ },
+ "source": [
+ "**In this case the rows are not missing but the OriginAimedDepartureTime is wrong. The reason for this is that the OriginAimedDepartureTime has been changed along the ride and the DB saves only the first OriginAimedDepartureTime it encounters**"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:16.586187Z",
+ "start_time": "2022-04-21T11:11:13.978910Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(24391, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24461, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ "(24461, 30)"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 0 \n",
+ " 2022-04-14 12:00:35+03:00 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 7704369 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934168.0 \n",
+ " 82487.0 \n",
+ " 122852930.0 \n",
+ " 2022-04-14 12:00:35+03:00 \n",
+ " 35.050468 \n",
+ " 32.763882 \n",
+ " 202.0 \n",
+ " 32.0 \n",
+ " 11295.0 \n",
+ " 16.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 1.0 \n",
+ " 3916.0 \n",
+ " 3.0 \n",
+ " 4809932.0 \n",
+ " 2022-04-14-16153305 \n",
+ " 2022-04-14 11:30:00+03:00 \n",
+ " 7704369 \n",
+ " 252783045.0 \n",
+ " 252999811.0 \n",
+ " 45.0 \n",
+ " 5077708.0 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 3916 \n",
+ " 3 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 7723569 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934169.0 \n",
+ " 82487.0 \n",
+ " 122852931.0 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 35.023163 \n",
+ " 32.782009 \n",
+ " 284.0 \n",
+ " 44.0 \n",
+ " 0.0 \n",
+ " NaN \n",
+ " 2022/04/14/09/01 \n",
+ " 1.0 \n",
+ " 3916.0 \n",
+ " 3.0 \n",
+ " 4812918.0 \n",
+ " 2022-04-14-9832116 \n",
+ " 2022-04-14 12:00:00+03:00 \n",
+ " 7723569 \n",
+ " 252934169.0 \n",
+ " 253252540.0 \n",
+ " 61.0 \n",
+ " 5077709.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 2022-04-14 12:00:33+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 7789069 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934170.0 \n",
+ " 82487.0 \n",
+ " 122852932.0 \n",
+ " 2022-04-14 12:00:33+03:00 \n",
+ " 35.023861 \n",
+ " 32.780495 \n",
+ " 282.0 \n",
+ " 14.0 \n",
+ " 18801.0 \n",
+ " 83.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2.0 \n",
+ " 3918.0 \n",
+ " 3.0 \n",
+ " 4808392.0 \n",
+ " 2022-04-14-10015338 \n",
+ " 2022-04-14 11:15:00+03:00 \n",
+ " 7789069 \n",
+ " 252709213.0 \n",
+ " 252969506.0 \n",
+ " 54.0 \n",
+ " 5069399.0 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 2022-04-14 12:00:38+03:00 \n",
+ " 3918 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 7723769 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934171.0 \n",
+ " 82487.0 \n",
+ " 122852933.0 \n",
+ " 2022-04-14 12:00:38+03:00 \n",
+ " 35.047249 \n",
+ " 32.762596 \n",
+ " 18.0 \n",
+ " 25.0 \n",
+ " 7052.0 \n",
+ " 67.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 2.0 \n",
+ " 3918.0 \n",
+ " 3.0 \n",
+ " 4810802.0 \n",
+ " 2022-04-14-10382494 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 7723769 \n",
+ " 252837167.0 \n",
+ " 253156752.0 \n",
+ " 64.0 \n",
+ " 5067780.0 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 10298 \n",
+ " 3 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 8886401 \n",
+ " 2022/04/14/09/01 \n",
+ " 252934172.0 \n",
+ " 82487.0 \n",
+ " 122850738.0 \n",
+ " 2022-04-14 12:00:40+03:00 \n",
+ " 34.709671 \n",
+ " 31.645548 \n",
+ " 250.0 \n",
+ " 90.0 \n",
+ " 10908.0 \n",
+ " 1967.0 \n",
+ " 2022/04/14/09/01 \n",
+ " 3990.0 \n",
+ " 10298.0 \n",
+ " 3.0 \n",
+ " 4810803.0 \n",
+ " 2022-04-14-12479321 \n",
+ " 2022-04-14 11:45:00+03:00 \n",
+ " 8886401 \n",
+ " 252837168.0 \n",
+ " 253130028.0 \n",
+ " 59.0 \n",
+ " 5107396.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef OriginAimedDepartureTime \\\n",
+ "0 2022-04-14 12:00:35+03:00 3916 3 2022-04-14 11:30:00+03:00 \n",
+ "1 2022-04-14 12:00:40+03:00 3916 3 2022-04-14 12:00:00+03:00 \n",
+ "2 2022-04-14 12:00:33+03:00 3918 3 2022-04-14 11:15:00+03:00 \n",
+ "3 2022-04-14 12:00:38+03:00 3918 3 2022-04-14 11:45:00+03:00 \n",
+ "4 2022-04-14 12:00:40+03:00 10298 3 2022-04-14 11:45:00+03:00 \n",
+ "\n",
+ " Longitude Latitude VehicleRef file id \\\n",
+ "0 35.050468 32.763882 7704369 2022/04/14/09/01 252934168.0 \n",
+ "1 35.023163 32.782009 7723569 2022/04/14/09/01 252934169.0 \n",
+ "2 35.023861 32.780495 7789069 2022/04/14/09/01 252934170.0 \n",
+ "3 35.047249 32.762596 7723769 2022/04/14/09/01 252934171.0 \n",
+ "4 34.709671 31.645548 8886401 2022/04/14/09/01 252934172.0 \n",
+ "\n",
+ " siri_snapshot_id siri_ride_stop_id recorded_at_time lon \\\n",
+ "0 82487.0 122852930.0 2022-04-14 12:00:35+03:00 35.050468 \n",
+ "1 82487.0 122852931.0 2022-04-14 12:00:40+03:00 35.023163 \n",
+ "2 82487.0 122852932.0 2022-04-14 12:00:33+03:00 35.023861 \n",
+ "3 82487.0 122852933.0 2022-04-14 12:00:38+03:00 35.047249 \n",
+ "4 82487.0 122850738.0 2022-04-14 12:00:40+03:00 34.709671 \n",
+ "\n",
+ " lat bearing velocity distance_from_journey_start \\\n",
+ "0 32.763882 202.0 32.0 11295.0 \n",
+ "1 32.782009 284.0 44.0 0.0 \n",
+ "2 32.780495 282.0 14.0 18801.0 \n",
+ "3 32.762596 18.0 25.0 7052.0 \n",
+ "4 31.645548 250.0 90.0 10908.0 \n",
+ "\n",
+ " distance_from_siri_ride_stop_meters siri_snapshot__snapshot_id \\\n",
+ "0 16.0 2022/04/14/09/01 \n",
+ "1 NaN 2022/04/14/09/01 \n",
+ "2 83.0 2022/04/14/09/01 \n",
+ "3 67.0 2022/04/14/09/01 \n",
+ "4 1967.0 2022/04/14/09/01 \n",
+ "\n",
+ " siri_route__id siri_route__line_ref siri_route__operator_ref \\\n",
+ "0 1.0 3916.0 3.0 \n",
+ "1 1.0 3916.0 3.0 \n",
+ "2 2.0 3918.0 3.0 \n",
+ "3 2.0 3918.0 3.0 \n",
+ "4 3990.0 10298.0 3.0 \n",
+ "\n",
+ " siri_ride__id siri_ride__journey_ref siri_ride__scheduled_start_time \\\n",
+ "0 4809932.0 2022-04-14-16153305 2022-04-14 11:30:00+03:00 \n",
+ "1 4812918.0 2022-04-14-9832116 2022-04-14 12:00:00+03:00 \n",
+ "2 4808392.0 2022-04-14-10015338 2022-04-14 11:15:00+03:00 \n",
+ "3 4810802.0 2022-04-14-10382494 2022-04-14 11:45:00+03:00 \n",
+ "4 4810803.0 2022-04-14-12479321 2022-04-14 11:45:00+03:00 \n",
+ "\n",
+ " siri_ride__vehicle_ref siri_ride__first_vehicle_location_id \\\n",
+ "0 7704369 252783045.0 \n",
+ "1 7723569 252934169.0 \n",
+ "2 7789069 252709213.0 \n",
+ "3 7723769 252837167.0 \n",
+ "4 8886401 252837168.0 \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "0 252999811.0 45.0 \n",
+ "1 253252540.0 61.0 \n",
+ "2 252969506.0 54.0 \n",
+ "3 253156752.0 64.0 \n",
+ "4 253130028.0 59.0 \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "0 5077708.0 \n",
+ "1 5077709.0 \n",
+ "2 5069399.0 \n",
+ "3 5067780.0 \n",
+ "4 5107396.0 "
+ ]
+ },
+ "execution_count": 28,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "## missing data comprison without OriginAimedDepartureTime\n",
+ "\n",
+ "siri_vehicle_locations_key_cols2 = ['recorded_at_time','siri_route__line_ref',\n",
+ " 'siri_route__operator_ref',\n",
+ " 'lon','lat','siri_ride__vehicle_ref','siri_snapshot__snapshot_id']\n",
+ "\n",
+ "siri_source_key_cols2 = siri_source.drop(columns=['OriginAimedDepartureTime']).columns.tolist()\n",
+ "\n",
+ "merged2 = siri_source[(siri_source.RecordedAtTime.dt.time.astype(str).between('12:00:00','12:06:00')) \n",
+ " ].drop_duplicates(subset=siri_source_key_cols\n",
+ " ).merge(siri_vehicle_locations, how = 'left', \n",
+ " left_on=siri_source_key_cols2,\n",
+ " right_on=siri_vehicle_locations_key_cols2)\n",
+ "\n",
+ "display(merged2.drop_duplicates(siri_source_key_cols).shape,\n",
+ " merged2.drop_duplicates().shape,\n",
+ " merged2.shape)\n",
+ "\n",
+ "merged2.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:16.633896Z",
+ "start_time": "2022-04-21T11:11:16.589187Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "0.991"
+ ]
+ },
+ "execution_count": 29,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "round(merged2.drop_duplicates(subset=siri_source_key_cols).lon.notnull().mean(),3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:16.761784Z",
+ "start_time": "2022-04-21T11:11:16.636878Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " count \n",
+ " mean \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " RecordedAtTime \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 12 \n",
+ " 0 \n",
+ " 5990 \n",
+ " 0.992 \n",
+ " \n",
+ " \n",
+ " 1 \n",
+ " 4896 \n",
+ " 0.991 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 4769 \n",
+ " 0.990 \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 4611 \n",
+ " 0.990 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 4125 \n",
+ " 0.989 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " count mean\n",
+ "RecordedAtTime RecordedAtTime \n",
+ "12 0 5990 0.992\n",
+ " 1 4896 0.991\n",
+ " 2 4769 0.990\n",
+ " 3 4611 0.990\n",
+ " 4 4125 0.989"
+ ]
+ },
+ "execution_count": 30,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged2.drop_duplicates(siri_source_key_cols).lon.notnull().groupby(\n",
+ " [merged.drop_duplicates(subset=siri_source_key_cols).RecordedAtTime.dt.hour,\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).RecordedAtTime.dt.minute]).agg(['count','mean']\n",
+ " ).round(3)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:16.840744Z",
+ "start_time": "2022-04-21T11:11:16.764783Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count \n",
+ " mean \n",
+ " \n",
+ " \n",
+ " OperatorRef \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 3 \n",
+ " 6936 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 5 \n",
+ " 2978 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 18 \n",
+ " 2829 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 15 \n",
+ " 2223 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 25 \n",
+ " 1617 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 16 \n",
+ " 1594 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 14 \n",
+ " 957 \n",
+ " 0.99 \n",
+ " \n",
+ " \n",
+ " 31 \n",
+ " 821 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 32 \n",
+ " 650 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 4 \n",
+ " 495 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 34 \n",
+ " 426 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 6 \n",
+ " 415 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 7 \n",
+ " 364 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 35 \n",
+ " 338 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 37 \n",
+ " 272 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 23 \n",
+ " 251 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 220 \n",
+ " 0.00 \n",
+ " \n",
+ " \n",
+ " 42 \n",
+ " 145 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 8 \n",
+ " 136 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 92 \n",
+ " 102 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 45 \n",
+ " 101 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 24 \n",
+ " 89 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 44 \n",
+ " 84 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 50 \n",
+ " 62 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 47 \n",
+ " 60 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 97 \n",
+ " 60 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 49 \n",
+ " 48 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 98 \n",
+ " 34 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 91 \n",
+ " 30 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 51 \n",
+ " 28 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 93 \n",
+ " 21 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ " 10 \n",
+ " 5 \n",
+ " 1.00 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " count mean\n",
+ "OperatorRef \n",
+ "3 6936 1.00\n",
+ "5 2978 1.00\n",
+ "18 2829 1.00\n",
+ "15 2223 1.00\n",
+ "25 1617 1.00\n",
+ "16 1594 1.00\n",
+ "14 957 0.99\n",
+ "31 821 1.00\n",
+ "32 650 1.00\n",
+ "4 495 1.00\n",
+ "34 426 1.00\n",
+ "6 415 1.00\n",
+ "7 364 1.00\n",
+ "35 338 1.00\n",
+ "37 272 1.00\n",
+ "23 251 1.00\n",
+ "2 220 0.00\n",
+ "42 145 1.00\n",
+ "8 136 1.00\n",
+ "92 102 1.00\n",
+ "45 101 1.00\n",
+ "24 89 1.00\n",
+ "44 84 1.00\n",
+ "50 62 1.00\n",
+ "47 60 1.00\n",
+ "97 60 1.00\n",
+ "49 48 1.00\n",
+ "98 34 1.00\n",
+ "91 30 1.00\n",
+ "51 28 1.00\n",
+ "93 21 1.00\n",
+ "10 5 1.00"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged2.drop_duplicates(siri_source_key_cols).lon.notnull().groupby(\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).OperatorRef).agg(['count','mean']\n",
+ " ).round(3).sort_values(by='count', ascending=False)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:16.920696Z",
+ "start_time": "2022-04-21T11:11:16.843739Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " count \n",
+ " sum \n",
+ " \n",
+ " \n",
+ " OperatorRef \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 14 \n",
+ " 957 \n",
+ " 10.0 \n",
+ " \n",
+ " \n",
+ " 2 \n",
+ " 220 \n",
+ " 220.0 \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " count sum\n",
+ "OperatorRef \n",
+ "14 957 10.0\n",
+ "2 220 220.0"
+ ]
+ },
+ "execution_count": 32,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged2.drop_duplicates(siri_source_key_cols).lon.isnull().groupby(\n",
+ " merged.drop_duplicates(subset=siri_source_key_cols).OperatorRef).agg(['count','sum']\n",
+ " ).round(3).sort_values(by='count', ascending=False)[lambda x: x['sum']>0]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:17.169941Z",
+ "start_time": "2022-04-21T11:11:16.923695Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " operator_ref \n",
+ " agency_name \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 29 \n",
+ " 14 \n",
+ " נתיב אקספרס \n",
+ " \n",
+ " \n",
+ " 32 \n",
+ " 2 \n",
+ " רכבת ישראל \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " operator_ref agency_name\n",
+ "29 14 נתיב אקספרס\n",
+ "32 2 רכבת ישראל"
+ ]
+ },
+ "execution_count": 33,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "agencies = pd.DataFrame(stride.get('/gtfs_agencies/list', {}))[['operator_ref','agency_name']].drop_duplicates()\n",
+ "\n",
+ "agencies[agencies.operator_ref.isin([14,2])]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:17.232776Z",
+ "start_time": "2022-04-21T11:11:17.172940Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " RecordedAtTime \n",
+ " LineRef \n",
+ " OperatorRef \n",
+ " OriginAimedDepartureTime \n",
+ " Longitude \n",
+ " Latitude \n",
+ " VehicleRef \n",
+ " file \n",
+ " id \n",
+ " siri_snapshot_id \n",
+ " siri_ride_stop_id \n",
+ " recorded_at_time \n",
+ " lon \n",
+ " lat \n",
+ " bearing \n",
+ " velocity \n",
+ " distance_from_journey_start \n",
+ " distance_from_siri_ride_stop_meters \n",
+ " siri_snapshot__snapshot_id \n",
+ " siri_route__id \n",
+ " siri_route__line_ref \n",
+ " siri_route__operator_ref \n",
+ " siri_ride__id \n",
+ " siri_ride__journey_ref \n",
+ " siri_ride__scheduled_start_time \n",
+ " siri_ride__vehicle_ref \n",
+ " siri_ride__first_vehicle_location_id \n",
+ " siri_ride__last_vehicle_location_id \n",
+ " siri_ride__duration_minutes \n",
+ " siri_ride__gtfs_ride_id \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " 4175 \n",
+ " 2022-04-14 12:00:02+03:00 \n",
+ " 452 \n",
+ " 14 \n",
+ " 2022-04-14 11:57:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 452 \n",
+ " 2022/04/14/09/01 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 9111 \n",
+ " 2022-04-14 12:01:02+03:00 \n",
+ " 452 \n",
+ " 14 \n",
+ " 2022-04-14 11:57:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 452 \n",
+ " 2022/04/14/09/02 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 14109 \n",
+ " 2022-04-14 12:02:02+03:00 \n",
+ " 452 \n",
+ " 14 \n",
+ " 2022-04-14 11:57:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 452 \n",
+ " 2022/04/14/09/03 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 19078 \n",
+ " 2022-04-14 12:03:02+03:00 \n",
+ " 452 \n",
+ " 14 \n",
+ " 2022-04-14 11:57:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 452 \n",
+ " 2022/04/14/09/04 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 24005 \n",
+ " 2022-04-14 12:04:02+03:00 \n",
+ " 452 \n",
+ " 14 \n",
+ " 2022-04-14 11:57:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 452 \n",
+ " 2022/04/14/09/05 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 4174 \n",
+ " 2022-04-14 12:00:02+03:00 \n",
+ " 453 \n",
+ " 14 \n",
+ " 2022-04-14 11:32:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 453 \n",
+ " 2022/04/14/09/01 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 9110 \n",
+ " 2022-04-14 12:01:01+03:00 \n",
+ " 453 \n",
+ " 14 \n",
+ " 2022-04-14 11:32:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 453 \n",
+ " 2022/04/14/09/02 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 14108 \n",
+ " 2022-04-14 12:02:01+03:00 \n",
+ " 453 \n",
+ " 14 \n",
+ " 2022-04-14 11:32:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 453 \n",
+ " 2022/04/14/09/03 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 19077 \n",
+ " 2022-04-14 12:03:02+03:00 \n",
+ " 453 \n",
+ " 14 \n",
+ " 2022-04-14 11:32:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 453 \n",
+ " 2022/04/14/09/04 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ " 24004 \n",
+ " 2022-04-14 12:04:02+03:00 \n",
+ " 453 \n",
+ " 14 \n",
+ " 2022-04-14 11:32:00+03:00 \n",
+ " NaN \n",
+ " NaN \n",
+ " 453 \n",
+ " 2022/04/14/09/05 \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaT \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " NaN \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " RecordedAtTime LineRef OperatorRef \\\n",
+ "4175 2022-04-14 12:00:02+03:00 452 14 \n",
+ "9111 2022-04-14 12:01:02+03:00 452 14 \n",
+ "14109 2022-04-14 12:02:02+03:00 452 14 \n",
+ "19078 2022-04-14 12:03:02+03:00 452 14 \n",
+ "24005 2022-04-14 12:04:02+03:00 452 14 \n",
+ "4174 2022-04-14 12:00:02+03:00 453 14 \n",
+ "9110 2022-04-14 12:01:01+03:00 453 14 \n",
+ "14108 2022-04-14 12:02:01+03:00 453 14 \n",
+ "19077 2022-04-14 12:03:02+03:00 453 14 \n",
+ "24004 2022-04-14 12:04:02+03:00 453 14 \n",
+ "\n",
+ " OriginAimedDepartureTime Longitude Latitude VehicleRef \\\n",
+ "4175 2022-04-14 11:57:00+03:00 NaN NaN 452 \n",
+ "9111 2022-04-14 11:57:00+03:00 NaN NaN 452 \n",
+ "14109 2022-04-14 11:57:00+03:00 NaN NaN 452 \n",
+ "19078 2022-04-14 11:57:00+03:00 NaN NaN 452 \n",
+ "24005 2022-04-14 11:57:00+03:00 NaN NaN 452 \n",
+ "4174 2022-04-14 11:32:00+03:00 NaN NaN 453 \n",
+ "9110 2022-04-14 11:32:00+03:00 NaN NaN 453 \n",
+ "14108 2022-04-14 11:32:00+03:00 NaN NaN 453 \n",
+ "19077 2022-04-14 11:32:00+03:00 NaN NaN 453 \n",
+ "24004 2022-04-14 11:32:00+03:00 NaN NaN 453 \n",
+ "\n",
+ " file id siri_snapshot_id siri_ride_stop_id \\\n",
+ "4175 2022/04/14/09/01 NaN NaN NaN \n",
+ "9111 2022/04/14/09/02 NaN NaN NaN \n",
+ "14109 2022/04/14/09/03 NaN NaN NaN \n",
+ "19078 2022/04/14/09/04 NaN NaN NaN \n",
+ "24005 2022/04/14/09/05 NaN NaN NaN \n",
+ "4174 2022/04/14/09/01 NaN NaN NaN \n",
+ "9110 2022/04/14/09/02 NaN NaN NaN \n",
+ "14108 2022/04/14/09/03 NaN NaN NaN \n",
+ "19077 2022/04/14/09/04 NaN NaN NaN \n",
+ "24004 2022/04/14/09/05 NaN NaN NaN \n",
+ "\n",
+ " recorded_at_time lon lat bearing velocity \\\n",
+ "4175 NaT NaN NaN NaN NaN \n",
+ "9111 NaT NaN NaN NaN NaN \n",
+ "14109 NaT NaN NaN NaN NaN \n",
+ "19078 NaT NaN NaN NaN NaN \n",
+ "24005 NaT NaN NaN NaN NaN \n",
+ "4174 NaT NaN NaN NaN NaN \n",
+ "9110 NaT NaN NaN NaN NaN \n",
+ "14108 NaT NaN NaN NaN NaN \n",
+ "19077 NaT NaN NaN NaN NaN \n",
+ "24004 NaT NaN NaN NaN NaN \n",
+ "\n",
+ " distance_from_journey_start distance_from_siri_ride_stop_meters \\\n",
+ "4175 NaN NaN \n",
+ "9111 NaN NaN \n",
+ "14109 NaN NaN \n",
+ "19078 NaN NaN \n",
+ "24005 NaN NaN \n",
+ "4174 NaN NaN \n",
+ "9110 NaN NaN \n",
+ "14108 NaN NaN \n",
+ "19077 NaN NaN \n",
+ "24004 NaN NaN \n",
+ "\n",
+ " siri_snapshot__snapshot_id siri_route__id siri_route__line_ref \\\n",
+ "4175 NaN NaN NaN \n",
+ "9111 NaN NaN NaN \n",
+ "14109 NaN NaN NaN \n",
+ "19078 NaN NaN NaN \n",
+ "24005 NaN NaN NaN \n",
+ "4174 NaN NaN NaN \n",
+ "9110 NaN NaN NaN \n",
+ "14108 NaN NaN NaN \n",
+ "19077 NaN NaN NaN \n",
+ "24004 NaN NaN NaN \n",
+ "\n",
+ " siri_route__operator_ref siri_ride__id siri_ride__journey_ref \\\n",
+ "4175 NaN NaN NaN \n",
+ "9111 NaN NaN NaN \n",
+ "14109 NaN NaN NaN \n",
+ "19078 NaN NaN NaN \n",
+ "24005 NaN NaN NaN \n",
+ "4174 NaN NaN NaN \n",
+ "9110 NaN NaN NaN \n",
+ "14108 NaN NaN NaN \n",
+ "19077 NaN NaN NaN \n",
+ "24004 NaN NaN NaN \n",
+ "\n",
+ " siri_ride__scheduled_start_time siri_ride__vehicle_ref \\\n",
+ "4175 NaT NaN \n",
+ "9111 NaT NaN \n",
+ "14109 NaT NaN \n",
+ "19078 NaT NaN \n",
+ "24005 NaT NaN \n",
+ "4174 NaT NaN \n",
+ "9110 NaT NaN \n",
+ "14108 NaT NaN \n",
+ "19077 NaT NaN \n",
+ "24004 NaT NaN \n",
+ "\n",
+ " siri_ride__first_vehicle_location_id \\\n",
+ "4175 NaN \n",
+ "9111 NaN \n",
+ "14109 NaN \n",
+ "19078 NaN \n",
+ "24005 NaN \n",
+ "4174 NaN \n",
+ "9110 NaN \n",
+ "14108 NaN \n",
+ "19077 NaN \n",
+ "24004 NaN \n",
+ "\n",
+ " siri_ride__last_vehicle_location_id siri_ride__duration_minutes \\\n",
+ "4175 NaN NaN \n",
+ "9111 NaN NaN \n",
+ "14109 NaN NaN \n",
+ "19078 NaN NaN \n",
+ "24005 NaN NaN \n",
+ "4174 NaN NaN \n",
+ "9110 NaN NaN \n",
+ "14108 NaN NaN \n",
+ "19077 NaN NaN \n",
+ "24004 NaN NaN \n",
+ "\n",
+ " siri_ride__gtfs_ride_id \n",
+ "4175 NaN \n",
+ "9111 NaN \n",
+ "14109 NaN \n",
+ "19078 NaN \n",
+ "24005 NaN \n",
+ "4174 NaN \n",
+ "9110 NaN \n",
+ "14108 NaN \n",
+ "19077 NaN \n",
+ "24004 NaN "
+ ]
+ },
+ "execution_count": 34,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged2[(merged2.recorded_at_time.isnull())&(\n",
+ " merged2.OperatorRef==14)].sort_values(by=['LineRef','RecordedAtTime'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:17.934719Z",
+ "start_time": "2022-04-21T11:11:17.235774Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ "Empty DataFrame\n",
+ "Columns: []\n",
+ "Index: []"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ "Empty DataFrame\n",
+ "Columns: []\n",
+ "Index: []"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import pandas as pd\n",
+ "import stride\n",
+ "import datetime\n",
+ "from dateutil import tz\n",
+ "\n",
+ "display(pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'recorded_at_time_from': datetime.datetime(2022,4, 14, 9, 0, tzinfo=tz.gettz('UTC')),\n",
+ " 'recorded_at_time_to': datetime.datetime(2022,4, 14, 9, 6, tzinfo=tz.gettz('UTC')),\n",
+ " 'siri_routes__operator_ref': '14',\n",
+ " 'siri_routes__line_ref': '452'\n",
+ "}, limit=1000))) \n",
+ "\n",
+ "display(pd.DataFrame(stride.iterate('/siri_vehicle_locations/list', {\n",
+ " 'recorded_at_time_from': datetime.datetime(2022,4, 14, 9, 0, tzinfo=tz.gettz('UTC')),\n",
+ " 'recorded_at_time_to': datetime.datetime(2022,4, 14, 9, 6, tzinfo=tz.gettz('UTC')),\n",
+ " 'siri_routes__operator_ref': '14',\n",
+ " 'siri_routes__line_ref': '453'\n",
+ "}, limit=1000))) "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-21T11:11:17.966758Z",
+ "start_time": "2022-04-21T11:11:17.939715Z"
+ },
+ "hidden": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "2 220\n",
+ "14 10\n",
+ "Name: OperatorRef, dtype: int64"
+ ]
+ },
+ "execution_count": 36,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "merged2[merged2.Longitude.isnull()].OperatorRef.value_counts()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-04-09T17:18:14.481974Z",
+ "start_time": "2022-04-09T17:18:14.449989Z"
+ },
+ "hidden": true
+ },
+ "source": [
+ "**Without OriginAimedDepartureTime the overall match rate is 99% while the missing rows doesn't have Lon and Lat data in source (most of the missing rows are from the train)**"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2022-03-01T21:50:27.787066Z",
+ "start_time": "2022-03-01T21:50:27.055188Z"
+ },
+ "hidden": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.7.3"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}