def epomeo_gpx(data_set='<STR_LIT>', sample_every=<NUM_LIT:4>):
import gpxpy<EOL>import gpxpy.gpx<EOL>if not data_available(data_set):<EOL><INDENT>download_data(data_set)<EOL><DEDENT>files = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>']<EOL>X = []<EOL>for file in files:<EOL><INDENT>gpx_file = open(os.path.join(data_path, '<STR_LIT>', file + '<STR_LIT>'), '<STR_LIT:r>')<EOL>gpx = gpxpy.parse(gpx_file)<EOL>segment = gpx.tracks[<NUM_LIT:0>].segments[<NUM_LIT:0>]<EOL>points = [point for track in gpx.tracks for segment in track.segments for point in segment.points]<EOL>data = [[(point.time-datetime.datetime(<NUM_LIT>,<NUM_LIT:8>,<NUM_LIT>)).total_seconds(), point.latitude, point.longitude, point.elevation] for point in points]<EOL>X.append(np.asarray(data)[::sample_every, :])<EOL>gpx_file.close()<EOL><DEDENT>if pandas_available:<EOL><INDENT>X = pd.DataFrame(X[<NUM_LIT:0>], columns=['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'])<EOL>X.set_index(keys='<STR_LIT>', inplace=True)<EOL><DEDENT>return data_details_return({'<STR_LIT:X>' : X, '<STR_LIT:info>' : '<STR_LIT>'}, data_set)<EOL>
Data set of three GPS traces of the same movement on Mt Epomeo in Ischia. Requires gpxpy to run.