{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2021-06-30T08:34:33.911233Z","iopub.execute_input":"2021-06-30T08:34:33.911792Z","iopub.status.idle":"2021-06-30T08:34:34.161628Z","shell.execute_reply.started":"2021-06-30T08:34:33.911734Z","shell.execute_reply":"2021-06-30T08:34:34.160433Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/baseline_locations_test.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.163256Z","iopub.execute_input":"2021-06-30T08:34:34.163647Z","iopub.status.idle":"2021-06-30T08:34:34.325355Z","shell.execute_reply.started":"2021-06-30T08:34:34.163607Z","shell.execute_reply":"2021-06-30T08:34:34.324151Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/baseline_locations_train.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.326764Z","iopub.execute_input":"2021-06-30T08:34:34.327095Z","iopub.status.idle":"2021-06-30T08:34:34.530091Z","shell.execute_reply.started":"2021-06-30T08:34:34.327062Z","shell.execute_reply":"2021-06-30T08:34:34.528957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/sample_submission.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.531592Z","iopub.execute_input":"2021-06-30T08:34:34.531877Z","iopub.status.idle":"2021-06-30T08:34:34.632172Z","shell.execute_reply.started":"2021-06-30T08:34:34.531848Z","shell.execute_reply":"2021-06-30T08:34:34.630718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/metadata/constellation_type_mapping.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.633690Z","iopub.execute_input":"2021-06-30T08:34:34.634078Z","iopub.status.idle":"2021-06-30T08:34:34.650556Z","shell.execute_reply.started":"2021-06-30T08:34:34.634042Z","shell.execute_reply":"2021-06-30T08:34:34.649422Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/test/2020-05-15-US-MTV-1/Pixel4/Pixel4_derived.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.652292Z","iopub.execute_input":"2021-06-30T08:34:34.652736Z","iopub.status.idle":"2021-06-30T08:34:34.912508Z","shell.execute_reply.started":"2021-06-30T08:34:34.652689Z","shell.execute_reply":"2021-06-30T08:34:34.911207Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.info()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.914503Z","iopub.execute_input":"2021-06-30T08:34:34.915017Z","iopub.status.idle":"2021-06-30T08:34:34.953124Z","shell.execute_reply.started":"2021-06-30T08:34:34.914972Z","shell.execute_reply":"2021-06-30T08:34:34.951711Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.corr()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:34.954748Z","iopub.execute_input":"2021-06-30T08:34:34.955158Z","iopub.status.idle":"2021-06-30T08:34:35.047746Z","shell.execute_reply.started":"2021-06-30T08:34:34.955120Z","shell.execute_reply":"2021-06-30T08:34:35.046397Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#correlation map\nf,ax = plt.subplots(figsize=(15, 15))\nsns.heatmap(data.corr(), annot=True, linewidths=.5, fmt= '.1f',ax=ax)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:35.049227Z","iopub.execute_input":"2021-06-30T08:34:35.049596Z","iopub.status.idle":"2021-06-30T08:34:36.889400Z","shell.execute_reply.started":"2021-06-30T08:34:35.049560Z","shell.execute_reply":"2021-06-30T08:34:36.888107Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.head(10)","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:36.890695Z","iopub.execute_input":"2021-06-30T08:34:36.891001Z","iopub.status.idle":"2021-06-30T08:34:36.942482Z","shell.execute_reply.started":"2021-06-30T08:34:36.890971Z","shell.execute_reply":"2021-06-30T08:34:36.940699Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.columns","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:36.945155Z","iopub.execute_input":"2021-06-30T08:34:36.946228Z","iopub.status.idle":"2021-06-30T08:34:36.959241Z","shell.execute_reply.started":"2021-06-30T08:34:36.946151Z","shell.execute_reply":"2021-06-30T08:34:36.957693Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Line Plot\n# color = color, label = label,\ndata.zSatPosM.plot(kind = 'line', color = 'g',label = 'zSatPosM',linewidth=1,alpha = 0.5,grid = True,linestyle = ':')\ndata.tropoDelayM.plot(color = 'r',label = 'tropoDelayM',linewidth=1, alpha = 0.5,grid = True,linestyle = '-.')\nplt.xlabel('x axis')\nplt.ylabel('y axis')\nplt.title('Line Plot')\nplt.show()\n","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:36.961447Z","iopub.execute_input":"2021-06-30T08:34:36.962012Z","iopub.status.idle":"2021-06-30T08:34:37.454146Z","shell.execute_reply.started":"2021-06-30T08:34:36.961948Z","shell.execute_reply":"2021-06-30T08:34:37.452946Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Line Plot\n# color = color, label = label,\ndata.rawPrM.plot(kind = 'line', color = 'g',label = 'rawPrM',linewidth=1,alpha = 0.5,grid = True,linestyle = ':')\ndata.xSatPosM.plot(color = 'r',label = 'xSatPosM',linewidth=1, alpha = 0.5,grid = True,linestyle = '-.')\nplt.xlabel('x axis')\nplt.ylabel('y axis')\nplt.title('Line Plot')\nplt.show()\n","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:37.455909Z","iopub.execute_input":"2021-06-30T08:34:37.456617Z","iopub.status.idle":"2021-06-30T08:34:37.926886Z","shell.execute_reply.started":"2021-06-30T08:34:37.456560Z","shell.execute_reply":"2021-06-30T08:34:37.925588Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Scatter Plot \n# x = rawPrM, y = xSatPosM\ndata.plot(kind='scatter', x='rawPrM', y='xSatPosM',alpha = 0.5,color = 'red')\nplt.xlabel('rawPrM')              # label = name of label\nplt.ylabel('xSatPosM')\nplt.title('rawPrM xSatPosM Scatter Plot')","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:37.928656Z","iopub.execute_input":"2021-06-30T08:34:37.929358Z","iopub.status.idle":"2021-06-30T08:34:38.284688Z","shell.execute_reply.started":"2021-06-30T08:34:37.929280Z","shell.execute_reply":"2021-06-30T08:34:38.283349Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.columns","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.286808Z","iopub.execute_input":"2021-06-30T08:34:38.287353Z","iopub.status.idle":"2021-06-30T08:34:38.296299Z","shell.execute_reply.started":"2021-06-30T08:34:38.287272Z","shell.execute_reply":"2021-06-30T08:34:38.295091Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# 1 - Filtering Pandas data frame\nx = data['isrbM']>20\ndata[x]","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.297871Z","iopub.execute_input":"2021-06-30T08:34:38.298220Z","iopub.status.idle":"2021-06-30T08:34:38.356137Z","shell.execute_reply.started":"2021-06-30T08:34:38.298179Z","shell.execute_reply":"2021-06-30T08:34:38.354925Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"threshold = sum(data.isrbM)/len(data.isrbM)\ndata[\"isrbM_level\"] = [\"high\" if i > threshold else \"low\" for i in data.isrbM]\ndata.loc[:10,[\"isrbM_level\",\"isrbM\"]]","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.363154Z","iopub.execute_input":"2021-06-30T08:34:38.363628Z","iopub.status.idle":"2021-06-30T08:34:38.404831Z","shell.execute_reply.started":"2021-06-30T08:34:38.363583Z","shell.execute_reply":"2021-06-30T08:34:38.403652Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ax = plt.axes(projection='3d')\n\n# Data for a three-dimensional line\nzline = np.linspace(0, 15, 1000)\nxline = np.sin(zline)\nyline = np.cos(zline)\nax.plot3D(xline, yline, zline, 'gray')\n\n# Data for three-dimensional scattered points\nzdata = 15 * np.random.random(100)\nxdata = np.sin(zdata) + 0.1 * np.random.randn(100)\nydata = np.cos(zdata) + 0.1 * np.random.randn(100)\nax.scatter3D(xdata, ydata, zdata, c=zdata, cmap='Greens');","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.407097Z","iopub.execute_input":"2021-06-30T08:34:38.407458Z","iopub.status.idle":"2021-06-30T08:34:38.676162Z","shell.execute_reply.started":"2021-06-30T08:34:38.407421Z","shell.execute_reply":"2021-06-30T08:34:38.674681Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def f(x, y):\n    return np.sin(np.sqrt(x ** 2 + y ** 2))\n\nx = np.linspace(-6, 6, 30)\ny = np.linspace(-6, 6, 30)\n\nX, Y = np.meshgrid(x, y)\nZ = f(X, Y)","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.677839Z","iopub.execute_input":"2021-06-30T08:34:38.678217Z","iopub.status.idle":"2021-06-30T08:34:38.686828Z","shell.execute_reply.started":"2021-06-30T08:34:38.678174Z","shell.execute_reply":"2021-06-30T08:34:38.685289Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = plt.figure()\nax = plt.axes(projection='3d')\nax.contour3D(X, Y, Z, 50, cmap='binary')\nax.set_xlabel('x')\nax.set_ylabel('y')\nax.set_zlabel('z');","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:38.688916Z","iopub.execute_input":"2021-06-30T08:34:38.689388Z","iopub.status.idle":"2021-06-30T08:34:39.174254Z","shell.execute_reply.started":"2021-06-30T08:34:38.689342Z","shell.execute_reply":"2021-06-30T08:34:39.173248Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"theta = 2 * np.pi * np.random.random(1000)\nr = 6 * np.random.random(1000)\nx = np.ravel(r * np.sin(theta))\ny = np.ravel(r * np.cos(theta))\nz = f(x, y)","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.175566Z","iopub.execute_input":"2021-06-30T08:34:39.176164Z","iopub.status.idle":"2021-06-30T08:34:39.183583Z","shell.execute_reply.started":"2021-06-30T08:34:39.176109Z","shell.execute_reply":"2021-06-30T08:34:39.182181Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ax = plt.axes(projection='3d')\nax.scatter(x, y, z, c=z, cmap='viridis', linewidth=1);","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.185490Z","iopub.execute_input":"2021-06-30T08:34:39.185884Z","iopub.status.idle":"2021-06-30T08:34:39.472173Z","shell.execute_reply.started":"2021-06-30T08:34:39.185846Z","shell.execute_reply":"2021-06-30T08:34:39.470967Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"theta = np.linspace(0, 2 * np.pi, 30)\nw = np.linspace(-0.25, 0.25, 8)\nw, theta = np.meshgrid(w, theta)","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.473737Z","iopub.execute_input":"2021-06-30T08:34:39.474102Z","iopub.status.idle":"2021-06-30T08:34:39.480636Z","shell.execute_reply.started":"2021-06-30T08:34:39.474061Z","shell.execute_reply":"2021-06-30T08:34:39.479338Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"phi = 0.5 * theta","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.482658Z","iopub.execute_input":"2021-06-30T08:34:39.483097Z","iopub.status.idle":"2021-06-30T08:34:39.497747Z","shell.execute_reply.started":"2021-06-30T08:34:39.483031Z","shell.execute_reply":"2021-06-30T08:34:39.496134Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# radius in x-y plane\nr = 1 + w * np.cos(phi)\n\nx = np.ravel(r * np.cos(theta))\ny = np.ravel(r * np.sin(theta))\nz = np.ravel(w * np.sin(phi))","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.499459Z","iopub.execute_input":"2021-06-30T08:34:39.499810Z","iopub.status.idle":"2021-06-30T08:34:39.512936Z","shell.execute_reply.started":"2021-06-30T08:34:39.499774Z","shell.execute_reply":"2021-06-30T08:34:39.511488Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# triangulate in the underlying parametrization\nfrom matplotlib.tri import Triangulation\ntri = Triangulation(np.ravel(w), np.ravel(theta))\n\nax = plt.axes(projection='3d')\nax.plot_trisurf(x, y, z, triangles=tri.triangles,\n                cmap='viridis', linewidths=0.2);\n\nax.set_xlim(-1, 1); ax.set_ylim(-1, 1); ax.set_zlim(-1, 1);","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.514866Z","iopub.execute_input":"2021-06-30T08:34:39.515243Z","iopub.status.idle":"2021-06-30T08:34:39.812442Z","shell.execute_reply.started":"2021-06-30T08:34:39.515198Z","shell.execute_reply":"2021-06-30T08:34:39.811355Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data = pd.read_csv('../input/google-smartphone-decimeter-challenge/test/2020-05-15-US-MTV-1/Pixel4/Pixel4_derived.csv')\ndata.head()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:39.814000Z","iopub.execute_input":"2021-06-30T08:34:39.814387Z","iopub.status.idle":"2021-06-30T08:34:40.076767Z","shell.execute_reply.started":"2021-06-30T08:34:39.814345Z","shell.execute_reply":"2021-06-30T08:34:40.075537Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.columns","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:40.078367Z","iopub.execute_input":"2021-06-30T08:34:40.078698Z","iopub.status.idle":"2021-06-30T08:34:40.086394Z","shell.execute_reply.started":"2021-06-30T08:34:40.078667Z","shell.execute_reply":"2021-06-30T08:34:40.085203Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.describe()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:40.088166Z","iopub.execute_input":"2021-06-30T08:34:40.088706Z","iopub.status.idle":"2021-06-30T08:34:40.213231Z","shell.execute_reply.started":"2021-06-30T08:34:40.088662Z","shell.execute_reply":"2021-06-30T08:34:40.212058Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**min,%25,%50,%75 tropoDelayM****","metadata":{}},{"cell_type":"code","source":"r = np.arange(0, 2, 0.01)\ntheta = 2 * np.pi * r\n\nfig, ax = plt.subplots(subplot_kw={'projection': 'polar'})\nax.plot(theta, r)\nax.set_rmax(3)\nax.set_rticks([2.544000, 2.834000, 3.309000, 5.340750])  # Less radial ticks\nax.set_rlabel_position(-22.5)  # Move radial labels away from plotted line\nax.grid(True)\n\nax.set_title(\"A line plot on a polar axis\", va='bottom')\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:40.214832Z","iopub.execute_input":"2021-06-30T08:34:40.215213Z","iopub.status.idle":"2021-06-30T08:34:40.766154Z","shell.execute_reply.started":"2021-06-30T08:34:40.215174Z","shell.execute_reply":"2021-06-30T08:34:40.764438Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Line Plot\n# color = color, label = label, linewidth = width of line, alpha = opacity, grid = grid, linestyle = sytle of line\ndata.ionoDelayM.plot(kind = 'line', color = 'g',label = 'ionoDelayM',linewidth=1,alpha = 0.5,grid = True,linestyle = ':')\ndata.tropoDelayM.plot(color = 'r',label = 'tropoDelayM',linewidth=1, alpha = 0.5,grid = True,linestyle = '-.')\nplt.legend(loc='upper right')     # legend = puts label into plot\nplt.xlabel('x axis')              # label = name of label\nplt.ylabel('y axis')\nplt.title('Line Plot')            # title = title of plot\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:40.768461Z","iopub.execute_input":"2021-06-30T08:34:40.769047Z","iopub.status.idle":"2021-06-30T08:34:41.165819Z","shell.execute_reply.started":"2021-06-30T08:34:40.768986Z","shell.execute_reply":"2021-06-30T08:34:41.164825Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Scatter Plot \n# x = ionoDelayM, y = tropoDelayM\ndata.plot(kind='scatter', x='ionoDelayM', y='tropoDelayM',alpha = 0.5,color = 'red')\nplt.xlabel('ionoDelayM')              # label = name of label\nplt.ylabel('tropoDelayM')\nplt.title('ionoDelayM tropoDelayM Scatter Plot')            # title = title of plot","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:41.167072Z","iopub.execute_input":"2021-06-30T08:34:41.167549Z","iopub.status.idle":"2021-06-30T08:34:41.513346Z","shell.execute_reply.started":"2021-06-30T08:34:41.167514Z","shell.execute_reply":"2021-06-30T08:34:41.512417Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Histogram\n# bins = number of bar in figure\ndata.ionoDelayM.plot(kind = 'hist',bins = 50,figsize = (12,12))\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:41.514578Z","iopub.execute_input":"2021-06-30T08:34:41.515029Z","iopub.status.idle":"2021-06-30T08:34:41.872057Z","shell.execute_reply.started":"2021-06-30T08:34:41.514995Z","shell.execute_reply":"2021-06-30T08:34:41.870862Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Histogram\n# bins = number of bar in figure\ndata.tropoDelayM.plot(kind = 'hist',bins = 50,figsize = (12,12))\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:41.873493Z","iopub.execute_input":"2021-06-30T08:34:41.873905Z","iopub.status.idle":"2021-06-30T08:34:42.205385Z","shell.execute_reply.started":"2021-06-30T08:34:41.873822Z","shell.execute_reply":"2021-06-30T08:34:42.204269Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# clf() = cleans it up again you can start a fresh\ndata.ionoDelayM.plot(kind = 'hist',bins = 50)\nplt.clf()\n# We cannot see plot due to clf()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.207193Z","iopub.execute_input":"2021-06-30T08:34:42.207961Z","iopub.status.idle":"2021-06-30T08:34:42.352364Z","shell.execute_reply.started":"2021-06-30T08:34:42.207898Z","shell.execute_reply":"2021-06-30T08:34:42.351047Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(data['ionoDelayM'].value_counts(dropna =False))","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.353909Z","iopub.execute_input":"2021-06-30T08:34:42.354263Z","iopub.status.idle":"2021-06-30T08:34:42.365685Z","shell.execute_reply.started":"2021-06-30T08:34:42.354227Z","shell.execute_reply":"2021-06-30T08:34:42.364407Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(data['phoneName'].value_counts(dropna =False))","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.367415Z","iopub.execute_input":"2021-06-30T08:34:42.367755Z","iopub.status.idle":"2021-06-30T08:34:42.391214Z","shell.execute_reply.started":"2021-06-30T08:34:42.367721Z","shell.execute_reply":"2021-06-30T08:34:42.389761Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.dtypes","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.392744Z","iopub.execute_input":"2021-06-30T08:34:42.393184Z","iopub.status.idle":"2021-06-30T08:34:42.412088Z","shell.execute_reply.started":"2021-06-30T08:34:42.393146Z","shell.execute_reply":"2021-06-30T08:34:42.410124Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Histogram\n# bins = number of bar in figure\ndata.receivedSvTimeInGpsNanos.plot(kind = 'hist',bins = 50,figsize = (12,12))\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.413584Z","iopub.execute_input":"2021-06-30T08:34:42.414024Z","iopub.status.idle":"2021-06-30T08:34:42.796237Z","shell.execute_reply.started":"2021-06-30T08:34:42.413980Z","shell.execute_reply":"2021-06-30T08:34:42.794950Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.info()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.797806Z","iopub.execute_input":"2021-06-30T08:34:42.798168Z","iopub.status.idle":"2021-06-30T08:34:42.837595Z","shell.execute_reply.started":"2021-06-30T08:34:42.798133Z","shell.execute_reply":"2021-06-30T08:34:42.836184Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plotting all data \ndata1 = data.loc[:,[\"xSatPosM\",\"ySatPosM\",\"zSatPosM\"]]\ndata1.plot()\n# it is confusing","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:42.839387Z","iopub.execute_input":"2021-06-30T08:34:42.839738Z","iopub.status.idle":"2021-06-30T08:34:44.097304Z","shell.execute_reply.started":"2021-06-30T08:34:42.839701Z","shell.execute_reply":"2021-06-30T08:34:44.096388Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# subplots\ndata1.plot(subplots = True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:44.098416Z","iopub.execute_input":"2021-06-30T08:34:44.098737Z","iopub.status.idle":"2021-06-30T08:34:45.287207Z","shell.execute_reply.started":"2021-06-30T08:34:44.098704Z","shell.execute_reply":"2021-06-30T08:34:45.286072Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Plotting all data \ndata1 = data.loc[:,[\"xSatVelMps\",\"ySatVelMps\",\"zSatVelMps\"]]\ndata1.plot()\n# it is confusing","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:45.288619Z","iopub.execute_input":"2021-06-30T08:34:45.289005Z","iopub.status.idle":"2021-06-30T08:34:46.662861Z","shell.execute_reply.started":"2021-06-30T08:34:45.288967Z","shell.execute_reply":"2021-06-30T08:34:46.661661Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# subplots\ndata1.plot(subplots = True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:46.664521Z","iopub.execute_input":"2021-06-30T08:34:46.665144Z","iopub.status.idle":"2021-06-30T08:34:47.852729Z","shell.execute_reply.started":"2021-06-30T08:34:46.665089Z","shell.execute_reply":"2021-06-30T08:34:47.851491Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Setting index : type 1 is outer type 2 is inner index\ndata1 = data.set_index([\"collectionName\",\"signalType\"]) \ndata1.head(100)\n# data1.loc[\"Fire\",\"Flying\"] # howw to use indexes","metadata":{"execution":{"iopub.status.busy":"2021-06-30T08:34:47.854517Z","iopub.execute_input":"2021-06-30T08:34:47.855208Z","iopub.status.idle":"2021-06-30T08:34:47.937664Z","shell.execute_reply.started":"2021-06-30T08:34:47.855146Z","shell.execute_reply":"2021-06-30T08:34:47.935996Z"},"trusted":true},"execution_count":null,"outputs":[]}]}