Skip to content

Commit 115b4f6

Browse files
committed
Updates for 0.17
1 parent 7fdee02 commit 115b4f6

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

1-tutorials/10-smoothing-trajectories.ipynb

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@
6767
"split = mpd.ObservationGapSplitter(tc).split(gap=timedelta(minutes=15))"
6868
]
6969
},
70-
{
71-
"cell_type": "code",
72-
"execution_count": null,
73-
"metadata": {},
74-
"outputs": [],
75-
"source": [
76-
"split.plot(column='trajectory_id', **plot_defaults)"
77-
]
78-
},
7970
{
8071
"attachments": {},
8172
"cell_type": "markdown",
@@ -144,12 +135,10 @@
144135
"metadata": {},
145136
"outputs": [],
146137
"source": [
147-
"traj = split.trajectories[2]\n",
138+
"traj = split.trajectories[8]\n",
148139
"\n",
149140
"cleaned = traj.copy()\n",
150-
"cleaned.add_speed(overwrite=True)\n",
151-
"for i in range(0,10):\n",
152-
" cleaned = mpd.OutlierCleaner(cleaned).clean({'speed': 1})\n",
141+
"cleaned = mpd.OutlierCleaner(cleaned).clean(alpha=2)\n",
153142
"\n",
154143
"smoothed = mpd.KalmanSmootherCV(cleaned).smooth(process_noise_std=0.1, measurement_noise_std=10)\n",
155144
" \n",
@@ -182,7 +171,7 @@
182171
"name": "python",
183172
"nbconvert_exporter": "python",
184173
"pygments_lexer": "ipython3",
185-
"version": "3.10.10"
174+
"version": "3.10.12"
186175
}
187176
},
188177
"nbformat": 4,

2-analysis-examples/ever-given.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"\n",
1010
"<img align=\"right\" src=\"https://movingpandas.github.io/movingpandas/assets/img/movingpandas.png\">\n",
1111
"\n",
12+
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/movingpandas/movingpandas-examples/main?filepath=2-analysis-examples/ever-given.ipynb)\n",
13+
"[![IPYNB](https://img.shields.io/badge/view-ipynb-hotpink)](https://github.com/movingpandas/movingpandas-examples/blob/main/2-analysis-examples/ever-given.ipynb)\n",
14+
"[![HTML](https://img.shields.io/badge/view-html-green)](https://movingpandas.github.io/movingpandas-website/2-analysis-examples/ever-given.html)\n",
15+
"\n",
1216
"This notebook presents an analysis of the vessel situation following the grounding of Ever Given in the Suez Canal.\n",
1317
"\n",
1418
"\n",
@@ -185,7 +189,7 @@
185189
],
186190
"metadata": {
187191
"kernelspec": {
188-
"display_name": "mpd-ex",
192+
"display_name": "Python 3 (ipykernel)",
189193
"language": "python",
190194
"name": "python3"
191195
},

2-analysis-examples/mars-rover.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
"metadata": {},
137137
"outputs": [],
138138
"source": [
139-
"traj_plot = m20_traj.hvplot(title=\"M20 & heli trajectories\", line_width=3, **hvplot_defaults) * heli_traj.hvplot(line_width=3, **hvplot_defaults)\n",
139+
"traj_plot = m20_traj.hvplot(title=\"M20 & heli trajectories\", line_width=3, **hvplot_defaults) * heli_traj.hvplot(line_width=3, color='red', **hvplot_defaults)\n",
140140
"traj_plot "
141141
]
142142
},
@@ -210,7 +210,7 @@
210210
"def mars_tiles(plot, element):\n",
211211
" plot.state.add_tile(TMSTileSource(url=tile_url), level='underlay')\n",
212212
"\n",
213-
"traj_map = m20_traj.hvplot(title=\"M20 & heli trajectories\", tiles=None) * heli_traj.hvplot(**hvplot_defaults)\n",
213+
"traj_map = m20_traj.hvplot(title=\"M20 & heli trajectories\", tiles=None) * heli_traj.hvplot(color='red', **hvplot_defaults)\n",
214214
"traj_map.opts(hooks=[mars_tiles])"
215215
]
216216
},
@@ -233,7 +233,7 @@
233233
" 'https://trek.nasa.gov/tiles/Mars/EQ/Mars_MGS_MOLA_ClrShade_merge_global_463m/1.0.0/default/default028mm/{Z}/{Y}/{X}.jpg',\n",
234234
" name=\"Mars\")\n",
235235
"\n",
236-
"m20_traj.hvplot(title=\"M20 & heli trajectories\", tiles=MarsImagery) * heli_traj.hvplot(**hvplot_defaults)\n"
236+
"m20_traj.hvplot(title=\"M20 & heli trajectories\", tiles=MarsImagery) * heli_traj.hvplot(color='red', **hvplot_defaults)\n"
237237
]
238238
},
239239
{
@@ -269,7 +269,7 @@
269269
"name": "python",
270270
"nbconvert_exporter": "python",
271271
"pygments_lexer": "ipython3",
272-
"version": "3.10.8"
272+
"version": "3.10.12"
273273
}
274274
},
275275
"nbformat": 4,

2-analysis-examples/ship-data.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@
197197
"metadata": {},
198198
"outputs": [],
199199
"source": [
200-
"shiptype_to_color = {'Passenger': 'blue', 'HSC': 'green', 'Tanker': 'red', 'Cargo': 'orange'}\n",
200+
"shiptype_to_color = {'Passenger': 'blue', 'HSC': 'green', 'Tanker': 'red', 'Cargo': 'orange', 'Sailing': 'grey', 'Other': 'grey', \n",
201+
" 'Tug': 'grey', 'SAR': 'grey', 'Undefined': 'grey', 'Pleasure': 'grey', 'Dredging': 'grey', 'Law enforcement': 'grey',\n",
202+
" 'Pilot': 'grey', 'Fishing': 'grey', 'Diving':'grey', 'Spare 2': 'grey'}\n",
201203
"traj_collection.plot(column='ShipType', column_to_color=shiptype_to_color, linewidth=1, capstyle='round')"
202204
]
203205
},
@@ -626,7 +628,7 @@
626628
"name": "python",
627629
"nbconvert_exporter": "python",
628630
"pygments_lexer": "ipython3",
629-
"version": "3.10.8"
631+
"version": "3.10.12"
630632
}
631633
},
632634
"nbformat": 4,

0 commit comments

Comments
 (0)