Skip to content

Instantly share code, notes, and snippets.

@deton
Last active June 1, 2025 07:07
Show Gist options
  • Save deton/8c4bd41faa4060dfa4a68066a5403be3 to your computer and use it in GitHub Desktop.
Save deton/8c4bd41faa4060dfa4a68066a5403be3 to your computer and use it in GitHub Desktop.
Display GTFS stop_times.txt using gtfs_kit and kepler.gl Trip Layer, pydeck TripsLayer, or folium TimestampedGeoJson
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Display GTFS stop_times.txt using pydeck TripsLayer\n",
"\n",
"https://colab.research.google.com/drive/1UDgmGeJ5JSbYVhkPJyx2I7uwkKXezXuZ?usp=sharing\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%pip install gtfs_kit pydeck"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>indicator</th>\n",
" <th>value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>agencies</td>\n",
" <td>[ハマちゃんバス]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>timezone</td>\n",
" <td>Asia/Tokyo</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>start_date</td>\n",
" <td>20230601</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>end_date</td>\n",
" <td>20260331</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>num_routes</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>num_trips</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>num_stops</td>\n",
" <td>31</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>num_shapes</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>sample_date</td>\n",
" <td>20230608</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>num_routes_active_on_sample_date</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>num_trips_active_on_sample_date</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>num_stops_active_on_sample_date</td>\n",
" <td>20</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" indicator value\n",
"0 agencies [ハマちゃんバス]\n",
"1 timezone Asia/Tokyo\n",
"2 start_date 20230601\n",
"3 end_date 20260331\n",
"4 num_routes 3\n",
"5 num_trips 12\n",
"6 num_stops 31\n",
"7 num_shapes 3\n",
"8 sample_date 20230608\n",
"9 num_routes_active_on_sample_date 3\n",
"10 num_trips_active_on_sample_date 12\n",
"11 num_stops_active_on_sample_date 20"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import gtfs_kit as gk\n",
"\n",
"# https://bustime.jp/GtfsAgency/gtfs_list?p1=14\n",
"url = 'https://api.gtfs-data.jp/v2/organizations/yokosukacity/feeds/hamachanbus/files/feed.zip'\n",
"feed = gk.read_feed(url, dist_units='m')\n",
"feed.describe()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"week = feed.get_first_week()\n",
"date = week[0] # Monday"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>stop_id</th>\n",
" <th>stop_name</th>\n",
" <th>platform_code</th>\n",
" <th>stop_lat</th>\n",
" <th>stop_lon</th>\n",
" <th>zone_id</th>\n",
" <th>location_type</th>\n",
" <th>parent_station</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>S1_1</td>\n",
" <td>追浜東団地集会所</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.309189</td>\n",
" <td>139.629466</td>\n",
" <td>S1_1</td>\n",
" <td>0</td>\n",
" <td>S1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>S1_2</td>\n",
" <td>追浜東団地集会所</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.309189</td>\n",
" <td>139.629466</td>\n",
" <td>S1_2</td>\n",
" <td>0</td>\n",
" <td>S1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>S2_1</td>\n",
" <td>パークハウス</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.310473</td>\n",
" <td>139.628737</td>\n",
" <td>S2_1</td>\n",
" <td>0</td>\n",
" <td>S2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>S2_2</td>\n",
" <td>パークハウス</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.310473</td>\n",
" <td>139.628737</td>\n",
" <td>S2_2</td>\n",
" <td>0</td>\n",
" <td>S2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>S3_1</td>\n",
" <td>浜見台1丁目</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.309822</td>\n",
" <td>139.626619</td>\n",
" <td>S3_1</td>\n",
" <td>0</td>\n",
" <td>S3</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" stop_id stop_name platform_code stop_lat stop_lon zone_id \\\n",
"1 S1_1 追浜東団地集会所 <NA> 35.309189 139.629466 S1_1 \n",
"2 S1_2 追浜東団地集会所 <NA> 35.309189 139.629466 S1_2 \n",
"4 S2_1 パークハウス <NA> 35.310473 139.628737 S2_1 \n",
"5 S2_2 パークハウス <NA> 35.310473 139.628737 S2_2 \n",
"7 S3_1 浜見台1丁目 <NA> 35.309822 139.626619 S3_1 \n",
"\n",
" location_type parent_station \n",
"1 0 S1 \n",
"2 0 S1 \n",
"4 0 S2 \n",
"5 0 S2 \n",
"7 0 S3 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dfstops = feed.get_stops(date)\n",
"dfstops.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>trip_id</th>\n",
" <th>arrival_time</th>\n",
" <th>departure_time</th>\n",
" <th>stop_id</th>\n",
" <th>stop_sequence</th>\n",
" <th>stop_headsign</th>\n",
" <th>pickup_type</th>\n",
" <th>drop_off_type</th>\n",
" <th>stop_name</th>\n",
" <th>platform_code</th>\n",
" <th>stop_lat</th>\n",
" <th>stop_lon</th>\n",
" <th>zone_id</th>\n",
" <th>location_type</th>\n",
" <th>parent_station</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>R3+0+平日+1</td>\n",
" <td>10:29:00</td>\n",
" <td>10:29:00</td>\n",
" <td>S1_1</td>\n",
" <td>1</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>追浜東団地集会所</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.309189</td>\n",
" <td>139.629466</td>\n",
" <td>S1_1</td>\n",
" <td>0</td>\n",
" <td>S1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>R3+0+平日+1</td>\n",
" <td>10:32:00</td>\n",
" <td>10:32:00</td>\n",
" <td>S3_1</td>\n",
" <td>2</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>浜見台1丁目</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.309822</td>\n",
" <td>139.626619</td>\n",
" <td>S3_1</td>\n",
" <td>0</td>\n",
" <td>S3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>R3+0+平日+1</td>\n",
" <td>10:34:00</td>\n",
" <td>10:34:00</td>\n",
" <td>S4_1</td>\n",
" <td>3</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>浜見台2丁目A</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.306984</td>\n",
" <td>139.628112</td>\n",
" <td>S4_1</td>\n",
" <td>0</td>\n",
" <td>S4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>R3+0+平日+1</td>\n",
" <td>10:35:00</td>\n",
" <td>10:35:00</td>\n",
" <td>S5_1</td>\n",
" <td>4</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>浜見台2丁目B</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.306837</td>\n",
" <td>139.629605</td>\n",
" <td>S5_1</td>\n",
" <td>0</td>\n",
" <td>S5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>R3+0+平日+1</td>\n",
" <td>10:36:00</td>\n",
" <td>10:36:00</td>\n",
" <td>S6_1</td>\n",
" <td>5</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>ケアセンター</td>\n",
" <td>&lt;NA&gt;</td>\n",
" <td>35.308191</td>\n",
" <td>139.630542</td>\n",
" <td>S6_1</td>\n",
" <td>0</td>\n",
" <td>S6</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" trip_id arrival_time departure_time stop_id stop_sequence stop_headsign \\\n",
"0 R3+0+平日+1 10:29:00 10:29:00 S1_1 1 <NA> \n",
"1 R3+0+平日+1 10:32:00 10:32:00 S3_1 2 <NA> \n",
"2 R3+0+平日+1 10:34:00 10:34:00 S4_1 3 <NA> \n",
"3 R3+0+平日+1 10:35:00 10:35:00 S5_1 4 <NA> \n",
"4 R3+0+平日+1 10:36:00 10:36:00 S6_1 5 <NA> \n",
"\n",
" pickup_type drop_off_type stop_name platform_code stop_lat stop_lon \\\n",
"0 0 1 追浜東団地集会所 <NA> 35.309189 139.629466 \n",
"1 0 0 浜見台1丁目 <NA> 35.309822 139.626619 \n",
"2 0 0 浜見台2丁目A <NA> 35.306984 139.628112 \n",
"3 0 0 浜見台2丁目B <NA> 35.306837 139.629605 \n",
"4 0 0 ケアセンター <NA> 35.308191 139.630542 \n",
"\n",
" zone_id location_type parent_station \n",
"0 S1_1 0 S1 \n",
"1 S3_1 0 S3 \n",
"2 S4_1 0 S4 \n",
"3 S5_1 0 S5 \n",
"4 S6_1 0 S6 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"dfst = feed.get_stop_times(date)\n",
"dfst = dfst.merge(dfstops)\n",
"display(dfst.head())\n",
"tripsdict = dfst.groupby('trip_id').apply(lambda x: x.to_dict(orient='records'), include_groups=False).to_dict()\n",
"#tripsdict"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import datetime\n",
"datesec = 0 # int(datetime.datetime.fromisoformat(date).timestamp())\n",
"timemin = 86400\n",
"timemax = 0\n",
"tripsdata = []\n",
"for trip_id, stop_times_list in tripsdict.items():\n",
" coords = []\n",
" times = []\n",
" stop_times_list.sort(key=lambda x: x['arrival_time'])\n",
" for st in stop_times_list:\n",
" timesec = datesec + gk.helpers.timestr_to_seconds(st['arrival_time'])\n",
" coords.append([st['stop_lon'], st['stop_lat']])\n",
" times.append(timesec)\n",
" if st.get('departure_time') and st['departure_time'] != st['arrival_time']:\n",
" timesec = datesec + gk.helpers.timestr_to_seconds(st['departure_time'])\n",
" coords.append([st['stop_lon'], st['stop_lat']])\n",
" times.append(timesec)\n",
" tripsdata.append({\n",
" 'vendor': trip_id,\n",
" 'path': coords,\n",
" 'timestamps': times,\n",
" })\n",
" timemin = min(timemin, *times)\n",
" timemax = max(timemax, *times)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Save json file for https://gist.github.com/deton/57ae19aed61b03e954df43fa10aa5584\n",
"import json\n",
"with open('trips.json', 'w', encoding='utf-8') as f:\n",
" json.dump(tripsdata, f, ensure_ascii=False)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"100%\"\n",
" height=500\n",
" frameborder=\"0\"\n",
" srcdoc=\"&lt;!DOCTYPE html&gt;\n",
"&lt;html&gt;\n",
" &lt;head&gt;\n",
" &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;\n",
" &lt;title&gt;pydeck&lt;/title&gt;\n",
" &lt;script src=&quot;https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js&quot;&gt;&lt;/script&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css&quot; /&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css&quot; /&gt;\n",
" &lt;script src=&#x27;https://cdn.jsdelivr.net/npm/@deck.gl/jupyter-widget@~9.0.*/dist/index.js&#x27;&gt;&lt;/script&gt;\n",
" &lt;style&gt;\n",
" body {\n",
" margin: 0;\n",
" padding: 0;\n",
" overflow: hidden;\n",
"}\n",
"\n",
"#deck-container {\n",
" width: 100vw;\n",
" height: 100vh;\n",
"}\n",
"\n",
"#deck-container canvas {\n",
" z-index: 1;\n",
" background: none;\n",
"}\n",
" &lt;/style&gt;\n",
" &lt;/head&gt;\n",
" &lt;body&gt;\n",
" &lt;div id=&quot;deck-container&quot;&gt;\n",
" &lt;/div&gt;\n",
" &lt;/body&gt;\n",
" &lt;script&gt;\n",
" const container = document.getElementById(&#x27;deck-container&#x27;);\n",
" const jsonInput = {\n",
" &quot;initialViewState&quot;: {\n",
" &quot;latitude&quot;: 35.31096571896044,\n",
" &quot;longitude&quot;: 139.62906620169795,\n",
" &quot;zoom&quot;: 14\n",
" },\n",
" &quot;layers&quot;: [\n",
" {\n",
" &quot;@@type&quot;: &quot;TripsLayer&quot;,\n",
" &quot;capRounded&quot;: true,\n",
" &quot;currentTime&quot;: 32820,\n",
" &quot;data&quot;: [\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62203561756,\n",
" 35.3204373901619\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 30180,\n",
" 30240,\n",
" 30420,\n",
" 30540,\n",
" 30600,\n",
" 30660,\n",
" 30720,\n",
" 30900,\n",
" 31200,\n",
" 31560,\n",
" 31920,\n",
" 31980,\n",
" 32160,\n",
" 32280,\n",
" 32340,\n",
" 32400,\n",
" 32460,\n",
" 32580,\n",
" 32760,\n",
" 32820\n",
" ],\n",
" &quot;vendor&quot;: &quot;R1+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62203561756,\n",
" 35.3204373901619\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 32880,\n",
" 32940,\n",
" 33120,\n",
" 33240,\n",
" 33300,\n",
" 33360,\n",
" 33420,\n",
" 33600,\n",
" 33900,\n",
" 34320,\n",
" 34740,\n",
" 34800,\n",
" 34980,\n",
" 35100,\n",
" 35160,\n",
" 35220,\n",
" 35280,\n",
" 35400,\n",
" 35580,\n",
" 35640\n",
" ],\n",
" &quot;vendor&quot;: &quot;R1+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 36060,\n",
" 36120,\n",
" 36180,\n",
" 36240,\n",
" 36420,\n",
" 36720,\n",
" 36780,\n",
" 36840,\n",
" 37020,\n",
" 37140,\n",
" 37200,\n",
" 37260,\n",
" 37320,\n",
" 37440,\n",
" 37620,\n",
" 37680,\n",
" 35700,\n",
" 35760,\n",
" 35940\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 39780,\n",
" 39840,\n",
" 40020,\n",
" 40140,\n",
" 40200,\n",
" 40260,\n",
" 40320,\n",
" 40500,\n",
" 40800,\n",
" 40860,\n",
" 40920,\n",
" 41100,\n",
" 41220,\n",
" 41280,\n",
" 41340,\n",
" 41400,\n",
" 41520,\n",
" 41700,\n",
" 41760\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 47160,\n",
" 47220,\n",
" 47400,\n",
" 47520,\n",
" 47580,\n",
" 47640,\n",
" 47700,\n",
" 47880,\n",
" 48180,\n",
" 48240,\n",
" 48300,\n",
" 48480,\n",
" 48600,\n",
" 48660,\n",
" 48720,\n",
" 48780,\n",
" 48840,\n",
" 49020,\n",
" 49080\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+3&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 49140,\n",
" 49200,\n",
" 49380,\n",
" 49500,\n",
" 49560,\n",
" 49620,\n",
" 49680,\n",
" 49860,\n",
" 50160,\n",
" 50220,\n",
" 50280,\n",
" 50460,\n",
" 50580,\n",
" 50640,\n",
" 50700,\n",
" 50760,\n",
" 50820,\n",
" 51000,\n",
" 51060\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+4&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 53280,\n",
" 53340,\n",
" 53520,\n",
" 53640,\n",
" 53700,\n",
" 53760,\n",
" 53820,\n",
" 54000,\n",
" 54300,\n",
" 54360,\n",
" 54420,\n",
" 54600,\n",
" 54720,\n",
" 54780,\n",
" 54840,\n",
" 54900,\n",
" 54960,\n",
" 55140,\n",
" 55200\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+5&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 57420,\n",
" 57480,\n",
" 57660,\n",
" 57780,\n",
" 57840,\n",
" 57900,\n",
" 57960,\n",
" 58140,\n",
" 58440,\n",
" 58500,\n",
" 58560,\n",
" 58740,\n",
" 58860,\n",
" 58920,\n",
" 58980,\n",
" 59040,\n",
" 59100,\n",
" 59280,\n",
" 59340\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+6&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 37740,\n",
" 37920,\n",
" 38040,\n",
" 38100,\n",
" 38160,\n",
" 38220,\n",
" 38520,\n",
" 38580,\n",
" 38640,\n",
" 38820,\n",
" 38940,\n",
" 39000,\n",
" 39060,\n",
" 39120,\n",
" 39240,\n",
" 39420,\n",
" 39480\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 41820,\n",
" 42000,\n",
" 42120,\n",
" 42180,\n",
" 42240,\n",
" 42300,\n",
" 42600,\n",
" 42660,\n",
" 42720,\n",
" 42900,\n",
" 43020,\n",
" 43080,\n",
" 43140,\n",
" 43200,\n",
" 43320,\n",
" 43500,\n",
" 43560\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 51300,\n",
" 51480,\n",
" 51600,\n",
" 51660,\n",
" 51720,\n",
" 51780,\n",
" 52080,\n",
" 52140,\n",
" 52200,\n",
" 52380,\n",
" 52500,\n",
" 52560,\n",
" 52620,\n",
" 52680,\n",
" 52740,\n",
" 52920,\n",
" 52980\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+3&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 55440,\n",
" 55620,\n",
" 55740,\n",
" 55800,\n",
" 55860,\n",
" 55920,\n",
" 56220,\n",
" 56280,\n",
" 56340,\n",
" 56520,\n",
" 56640,\n",
" 56700,\n",
" 56760,\n",
" 56820,\n",
" 56880,\n",
" 57060,\n",
" 57120\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+4&quot;\n",
" }\n",
" ],\n",
" &quot;getColor&quot;: [\n",
" 253,\n",
" 128,\n",
" 93\n",
" ],\n",
" &quot;getPath&quot;: &quot;@@=path&quot;,\n",
" &quot;getTimestamps&quot;: &quot;@@=timestamps&quot;,\n",
" &quot;id&quot;: &quot;1358894c-c936-4f81-93ca-1208c335f0e5&quot;,\n",
" &quot;jointRounded&quot;: true,\n",
" &quot;opacity&quot;: 0.8,\n",
" &quot;trailLength&quot;: 600,\n",
" &quot;widthMinPixels&quot;: 5\n",
" }\n",
" ],\n",
" &quot;mapProvider&quot;: &quot;carto&quot;,\n",
" &quot;mapStyle&quot;: &quot;https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json&quot;,\n",
" &quot;views&quot;: [\n",
" {\n",
" &quot;@@type&quot;: &quot;MapView&quot;,\n",
" &quot;controller&quot;: true\n",
" }\n",
" ]\n",
"};\n",
" const tooltip = true;\n",
" const customLibraries = null;\n",
" const configuration = null;\n",
"\n",
" const deckInstance = createDeck({\n",
" container,\n",
" jsonInput,\n",
" tooltip,\n",
" customLibraries,\n",
" configuration\n",
" });\n",
"\n",
" &lt;/script&gt;\n",
"&lt;/html&gt;\"\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pydeck\n",
"\n",
"current_time = timemin\n",
"layer = pydeck.Layer(\n",
" 'TripsLayer',\n",
" tripsdata,\n",
" get_path='path',\n",
" get_timestamps='timestamps',\n",
" get_color=[253, 128, 93],\n",
" opacity=0.8,\n",
" width_min_pixels=5,\n",
" joint_rounded=True,\n",
" cap_rounded=True,\n",
" trail_length=600,\n",
" current_time=tripsdata[0]['timestamps'][-1],\n",
" # current_time=current_time,\n",
")\n",
"\n",
"view_state = pydeck.data_utils.compute_view(tripsdata[0]['path'])\n",
"# view_state = pydeck.ViewState(\n",
"# longitude=tripsdata[0]['path'][0][0],\n",
"# latitude=tripsdata[0]['path'][0][1],\n",
"# zoom=13\n",
"# )\n",
"\n",
"r = pydeck.Deck(layers=[layer], initial_view_state=view_state)\n",
"r.to_html('pydecktrips.html')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"100%\"\n",
" height=500\n",
" frameborder=\"0\"\n",
" srcdoc=\"&lt;!DOCTYPE html&gt;\n",
"&lt;html&gt;\n",
" &lt;head&gt;\n",
" &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;\n",
" &lt;title&gt;pydeck&lt;/title&gt;\n",
" &lt;script src=&quot;https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js&quot;&gt;&lt;/script&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css&quot; /&gt;\n",
" &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css&quot; /&gt;\n",
" &lt;script src=&#x27;https://cdn.jsdelivr.net/npm/@deck.gl/jupyter-widget@~9.0.*/dist/index.js&#x27;&gt;&lt;/script&gt;\n",
" &lt;style&gt;\n",
" body {\n",
" margin: 0;\n",
" padding: 0;\n",
" overflow: hidden;\n",
"}\n",
"\n",
"#deck-container {\n",
" width: 100vw;\n",
" height: 100vh;\n",
"}\n",
"\n",
"#deck-container canvas {\n",
" z-index: 1;\n",
" background: none;\n",
"}\n",
" &lt;/style&gt;\n",
" &lt;/head&gt;\n",
" &lt;body&gt;\n",
" &lt;div id=&quot;deck-container&quot;&gt;\n",
" &lt;/div&gt;\n",
" &lt;/body&gt;\n",
" &lt;script&gt;\n",
" const container = document.getElementById(&#x27;deck-container&#x27;);\n",
" const jsonInput = {\n",
" &quot;initialViewState&quot;: {\n",
" &quot;latitude&quot;: 35.31096571896044,\n",
" &quot;longitude&quot;: 139.62906620169795,\n",
" &quot;zoom&quot;: 14\n",
" },\n",
" &quot;layers&quot;: [\n",
" {\n",
" &quot;@@type&quot;: &quot;TripsLayer&quot;,\n",
" &quot;capRounded&quot;: true,\n",
" &quot;currentTime&quot;: 30180,\n",
" &quot;data&quot;: [\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62203561756,\n",
" 35.3204373901619\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 30180,\n",
" 30240,\n",
" 30420,\n",
" 30540,\n",
" 30600,\n",
" 30660,\n",
" 30720,\n",
" 30900,\n",
" 31200,\n",
" 31560,\n",
" 31920,\n",
" 31980,\n",
" 32160,\n",
" 32280,\n",
" 32340,\n",
" 32400,\n",
" 32460,\n",
" 32580,\n",
" 32760,\n",
" 32820\n",
" ],\n",
" &quot;vendor&quot;: &quot;R1+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62203561756,\n",
" 35.3204373901619\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 32880,\n",
" 32940,\n",
" 33120,\n",
" 33240,\n",
" 33300,\n",
" 33360,\n",
" 33420,\n",
" 33600,\n",
" 33900,\n",
" 34320,\n",
" 34740,\n",
" 34800,\n",
" 34980,\n",
" 35100,\n",
" 35160,\n",
" 35220,\n",
" 35280,\n",
" 35400,\n",
" 35580,\n",
" 35640\n",
" ],\n",
" &quot;vendor&quot;: &quot;R1+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 36060,\n",
" 36120,\n",
" 36180,\n",
" 36240,\n",
" 36420,\n",
" 36720,\n",
" 36780,\n",
" 36840,\n",
" 37020,\n",
" 37140,\n",
" 37200,\n",
" 37260,\n",
" 37320,\n",
" 37440,\n",
" 37620,\n",
" 37680,\n",
" 35700,\n",
" 35760,\n",
" 35940\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 39780,\n",
" 39840,\n",
" 40020,\n",
" 40140,\n",
" 40200,\n",
" 40260,\n",
" 40320,\n",
" 40500,\n",
" 40800,\n",
" 40860,\n",
" 40920,\n",
" 41100,\n",
" 41220,\n",
" 41280,\n",
" 41340,\n",
" 41400,\n",
" 41520,\n",
" 41700,\n",
" 41760\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 47160,\n",
" 47220,\n",
" 47400,\n",
" 47520,\n",
" 47580,\n",
" 47640,\n",
" 47700,\n",
" 47880,\n",
" 48180,\n",
" 48240,\n",
" 48300,\n",
" 48480,\n",
" 48600,\n",
" 48660,\n",
" 48720,\n",
" 48780,\n",
" 48840,\n",
" 49020,\n",
" 49080\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+3&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 49140,\n",
" 49200,\n",
" 49380,\n",
" 49500,\n",
" 49560,\n",
" 49620,\n",
" 49680,\n",
" 49860,\n",
" 50160,\n",
" 50220,\n",
" 50280,\n",
" 50460,\n",
" 50580,\n",
" 50640,\n",
" 50700,\n",
" 50760,\n",
" 50820,\n",
" 51000,\n",
" 51060\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+4&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 53280,\n",
" 53340,\n",
" 53520,\n",
" 53640,\n",
" 53700,\n",
" 53760,\n",
" 53820,\n",
" 54000,\n",
" 54300,\n",
" 54360,\n",
" 54420,\n",
" 54600,\n",
" 54720,\n",
" 54780,\n",
" 54840,\n",
" 54900,\n",
" 54960,\n",
" 55140,\n",
" 55200\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+5&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 57420,\n",
" 57480,\n",
" 57660,\n",
" 57780,\n",
" 57840,\n",
" 57900,\n",
" 57960,\n",
" 58140,\n",
" 58440,\n",
" 58500,\n",
" 58560,\n",
" 58740,\n",
" 58860,\n",
" 58920,\n",
" 58980,\n",
" 59040,\n",
" 59100,\n",
" 59280,\n",
" 59340\n",
" ],\n",
" &quot;vendor&quot;: &quot;R2+0+\\u5e73\\u65e5+6&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 37740,\n",
" 37920,\n",
" 38040,\n",
" 38100,\n",
" 38160,\n",
" 38220,\n",
" 38520,\n",
" 38580,\n",
" 38640,\n",
" 38820,\n",
" 38940,\n",
" 39000,\n",
" 39060,\n",
" 39120,\n",
" 39240,\n",
" 39420,\n",
" 39480\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+1&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 41820,\n",
" 42000,\n",
" 42120,\n",
" 42180,\n",
" 42240,\n",
" 42300,\n",
" 42600,\n",
" 42660,\n",
" 42720,\n",
" 42900,\n",
" 43020,\n",
" 43080,\n",
" 43140,\n",
" 43200,\n",
" 43320,\n",
" 43500,\n",
" 43560\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+2&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 51300,\n",
" 51480,\n",
" 51600,\n",
" 51660,\n",
" 51720,\n",
" 51780,\n",
" 52080,\n",
" 52140,\n",
" 52200,\n",
" 52380,\n",
" 52500,\n",
" 52560,\n",
" 52620,\n",
" 52680,\n",
" 52740,\n",
" 52920,\n",
" 52980\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+3&quot;\n",
" },\n",
" {\n",
" &quot;path&quot;: [\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.62708642052743,\n",
" 35.31633967944443\n",
" ],\n",
" [\n",
" 139.62641987091095,\n",
" 35.316293190801034\n",
" ],\n",
" [\n",
" 139.628424113353,\n",
" 35.3167226977435\n",
" ],\n",
" [\n",
" 139.633111386316,\n",
" 35.3124437872117\n",
" ],\n",
" [\n",
" 139.63248650319,\n",
" 35.3108206884306\n",
" ],\n",
" [\n",
" 139.630542326811,\n",
" 35.3081907229082\n",
" ],\n",
" [\n",
" 139.629604959444,\n",
" 35.3068366829395\n",
" ],\n",
" [\n",
" 139.628112024185,\n",
" 35.306984196272\n",
" ],\n",
" [\n",
" 139.626618982737,\n",
" 35.3098223806385\n",
" ],\n",
" [\n",
" 139.628736833672,\n",
" 35.3104734056088\n",
" ],\n",
" [\n",
" 139.629465989449,\n",
" 35.3091888465196\n",
" ]\n",
" ],\n",
" &quot;timestamps&quot;: [\n",
" 55440,\n",
" 55620,\n",
" 55740,\n",
" 55800,\n",
" 55860,\n",
" 55920,\n",
" 56220,\n",
" 56280,\n",
" 56340,\n",
" 56520,\n",
" 56640,\n",
" 56700,\n",
" 56760,\n",
" 56820,\n",
" 56880,\n",
" 57060,\n",
" 57120\n",
" ],\n",
" &quot;vendor&quot;: &quot;R3+0+\\u5e73\\u65e5+4&quot;\n",
" }\n",
" ],\n",
" &quot;getColor&quot;: [\n",
" 253,\n",
" 128,\n",
" 93\n",
" ],\n",
" &quot;getPath&quot;: &quot;@@=path&quot;,\n",
" &quot;getTimestamps&quot;: &quot;@@=timestamps&quot;,\n",
" &quot;id&quot;: &quot;f449e9d3-7f1d-4835-99bd-0610c72eec95&quot;,\n",
" &quot;jointRounded&quot;: true,\n",
" &quot;opacity&quot;: 0.8,\n",
" &quot;trailLength&quot;: 600,\n",
" &quot;widthMinPixels&quot;: 5\n",
" }\n",
" ],\n",
" &quot;mapProvider&quot;: &quot;carto&quot;,\n",
" &quot;mapStyle&quot;: &quot;https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json&quot;,\n",
" &quot;views&quot;: [\n",
" {\n",
" &quot;@@type&quot;: &quot;MapView&quot;,\n",
" &quot;controller&quot;: true\n",
" }\n",
" ]\n",
"};\n",
" const tooltip = true;\n",
" const customLibraries = null;\n",
" const configuration = null;\n",
"\n",
" const deckInstance = createDeck({\n",
" container,\n",
" jsonInput,\n",
" tooltip,\n",
" customLibraries,\n",
" configuration\n",
" });\n",
"\n",
" &lt;/script&gt;\n",
"&lt;/html&gt;\"\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"ename": "NotImplementedError",
"evalue": "Jupyter-specific features not currently supported in pydeck v0.9.",
"output_type": "error",
"traceback": [
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
"\u001b[31mNotImplementedError\u001b[39m Traceback (most recent call last)",
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[28]\u001b[39m\u001b[32m, line 10\u001b[39m\n\u001b[32m 8\u001b[39m current_time = current_time + timestep\n\u001b[32m 9\u001b[39m layer.current_time = current_time\n\u001b[32m---> \u001b[39m\u001b[32m10\u001b[39m \u001b[43mr\u001b[49m\u001b[43m.\u001b[49m\u001b[43mupdate\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 11\u001b[39m time.sleep(\u001b[32m0.5\u001b[39m)\n",
"\u001b[36mFile \u001b[39m\u001b[32md:\\deton\\work\\gtfs_kit\\notebooks\\.venv\\Lib\\site-packages\\pydeck\\bindings\\deck.py:174\u001b[39m, in \u001b[36mDeck.update\u001b[39m\u001b[34m(self)\u001b[39m\n\u001b[32m 153\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"Update a deck.gl map to reflect the current configuration\u001b[39;00m\n\u001b[32m 154\u001b[39m \n\u001b[32m 155\u001b[39m \u001b[33;03mFor example, if you've modified data passed to Layer and rendered the map using `.show()`,\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 158\u001b[39m \u001b[33;03mIntended for use in a Jupyter environment.\u001b[39;00m\n\u001b[32m 159\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 160\u001b[39m \u001b[38;5;66;03m# TODO: Jupyter-specific features not currently supported in pydeck v0.9.\u001b[39;00m\n\u001b[32m 161\u001b[39m \u001b[38;5;66;03m# if not has_jupyter_extra():\u001b[39;00m\n\u001b[32m 162\u001b[39m \u001b[38;5;66;03m# raise ImportError(\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 172\u001b[39m \u001b[38;5;66;03m# if has_binary:\u001b[39;00m\n\u001b[32m 173\u001b[39m \u001b[38;5;66;03m# self.deck_widget.data_buffer = binary_data_sets\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m174\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m(\n\u001b[32m 175\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mJupyter-specific features not currently supported in pydeck v0.9.\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 176\u001b[39m )\n",
"\u001b[31mNotImplementedError\u001b[39m: Jupyter-specific features not currently supported in pydeck v0.9."
]
}
],
"source": [
"# https://github.com/visgl/deck.gl/blob/master/bindings/pydeck/examples/06%20-%20Conway%27s%20Game%20of%20Life.ipynb\n",
"import time\n",
"NUM_ITERATIONS = 100\n",
"timerange = timemax - timemin\n",
"timestep = timerange / NUM_ITERATIONS\n",
"display(r.show())\n",
"for i in range(0, NUM_ITERATIONS):\n",
" current_time = current_time + timestep\n",
" layer.current_time = current_time\n",
" # XXX: NotImplementedError: Jupyter-specific features not currently supported in pydeck v0.9.\n",
" r.update()\n",
" time.sleep(0.5)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"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.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment