In [1]:
%matplotlib inline
import pandas.io.sql as psql
import pandas as pd
import numpy as np
#import MySQLdb as sql
from matplotlib import pyplot as plt
import time
import datetime
import csv
import math
import datetime as dt
import gpxpy
import gpxpy.gpx
import argparse
import happy
In [6]:
lon=[]
lat=[]
t=[]
gpx_file = open('1217Caltrain.gpx', 'r')
gpx = gpxpy.parse(gpx_file)
for track in gpx.tracks:
for segment in track.segments:
for point in segment.points:
timestamp = int((point.time - dt.datetime(1970, 1, 1)).total_seconds())
lon.append(point.longitude)
lat.append(point.latitude)
t.append(timestamp)
In [11]:
In [11]:
In [11]:
In [11]:
In [ ]: