{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"Developed from the notebook [Smartphone 2022: A look at the ground truth maps](https://www.kaggle.com/code/carlmcbrideellis/smartphone-2022-a-look-at-the-ground-truth-maps) by @carlmcbrideellis.\n\nHere, we map my predictions for (public) trip 2022-01-26-US-MTV-1/XiaomiMi8.","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport folium\nfrom IPython.display import display, Markdown\nfrom pathlib import Path\n\npath        = Path(\"../input/decimeter-challenge-2-submissions\")\ntruth_files = (path).rglob('trip16_2866.csv')\n\n\nfor truth_file in truth_files:\n    tmp = pd.read_csv(truth_file)\n    title_string    = \"2022-01-26-US-MTV-1\"\n    subtitle_string = \"XiaomiMi8\"\n    display(Markdown('## '+ title_string))\n    display(Markdown('#### '+ subtitle_string))\n    map = folium.Map(location=[tmp.LatitudeDegrees.mean(),\n                               tmp.LongitudeDegrees.mean()], \n                               zoom_start=11, \n                               control_scale=True, tiles='https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',attr='Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community')\n    # now add the phone trajectory\n    for i in range(len(tmp)):\n        folium.Circle(\n        location=[tmp.iloc[i]['LatitudeDegrees'],tmp.iloc[i]['LongitudeDegrees']],\n            fill_color='blue',\n            radius=3, popup=[tmp.iloc[i]['LatitudeDegrees'],tmp.iloc[i]['LongitudeDegrees']] ).add_to(map)\n    display(map)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]}]}