Big Sur 2021-08-20 thru 22

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-08-20-thru-22/salmon-creek-trailhead-to-spruce-camp-82021-91230am.gpx',
    'big-sur-2021-08-20-thru-22/spruce-camp-to-estrella-camp-82021-112028am.gpx',
    'big-sur-2021-08-20-thru-22/estrella-camp-to-lions-den-camp.gpx',
    'big-sur-2021-08-20-thru-22/lions-den-camp-to-cruikshank-camp.gpx',
    'big-sur-2021-08-20-thru-22/to-north-buckeye-camp.gpx',
    'big-sur-2021-08-20-thru-22/track-82221-81723am.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-08-20-thru-22/salmon-creek-trailhead-to-spruce-camp-82021-91230am.gpx
2021-08-20, 09:12:31 AM - 10:32:25 AM
Start: (35.815768, -121.358696),   End: (35.82598, -121.344968)
510 GPS datapoints
01:19 duration
2.36 miles @ 2.1 avg MPH
2931/637 feet total/net elevation change

big-sur-2021-08-20-thru-22/spruce-camp-to-estrella-camp-82021-112028am.gpx
2021-08-20, 11:20:29 AM - 12:04:52 PM
Start: (35.826085, -121.344949),   End: (35.836589, -121.338499)
311 GPS datapoints
00:44 duration
1.36 miles @ 2.1 avg MPH
1827/593 feet total/net elevation change

big-sur-2021-08-20-thru-22/estrella-camp-to-lions-den-camp.gpx
2021-08-20, 01:46:40 PM - 04:45:14 PM
Start: (35.836574, -121.338406),   End: (35.858025, -121.338469)
591 GPS datapoints
02:58 duration
3.50 miles @ 2.0 avg MPH
4085/1435 feet total/net elevation change

big-sur-2021-08-20-thru-22/lions-den-camp-to-cruikshank-camp.gpx
2021-08-21, 08:53:39 AM - 11:54:47 AM
Start: (35.858349, -121.338616),   End: (35.856667, -121.38415)
921 GPS datapoints
03:01 duration
5.03 miles @ 2.1 avg MPH
5722/-1690 feet total/net elevation change

big-sur-2021-08-20-thru-22/to-north-buckeye-camp.gpx
2021-08-21, 01:04:18 PM - 02:52:32 PM
Start: (35.85661, -121.384024),   End: (35.840788, -121.378364)
523 GPS datapoints
01:48 duration
2.62 miles @ 1.9 avg MPH
3401/641 feet total/net elevation change

big-sur-2021-08-20-thru-22/track-82221-81723am.gpx
2021-08-22, 08:17:24 AM - 10:26:54 AM
Start: (35.840822, -121.378279),   End: (35.81578, -121.358846)
725 GPS datapoints
02:09 duration
4.04 miles @ 2.2 avg MPH
4348/-1794 feet total/net elevation change