Big Sur 2021-10-07 thru 09

Photos

Hosted on Google Photos, displayed in carousel below using the Public Album tool created by Pavel.

## GPS Data
import pandas as pd
from gpx_converter import Converter
from haversine import haversine, Unit
files = [
    'big-sur-2021-10-07-thru-09/to-espinoza-camp.gpx',
    'big-sur-2021-10-07-thru-09/to-vicente-flat-camp.gpx',
    'big-sur-2021-10-07-thru-09/to-limekiln-creek.gpx',
    'big-sur-2021-10-07-thru-09/to-goat-camp.gpx',
    'big-sur-2021-10-07-thru-09/to-real-goat-camp.gpx',
    'big-sur-2021-10-07-thru-09/down-from-goat-camp.gpx',
    'big-sur-2021-10-07-thru-09/back-to-vehicle.gpx'
]

Cleanse and Transform GPS Data

def transform_gpx_data(filename):
    df = (Converter(input_file=filename)
          .gpx_to_dataframe())
    df = df[df['time'].dt.day == df['time'].dt.day.values[0]].reset_index(drop=True)
    df['time'] = df['time'].apply(lambda x: x.tz_convert('US/Pacific'))
    df['seconds_delta'] = (((df['time'].shift(-1)-df['time'])
                            .fillna(pd.Timedelta(seconds=0))
                            .astype(int)/1000000000)
                           .astype(int))
    df['human_date'] = df['time'].dt.strftime('%Y-%m-%d')
    df['human_time'] = df['time'].dt.strftime('%I:%M:%S %p')
    
    df['altitude_feet'] = round(df['altitude'] * 3.280839895).astype('int')
    
    for i in range(df.shape[0]-1):
        start = df.at[i,   'latitude'], df.at[i,   'longitude']
        end =   df.at[i+1, 'latitude'], df.at[i+1, 'longitude']
        distance = round(haversine(start,
                                   end,
                                   unit=Unit.FEET),1)
        df.at[i, 'distance_feet'] = distance

        altitude_change = df.at[i+1, 'altitude_feet'] - df.at[i, 'altitude_feet']
        df.at[i, 'altitude_change'] = altitude_change
    
    df['speed_mph'] = ((df['distance_feet'] / df['seconds_delta']) * (3600/5280)).round(1)
    
    df = df[['time', 'human_date', 'human_time', 'seconds_delta',
             'latitude', 'longitude', 'altitude', 'altitude_feet',
             'distance_feet', 'speed_mph', 
             'altitude_feet','altitude_change']].copy()
    return df
for file in files:
    print(file)
    d = transform_gpx_data(file)
    string = '''{}, {} - {}
Start: ({}, {}),   End: ({}, {})
{} GPS datapoints
{} duration
{:3.2f} miles @ {:3.1f} avg MPH
{:3.0f}/{:3.0f} feet total/net elevation change'''.format(
        d['human_date'].min(), 
        d.iloc[0]['human_time'], 
        d.iloc[d.shape[0]-1]['human_time'], 
        d.iloc[0]['latitude'], 
        d.iloc[0]['longitude'],
        d.iloc[d.shape[0]-1]['latitude'], 
        d.iloc[d.shape[0]-1]['longitude'],
        d.shape[0],
        str(d['time'].max()-d['time'].min())[7:12],
        d['distance_feet'].sum()/5280, 
        d['speed_mph'].mean(),
        d['altitude_change'].abs().sum(), 
        d['altitude_change'].sum())
    print(string + '\n')
big-sur-2021-10-07-thru-09/to-espinoza-camp.gpx
2021-10-07, 03:45:13 PM - 04:59:57 PM
Start: (35.99048, -121.495111),   End: (36.010435, -121.502059)
357 GPS datapoints
01:14 duration
2.62 miles @ 2.4 avg MPH
2303/1303 feet total/net elevation change

big-sur-2021-10-07-thru-09/to-vicente-flat-camp.gpx
2021-10-07, 05:25:48 PM - 06:21:25 PM
Start: (36.015513, -121.49835),   End: (36.030233, -121.48837)
351 GPS datapoints
00:55 duration
2.04 miles @ 2.5 avg MPH
1683/-109 feet total/net elevation change

big-sur-2021-10-07-thru-09/to-limekiln-creek.gpx
2021-10-08, 09:45:00 AM - 11:33:04 AM
Start: (36.029861, -121.488723),   End: (36.02966, -121.506612)
535 GPS datapoints
01:48 duration
2.66 miles @ 2.0 avg MPH
3930/-46 feet total/net elevation change

big-sur-2021-10-07-thru-09/to-goat-camp.gpx
2021-10-08, 12:08:51 PM - 02:58:57 PM
Start: (36.029731, -121.50667),   End: (36.044569, -121.521033)
692 GPS datapoints
02:50 duration
3.43 miles @ 1.6 avg MPH
4943/883 feet total/net elevation change

big-sur-2021-10-07-thru-09/to-real-goat-camp.gpx
2021-10-08, 03:25:41 PM - 04:46:14 PM
Start: (36.044778, -121.52113),   End: (36.050524, -121.52289)
144 GPS datapoints
01:20 duration
0.73 miles @ 1.5 avg MPH
1201/ 95 feet total/net elevation change

big-sur-2021-10-07-thru-09/down-from-goat-camp.gpx
2021-10-09, 10:17:55 AM - 11:52:36 AM
Start: (36.050437, -121.523461),   End: (36.027639, -121.517831)
458 GPS datapoints
01:34 duration
2.40 miles @ 1.9 avg MPH
2757/-289 feet total/net elevation change

big-sur-2021-10-07-thru-09/back-to-vehicle.gpx
2021-10-09, 12:10:14 PM - 02:25:47 PM
Start: (36.027546, -121.51768),   End: (35.990748, -121.49524)
656 GPS datapoints
02:15 duration
5.00 miles @ 2.5 avg MPH
3983/-2189 feet total/net elevation change