diff --git a/gpsfun/rallystyle.py b/gpsfun/rallystyle.py new file mode 100644 index 0000000..6a6a071 --- /dev/null +++ b/gpsfun/rallystyle.py @@ -0,0 +1,88 @@ +import numpy as np +from math import sqrt + +# Example +# results = {"segments": [{"segment": 1, "Timestamp":0, data: {}},] +# ,"totals": {"total_time": 0, "timed": 0, 'transport': 0}} + +results = {"segments": [], + "totals": {"total_time": None, "timed": None, 'transport': None} + } + +class RallyResults(object): + """ + segments is the rally definition + dataframe + example results: + results = {"segments": [], + "totals": {"total_time": None, "timed": None, 'transport': None} + } + """ + def __init__(self, df, segments): + self.df = df + self.init_columns = df.columns + self.segments = segments + self.epsilon = 0.00001 # used to for finding acute triangles + self.near = .0001 + self.results = {"segments": [],"totals": {"total_time": None, "timed": None, 'transport': None}} + # self.ck_points = pd.DataFrame([p['location'] for p in segments], columns=['Latitude', 'Longitude']) + self.ck_points = [p['location'] for p in segments] + if not 'shift_Longitude' in self.df.columns or not 'shift_Longitude' in self.df.columns: + self.df['shift_Longitude'] = self.df.shift(-1)['Longitude'] + self.df['shift_Latitude'] = self.df.shift(-1)['Latitude'] + self.df['dist_to_next'] = np.linalg.norm(self.df[['Latitude', 'Longitude']].values - + self.df[['shift_Latitude', 'shift_Longitude']].values, axis=1) + + def match_checkpoints(self): + """ + Identify the activity point the represents the arrival at the checkpoint + find near points that form acute triangles + :arg + """ + self.df['checkpoint'] = np.nan + self.df[f'mark'] = False + for i, p in enumerate(self.ck_points.values): + self.df[f'p_to_A{i}'] = np.linalg.norm(self.df[['Latitude', 'Longitude']].values - p, axis=1) + self.df[f'p_to_B{i}'] = np.linalg.norm(self.df[['shift_Latitude', 'shift_Longitude']].values - p, axis=1) + self.df['acute'] = self.df[f'p_to_A{i}'] ** 2 + self.df['to_next'] ** 2 <= self.df[f'p_to_B{i}'] ** 2 + self.epsilon + + self.df['checkpoint'] = np.nan + self.df[f'mark_{i}'] = False + self.df.loc[ + self.df[(self.df[f'p_to_A{i}'] <= self.near) & (self.df.acute)].index[0], ['checkpoint']] = i + self.df.loc[self.df[(self.df[f'p_to_A{i}'] <= self.near) & (self.df.acute)].index[0], [f'mark_{i}', 'mark']] = True + + seg_result = self.df[self.df[f'mark_{1}']][['Date_Time', 'Latitude', 'Longitude']].iloc[0].to_dict() + update_results(seg_result, results) + + print('#####') + print(self.df[[f'p_to_A{i}', f'p_to_B{i}', 'to_next', 'acute', f'mark_{i}', 'mark']][self.df.mark == True]) + + + + + +class Segment(object): + """ + Work in progress + """ + def point_to_line(self, lp1, lp2, p): + """ + Does a perpendicular line from a point to a line intersect between two points. + TODO: Consider using shapely https://pypi.org/project/Shapely/ + """ + s1 = (lp2[1] - lp1[1])/(lp2[0] - lp1[0]) + s2 = 1/s1 + #y1 = s1(x − lp1[0]) + lp1[1] + #y2 = s2(x - p[0]) + p[1] + x = ((-s1 * lp1[0]) + lp1[1] + s2 * p[0] - p[1]) / (s2 - s1) + y = s1 * (x - lp1[0]) + lp1[1] + between = (lp2[0] < x < lp1[0]) or (lp2[0] > x > lp1[0]) and (lp2[1] < y < lp1[1]) or (lp2[1] > y > lp1[1]) + distance = sqrt((p[0] - x)**2 + (p[1] - y)**2) + + def point_to_point(self): + df1 = gpsbabel("../tests/test_data/segment_test_1a.gpx")[['Latitude', 'Longitude']] + df2 = gpsbabel("../tests/test_data/segment_test_1b.gpx")[['Latitude', 'Longitude']] + + a = distance.cdist(df1, df2, 'euclidean') + # b = a[a < .00001] diff --git a/gpsfun/readers.py b/gpsfun/readers.py index 5bcd439..2c1a8bb 100644 --- a/gpsfun/readers.py +++ b/gpsfun/readers.py @@ -5,7 +5,10 @@ from pathlib import Path import xmltodict import fitdecode -from . import col +try: + from . import col +except: + import col class GPSFunException(Exception): pass diff --git a/gpsfun/segments.py b/gpsfun/segments.py deleted file mode 100644 index e69de29..0000000 diff --git a/gpsfun/tracks.py b/gpsfun/tracks.py index c7d3eb8..943dce0 100644 --- a/gpsfun/tracks.py +++ b/gpsfun/tracks.py @@ -2,8 +2,6 @@ import pandas as pd from haversine import haversine, Unit import requests -from scipy.spatial import distance -from .readers import gpsbabel class Track(object): @@ -139,28 +137,3 @@ def export_lat_lon_alt(self, file_type='JSON'): elif file_type == 'csv': self.df[['Latitude', 'Longitude']].to_csv() -class Segment(object): - """ - Work in progress - """ - def point_to_line(self, lp1, lp2, p): - """ - Does a perpendicular line from a point to a line intersect between two points. - TODO: Consider using shapely https://pypi.org/project/Shapely/ - """ - s1 = (lp2[1] - lp1[1])/(lp2[0] - lp1[0]) - s2 = 1/s1 - #y1 = s1(x − lp1[0]) + lp1[1] - #y2 = s2(x - p[0]) + p[1] - x = ((-s1 * lp1[0]) + lp1[1] + s2 * p[0] - p[1]) / (s2 - s1) - y = s1 * (x - lp1[0]) + lp1[1] - between = (lp2[0] < x < lp1[0]) or (lp2[0] > x > lp1[0]) and (lp2[1] < y < lp1[1]) or (lp2[1] > y > lp1[1]) - distance = sqrt((p[0] - x)**2 + (p[1] - y)**2) - - def point_to_point(self): - df1 = gpsbabel("../tests/test_data/segment_test_1a.gpx")[['Latitude', 'Longitude']] - df2 = gpsbabel("../tests/test_data/segment_test_1b.gpx")[['Latitude', 'Longitude']] - - a = distance.cdist(df1, df2, 'euclidean') - # b = a[a < .00001] - diff --git a/notebooks/segment_research_MT Evans.ipynb b/notebooks/segment_research_MT Evans.ipynb index 6c509c5..331b20a 100644 --- a/notebooks/segment_research_MT Evans.ipynb +++ b/notebooks/segment_research_MT Evans.ipynb @@ -9,88 +9,74 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ - "# Read in the data\n", - "from math import sqrt\n", - "from haversine import haversine\n", - "import pandas as pd\n", - "from scipy.spatial import distance\n", + "import warnings\n", "import pandas as pd\n", + "from pandas.core.common import SettingWithCopyWarning\n", + "warnings.simplefilter(action=\"ignore\", category=SettingWithCopyWarning)\n", "\n", "import sys\n", "sys.path.append(\"../gpsfun\")\n", "\n", "from readers import gpsbabel\n", - "from tracks import Track\n", - "import col\n", "\n", "activity_file = \"..//tests/test_data/Mt_Evans_Hill_Climb_v1.fit\"\n", "\n", "df = gpsbabel(activity_file)\n", "\n", - "activity = df[['Latitude', 'Longitude', 'Altitude']]\n", + "# activity = df[['Latitude', 'Longitude', 'Altitude']]\n", + "activity = df\n", "\n", - "# One end should always be the next start\n", "segments = [{'Segment_name':'Event Start',\n", " 'segment_number': 0,\n", " 'location': (39.737912, -105.523881),\n", - " 'transport':{'time_limit': 1800},\n", - " 'timed':False,\n", - " 'last': True},\n", + " 'type': {'transport':{'time_limit': 1800}}\n", + " },\n", " {'Segment_name':'Chicago climb',\n", " 'segment_number': 1,\n", " 'location': (39.693782, -105.617329),\n", - " 'transport':False,\n", - " 'timed':True,\n", - " 'last': True},\n", + " 'type': {'timed': None}\n", + " },\n", " {'Segment_name':'Lets get up high',\n", " 'segment_number': 2,\n", " 'location': (39.660844, -105.604562),\n", - " 'transport':{'time_limit': 1800},\n", - " 'timed': False,\n", - " 'last': True},\n", + " 'type': {'transport':{'time_limit': 1800}}\n", + " },\n", " {'Segment_name':'Sprint to the top',\n", " 'segment_number': 3,\n", " 'location': (39.597276, -105.640821),\n", - " 'transport':False,\n", - " 'timed':True,\n", - " 'last': True},\n", - " {'Segment_name':'Sprint to the top',\n", + " 'type': {'timed': None}\n", + " },\n", + " {'Segment_name':'Finish',\n", " 'segment_number': 4,\n", " 'location': (39.587480, -105.643684),\n", - " 'transport':False,\n", - " 'timed':False,\n", - " 'last': True}\n", + " 'type': {'end':None}\n", + " }\n", " ]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Take a quick look at the activity and segment points" + ] + }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 4, "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Latitude Longitude\n", - "0 39.737912 -105.523881\n", - "1 39.693782 -105.617329\n", - "2 39.660844 -105.604562\n", - "3 39.597276 -105.640821\n", - "4 39.587480 -105.643684\n" - ] - }, { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 81, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" }, @@ -109,69 +95,61 @@ ], "source": [ "seg_points = pd.DataFrame([p['location'] for p in segments], columns=['Latitude', 'Longitude'])\n", - "print(seg_points)\n", "act_pl = activity.plot.scatter(x='Latitude', y='Longitude', color='LightBlue', label='Activity')\n", "seg_points.plot.scatter(x='Latitude', y='Longitude', color='DarkGreen', label='Segment', ax=act_pl)" ] }, { - "cell_type": "code", - "execution_count": 82, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/vincentdavis/mypython/lib/python3.8/site-packages/pandas/core/frame.py:4125: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " return super().rename(\n" - ] - } - ], + "cell_type": "markdown", + "metadata": {}, "source": [ - "pd.DataFrame.reset_index(activity, level=None, drop=False, inplace=True, col_level=0, col_fill='')\n", - "activity.rename(columns={'index':'pcount'}, inplace=True)\n" + "* Lets identify the points close to the segment point.\n", + "* require that they are bwtween the activity points closest. This is done by chaching is the triangle is acute" ] }, { "cell_type": "code", - "execution_count": 91, + "execution_count": 45, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ + "None\n", "#####\n", - " p_to_A0 p_to_B0 to_next acute mark_0 mark\n", - "55 0.000095 0.000039 0.000057 True True True\n", + " p_to_A0 p_to_B0 to_next acute mark_0 mark checkpoint\n", + "55 0.000095 0.000039 0.000057 True True True 0.0\n", + "0 days 00:00:00\n", + "0 days 00:00:00\n", "#####\n", - " p_to_A1 p_to_B1 to_next acute mark_1 mark\n", - "55 0.103415 0.103371 0.000057 True False True\n", - "978 0.000085 0.000046 0.000046 True True True\n", + " p_to_A1 p_to_B1 to_next acute mark_1 mark checkpoint\n", + "55 0.103415 0.103371 0.000057 True False True 0.0\n", + "978 0.000085 0.000046 0.000046 True True True 1.0\n", + "0 days 00:00:00\n", + "0 days 00:00:00\n", "#####\n", - " p_to_A2 p_to_B2 to_next acute mark_2 mark\n", - "55 0.111662 0.111609 0.000057 False False True\n", - "978 0.035405 0.035359 0.000046 True False True\n", - "2328 0.000036 0.000093 0.000057 True True True\n", + " p_to_A2 p_to_B2 to_next acute mark_2 mark checkpoint\n", + "55 0.111662 0.111609 0.000057 False False True 0.0\n", + "978 0.035405 0.035359 0.000046 True False True 1.0\n", + "2328 0.000036 0.000093 0.000057 True True True 2.0\n", + "0 days 00:00:00\n", + "0 days 00:00:00\n", "#####\n", - " p_to_A3 p_to_B3 to_next acute mark_3 mark\n", - "55 0.182994 0.182939 0.000057 False False True\n", - "978 0.099371 0.099333 0.000046 True False True\n", - "2328 0.073148 0.073091 0.000057 True False True\n", - "4268 0.000059 0.000161 0.000111 True True True\n", + " p_to_A3 p_to_B3 to_next acute mark_3 mark checkpoint\n", + "55 0.182994 0.182939 0.000057 False False True 0.0\n", + "978 0.099371 0.099333 0.000046 True False True 1.0\n", + "2328 0.073148 0.073091 0.000057 True False True 2.0\n", + "4268 0.000059 0.000161 0.000111 True True True 3.0\n", + "0 days 00:00:00\n", + "0 days 00:00:00\n", "#####\n", - " p_to_A4 p_to_B4 to_next acute mark_4 mark\n", - "55 0.192400 0.192345 0.000057 False False True\n", - "978 0.109567 0.109529 0.000046 True False True\n", - "2328 0.083109 0.083052 0.000057 True False True\n", - "4268 0.010147 0.010055 0.000111 True False True\n", - "5434 0.000064 0.000102 0.000039 True True True\n" + " p_to_A4 p_to_B4 to_next acute mark_4 mark checkpoint\n", + "55 0.192400 0.192345 0.000057 False False True 0.0\n", + "978 0.109567 0.109529 0.000046 True False True 1.0\n", + "2328 0.083109 0.083052 0.000057 True False True 2.0\n", + "4268 0.010147 0.010055 0.000111 True False True 3.0\n", + "5434 0.000064 0.000102 0.000039 True True True 4.0\n" ] } ], @@ -188,31 +166,61 @@ "activity['to_next'] = np.linalg.norm(activity[['Latitude', 'Longitude']].values - \n", " activity[['shift_Latitude', 'shift_Longitude']].values, axis=1)\n", "activity[f'mark'] = False\n", + "\n", + "# Example\n", + "# results = {\"segments\": [{\"segment\": 1, \"Timestamp\":0, data: {}},\n", + "# ],\n", + "# \"totals\": {\"total_time\": 0, \"timed\": 0, 'transport': 0}}\n", + "\n", + "results = {\"segments\": [],\n", + " \"totals\": {\"total_time\": None, \"timed\": None, 'transport': None}\n", + " }\n", + "\n", + "def update_results(seg_result, results):\n", + " \"\"\"\n", + " seg_result is a dict of the result row\n", + " results is the dict of the results\n", + " store everythin passed to the result in data.\n", + " \"\"\"\n", + " segments = results['segments']\n", + " seg_num = len(segments)\n", + " seg_entry = {'segment': seg_num, 'Date_Time': seg_result['Date_Time'], 'data': seg_result}\n", + " segments.append(seg_entry)\n", + " totals = results['totals']\n", + " if seg_num > 0:\n", + " print(str((segments[-1]['Date_Time'] - segments[0]['Date_Time'])))\n", + " totals['total_time'] = segments[-1]['Date_Time'] - segments[0]['Date_Time']\n", + " print(totals['total_time'])\n", + "\n", + "activity['checkpoint'] = np.nan\n", + " \n", "for i, p in enumerate(seg_points.values):\n", "\n", " activity[f'p_to_A{i}'] = np.linalg.norm(activity[['Latitude', 'Longitude']].values - p, axis=1)\n", " activity[f'p_to_B{i}'] = np.linalg.norm(activity[['shift_Latitude', 'shift_Longitude']].values - p, axis=1)\n", - " \n", " activity['acute'] = activity[f'p_to_A{i}']**2 + activity['to_next']**2 <= activity[f'p_to_B{i}']**2 + .00001\n", " \n", + " activity.loc[activity[(activity[f'p_to_A{i}'] <= .0001) & (activity.acute)].index[0], ['checkpoint']] = i\n", " activity[f'mark_{i}'] = False\n", " activity.loc[activity[(activity[f'p_to_A{i}'] <= .0001) & (activity.acute)].index[0], [f'mark_{i}', 'mark']] = True\n", " \n", + " seg_result = activity[activity[f'mark_{1}']][['Date_Time', 'Latitude', 'Longitude']].iloc[0].to_dict()\n", + " update_results(seg_result, results)\n", + " \n", " print('#####')\n", - " print(activity[[f'p_to_A{i}', f'p_to_B{i}', 'to_next', 'acute', f'mark_{i}', 'mark']][activity.mark==True])\n", - "\n", - " \n" + " print(activity[[f'p_to_A{i}', f'p_to_B{i}', 'to_next', 'acute', f'mark_{i}', 'mark', 'checkpoint']][activity.checkpoint>=0])\n", + " " ] }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "8bf3cecf606b43758e916fa2b2a04de1", + "model_id": "988fa4e0d7bf4c1a91c0be13cf5478c9", "version_major": 2, "version_minor": 0 }, @@ -261,6 +269,477 @@ "\n", "m" ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Date_Time': Timestamp('2012-07-21 09:18:13'),\n", + " 'Latitude': 39.738,\n", + " 'Longitude': -105.523844}" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "activity[activity.mark_0][['Date_Time', 'Latitude', 'Longitude']].iloc[0].to_dict()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "[['Date_Time', 'Latitude', 'Longitude', 'Altitude']]" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "x = [1,2,3]" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(x)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "x[1]" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Date_TimeNoLatitudeLongitudeAltitudeTemperatureSpeedHeartrateshift_Longitudeshift_Latitude...mark_1p_to_A2p_to_B2mark_2p_to_A3p_to_B3mark_3p_to_A4p_to_B4mark_4
02012-07-21 09:15:20139.738603-105.5234772176.4NaN0.0103.0-105.52347239.738602...False0.1123440.112347False0.1836930.183695False0.1931010.193103False
12012-07-21 09:15:21239.738602-105.5234722176.4NaN0.0103.0-105.52346839.738600...False0.1123470.112349False0.1836950.183696False0.1931030.193104False
22012-07-21 09:15:23339.738600-105.5234682176.421.00.0101.0-105.52346839.738600...False0.1123490.112349False0.1836960.183696False0.1931040.193104False
32012-07-21 09:15:24439.738600-105.5234682180.021.00.099.0-105.52346839.738598...False0.1123490.112347False0.1836960.183694False0.1931040.193102False
42012-07-21 09:15:25539.738598-105.5234682183.621.00.096.0-105.52346839.738591...False0.1123470.112342False0.1836940.183689False0.1931020.193097False
..................................................................
87652012-07-21 13:02:05876639.741518-105.5197862238.234.00.0NaN-105.51978639.741518...False0.1170270.117027False0.1882960.188296False0.1976830.197683False
87662012-07-21 13:02:06876739.741518-105.5197862237.434.00.0NaN-105.51978639.741518...False0.1170270.117027False0.1882960.188296False0.1976830.197683False
87672012-07-21 13:02:07876839.741518-105.5197862237.034.00.0NaN-105.51978639.741518...False0.1170270.117027False0.1882960.188296False0.1976830.197683False
87682012-07-21 13:02:20876939.741518-105.5197862237.035.00.0NaN-105.51978839.741519...False0.1170270.117026False0.1882960.188295False0.1976830.197682False
87692012-07-21 13:02:31877039.741519-105.5197882237.035.00.0NaNNaNNaN...False0.117026NaNFalse0.188295NaNFalse0.197682NaNFalse
\n", + "

8770 rows × 28 columns

\n", + "
" + ], + "text/plain": [ + " Date_Time No Latitude Longitude Altitude Temperature \\\n", + "0 2012-07-21 09:15:20 1 39.738603 -105.523477 2176.4 NaN \n", + "1 2012-07-21 09:15:21 2 39.738602 -105.523472 2176.4 NaN \n", + "2 2012-07-21 09:15:23 3 39.738600 -105.523468 2176.4 21.0 \n", + "3 2012-07-21 09:15:24 4 39.738600 -105.523468 2180.0 21.0 \n", + "4 2012-07-21 09:15:25 5 39.738598 -105.523468 2183.6 21.0 \n", + "... ... ... ... ... ... ... \n", + "8765 2012-07-21 13:02:05 8766 39.741518 -105.519786 2238.2 34.0 \n", + "8766 2012-07-21 13:02:06 8767 39.741518 -105.519786 2237.4 34.0 \n", + "8767 2012-07-21 13:02:07 8768 39.741518 -105.519786 2237.0 34.0 \n", + "8768 2012-07-21 13:02:20 8769 39.741518 -105.519786 2237.0 35.0 \n", + "8769 2012-07-21 13:02:31 8770 39.741519 -105.519788 2237.0 35.0 \n", + "\n", + " Speed Heartrate shift_Longitude shift_Latitude ... mark_1 \\\n", + "0 0.0 103.0 -105.523472 39.738602 ... False \n", + "1 0.0 103.0 -105.523468 39.738600 ... False \n", + "2 0.0 101.0 -105.523468 39.738600 ... False \n", + "3 0.0 99.0 -105.523468 39.738598 ... False \n", + "4 0.0 96.0 -105.523468 39.738591 ... False \n", + "... ... ... ... ... ... ... \n", + "8765 0.0 NaN -105.519786 39.741518 ... False \n", + "8766 0.0 NaN -105.519786 39.741518 ... False \n", + "8767 0.0 NaN -105.519786 39.741518 ... False \n", + "8768 0.0 NaN -105.519788 39.741519 ... False \n", + "8769 0.0 NaN NaN NaN ... False \n", + "\n", + " p_to_A2 p_to_B2 mark_2 p_to_A3 p_to_B3 mark_3 p_to_A4 \\\n", + "0 0.112344 0.112347 False 0.183693 0.183695 False 0.193101 \n", + "1 0.112347 0.112349 False 0.183695 0.183696 False 0.193103 \n", + "2 0.112349 0.112349 False 0.183696 0.183696 False 0.193104 \n", + "3 0.112349 0.112347 False 0.183696 0.183694 False 0.193104 \n", + "4 0.112347 0.112342 False 0.183694 0.183689 False 0.193102 \n", + "... ... ... ... ... ... ... ... \n", + "8765 0.117027 0.117027 False 0.188296 0.188296 False 0.197683 \n", + "8766 0.117027 0.117027 False 0.188296 0.188296 False 0.197683 \n", + "8767 0.117027 0.117027 False 0.188296 0.188296 False 0.197683 \n", + "8768 0.117027 0.117026 False 0.188296 0.188295 False 0.197683 \n", + "8769 0.117026 NaN False 0.188295 NaN False 0.197682 \n", + "\n", + " p_to_B4 mark_4 \n", + "0 0.193103 False \n", + "1 0.193104 False \n", + "2 0.193104 False \n", + "3 0.193102 False \n", + "4 0.193097 False \n", + "... ... ... \n", + "8765 0.197683 False \n", + "8766 0.197683 False \n", + "8767 0.197683 False \n", + "8768 0.197682 False \n", + "8769 NaN False \n", + "\n", + "[8770 rows x 28 columns]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "activity" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {