{"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":"code","source":"import pandas as pd\nfrom pathlib import Path\n\npath        = Path(\"../input/smartphone-decimeter-2022\")\ntruth_files = (path / 'train').rglob('ground_truth.csv')\nimport plotly.express as px\ngts = []\nfor truth_file in truth_files:\n    tmp = pd.read_csv(truth_file)\n    \n    title_string    = Path(truth_file).parts[3]\n    subtitle_string = Path(truth_file).parts[4]\n    phonename       = Path(truth_file).parts[5]\n    tmp['path']=subtitle_string\n    tmp['phone'] =phonename\n    gts.append(tmp)\n    ground_truth = pd.concat(gts)\nfig = px.scatter_mapbox(ground_truth,\n                    # Here, plotly gets, (x,y) coordinates\n                    lat=\"LatitudeDegrees\",\n                    lon=\"LongitudeDegrees\",\n                    text='path',\n\n                    #Here, plotly detects color of series\n                    color=\"path\",\n                    labels=\"phone\",\n\n                    zoom=9,\n                    # center={\"lat\":37.904, \"lon\":-86.481},\n                    height=1200,\n                    width=1600)\nfig.update_layout(mapbox_style='stamen-terrain')\nfig.update_layout(margin={\"r\": 0, \"t\": 0, \"l\": 0, \"b\": 0})\nfig.update_layout(title_text=\"GPS trafic\")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2022-05-18T14:56:50.674289Z","iopub.execute_input":"2022-05-18T14:56:50.674586Z","iopub.status.idle":"2022-05-18T14:56:59.75842Z","shell.execute_reply.started":"2022-05-18T14:56:50.674555Z","shell.execute_reply":"2022-05-18T14:56:59.75696Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"","metadata":{}}]}