Skip to content

Commit f5adb22

Browse files
committed
add additional tutorials for android decimeter challenge
1 parent ef9151f commit f5adb22

2 files changed

Lines changed: 192 additions & 15 deletions

File tree

notebooks/tutorials/parsers.ipynb

Lines changed: 187 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
"id": "76ee7e5e",
1414
"metadata": {},
1515
"source": [
16-
"# 2021 Google Android Derived Dataset"
16+
"# 2022 Google Android Derived Dataset"
1717
]
1818
},
1919
{
2020
"cell_type": "markdown",
2121
"id": "ceac98ce",
2222
"metadata": {},
2323
"source": [
24-
"This data comes from the 2021 Google Smartphone Decimeter Challenge and can be downloaded from [Kaggle](https://www.kaggle.com/c/google-smartphone-decimeter-challenge)."
24+
"This data comes from the 2022 Google Smartphone Decimeter Challenge and can be downloaded from [Kaggle](https://www.kaggle.com/c/smartphone-decimeter-2022)."
2525
]
2626
},
2727
{
@@ -31,43 +31,162 @@
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
34-
"from gnss_lib_py.parsers.android import AndroidDerived2021"
34+
"from gnss_lib_py.parsers.android import AndroidDerived2022"
3535
]
3636
},
3737
{
3838
"cell_type": "markdown",
3939
"id": "e2ec49c6",
4040
"metadata": {},
4141
"source": [
42-
"Loading the data into an instance of `NavData` is as easy as creating an instance of `AndroidDerived2021` with the relevant file path."
42+
"Loading the data into an instance of `NavData` is as easy as creating an instance of `AndroidDerived2022` with the relevant file path."
43+
]
44+
},
45+
{
46+
"cell_type": "code",
47+
"execution_count": null,
48+
"id": "c335608f",
49+
"metadata": {},
50+
"outputs": [],
51+
"source": [
52+
"# download Android data file\n",
53+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/android_2022/device_gnss.csv --quiet -O \"device_gnss.csv\"\n",
54+
"# load Android Google Challenge data\n",
55+
"derived_data = AndroidDerived2022(\"device_gnss.csv\")"
4356
]
4457
},
4558
{
4659
"cell_type": "markdown",
47-
"id": "0e7c9e45",
60+
"id": "eb53fe00",
4861
"metadata": {},
4962
"source": [
50-
"**Note:** In this case, the data is filtered to be seconds apart, in the regular\n",
51-
"setting, such measurements would be removed. To prevent this from happening,\n",
52-
"we use the remove_timing_outliers flag here. For the full dataset, set this flag to True"
63+
"We can verify that the data loaded correctly by printing the shape and rows of the imported data."
5364
]
5465
},
5566
{
5667
"cell_type": "code",
5768
"execution_count": null,
58-
"id": "c335608f",
69+
"id": "01b5d56a",
70+
"metadata": {},
71+
"outputs": [],
72+
"source": [
73+
"derived_data.shape"
74+
]
75+
},
76+
{
77+
"cell_type": "code",
78+
"execution_count": null,
79+
"id": "cc2d26d9",
80+
"metadata": {},
81+
"outputs": [],
82+
"source": [
83+
"derived_data.rows"
84+
]
85+
},
86+
{
87+
"cell_type": "markdown",
88+
"id": "076d5ea5",
89+
"metadata": {},
90+
"source": [
91+
"# 2022 Google Android Ground Truth\n",
92+
"We can similarly load in the ground truth data from the same 2022 Google Smartphone Decimeter Challenge."
93+
]
94+
},
95+
{
96+
"cell_type": "code",
97+
"execution_count": null,
98+
"id": "9369f387",
99+
"metadata": {},
100+
"outputs": [],
101+
"source": [
102+
"from gnss_lib_py.parsers.android import AndroidGroundTruth2022"
103+
]
104+
},
105+
{
106+
"cell_type": "code",
107+
"execution_count": null,
108+
"id": "21581d69",
59109
"metadata": {},
60110
"outputs": [],
61111
"source": [
62112
"# download Android data file\n",
63-
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/android_2021/Pixel4XL_derived.csv --quiet -O \"Pixel4XL_derived.csv\"\n",
113+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/android_2022/ground_truth.csv --quiet -O \"ground_truth.csv\"\n",
114+
"# load Android Google Challenge ground truth data\n",
115+
"gt_data = AndroidGroundTruth2022(\"ground_truth.csv\")"
116+
]
117+
},
118+
{
119+
"cell_type": "code",
120+
"execution_count": null,
121+
"id": "ef4a123a",
122+
"metadata": {},
123+
"outputs": [],
124+
"source": [
125+
"gt_data.shape"
126+
]
127+
},
128+
{
129+
"cell_type": "code",
130+
"execution_count": null,
131+
"id": "9f327d87",
132+
"metadata": {
133+
"scrolled": false
134+
},
135+
"outputs": [],
136+
"source": [
137+
"gt_data.rows"
138+
]
139+
},
140+
{
141+
"cell_type": "markdown",
142+
"id": "0f78bfdb",
143+
"metadata": {},
144+
"source": [
145+
"# 2021 Google Android Derived Dataset"
146+
]
147+
},
148+
{
149+
"cell_type": "markdown",
150+
"id": "b43a523e",
151+
"metadata": {},
152+
"source": [
153+
"This data comes from the 2021 Google Smartphone Decimeter Challenge and can be downloaded from [Kaggle](https://www.kaggle.com/c/google-smartphone-decimeter-challenge)."
154+
]
155+
},
156+
{
157+
"cell_type": "code",
158+
"execution_count": null,
159+
"id": "4da54a37",
160+
"metadata": {},
161+
"outputs": [],
162+
"source": [
163+
"from gnss_lib_py.parsers.android import AndroidDerived2021"
164+
]
165+
},
166+
{
167+
"cell_type": "markdown",
168+
"id": "e12cecb0",
169+
"metadata": {},
170+
"source": [
171+
"Loading the data into an instance of `NavData` is as easy as creating an instance of `AndroidDerived2021` with the relevant file path."
172+
]
173+
},
174+
{
175+
"cell_type": "code",
176+
"execution_count": null,
177+
"id": "6447cd99",
178+
"metadata": {},
179+
"outputs": [],
180+
"source": [
181+
"# download Android data file\n",
182+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/android_2021/Pixel4_derived.csv --quiet -O \"Pixel4_derived.csv\"\n",
64183
"# load Android Google Challenge data\n",
65-
"derived_data = AndroidDerived2021(\"Pixel4XL_derived.csv\", remove_timing_outliers=False)"
184+
"derived_data = AndroidDerived2021(\"Pixel4_derived.csv\")"
66185
]
67186
},
68187
{
69188
"cell_type": "markdown",
70-
"id": "eb53fe00",
189+
"id": "00bc1b39",
71190
"metadata": {},
72191
"source": [
73192
"We can verify that the data loaded correctly by printing the shape and rows of the imported data."
@@ -76,7 +195,7 @@
76195
{
77196
"cell_type": "code",
78197
"execution_count": null,
79-
"id": "01b5d56a",
198+
"id": "407270ad",
80199
"metadata": {},
81200
"outputs": [],
82201
"source": [
@@ -86,13 +205,67 @@
86205
{
87206
"cell_type": "code",
88207
"execution_count": null,
89-
"id": "cc2d26d9",
208+
"id": "2ac2fc75",
90209
"metadata": {},
91210
"outputs": [],
92211
"source": [
93212
"derived_data.rows"
94213
]
95214
},
215+
{
216+
"cell_type": "markdown",
217+
"id": "602a7f1d",
218+
"metadata": {},
219+
"source": [
220+
"# 2021 Google Android Ground Truth\n",
221+
"We can similarly load in the ground truth data from the same 2021 Google Smartphone Decimeter Challenge."
222+
]
223+
},
224+
{
225+
"cell_type": "code",
226+
"execution_count": null,
227+
"id": "785f088b",
228+
"metadata": {},
229+
"outputs": [],
230+
"source": [
231+
"from gnss_lib_py.parsers.android import AndroidGroundTruth2021"
232+
]
233+
},
234+
{
235+
"cell_type": "code",
236+
"execution_count": null,
237+
"id": "8721297a",
238+
"metadata": {},
239+
"outputs": [],
240+
"source": [
241+
"# download Android data file\n",
242+
"!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/data/unit_test/android_2021/Pixel4_ground_truth.csv --quiet -O \"Pixel4_ground_truth.csv\"\n",
243+
"# load Android Google Challenge ground truth data\n",
244+
"gt_data = AndroidGroundTruth2021(\"Pixel4_ground_truth.csv\")"
245+
]
246+
},
247+
{
248+
"cell_type": "code",
249+
"execution_count": null,
250+
"id": "35cba5a4",
251+
"metadata": {},
252+
"outputs": [],
253+
"source": [
254+
"gt_data.shape"
255+
]
256+
},
257+
{
258+
"cell_type": "code",
259+
"execution_count": null,
260+
"id": "a1b0e8b6",
261+
"metadata": {
262+
"scrolled": false
263+
},
264+
"outputs": [],
265+
"source": [
266+
"gt_data.rows"
267+
]
268+
},
96269
{
97270
"cell_type": "markdown",
98271
"id": "eb016e74",

notebooks/tutorials/utilities.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@
165165
"id": "952766c1",
166166
"metadata": {},
167167
"source": [
168-
"The `visualizations.py` file contains several plotting functionalities. We'll use some existing data to demonstrate their functionality."
168+
"The `visualizations.py` file contains several plotting functionalities. We'll use some existing data to demonstrate their functionality.\n",
169+
"\n",
170+
"**Note:** In this case, the example data is filtered to be seconds apart, in the regular\n",
171+
"setting, such measurements would be removed. To prevent this from happening,\n",
172+
"we set remove_timing_outliers to False here. For the full dataset, set this flag to True"
169173
]
170174
},
171175
{

0 commit comments

Comments
 (0)