<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Let's plot our most recent Torque log in python
Step1:  Import the file into pandas, and drop all rows without a GPS fix
Step2:  Find the Lat/Lon bounding box and create a new map from the osmapping library
Step3:  Import the shapefiles from Mapzen for Boston
Step4:  Select most road-types and some parks for plotting
Step5:  Plot the basemap and then overlay the trip trace
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import osmapping
import glob
%matplotlib inline
Explanation: Let's plot our most recent Torque log in python
End of explanation
dname = '/Users/astyler/projects/torquedata/'
trips = []
fnames = glob.glob(dname+'*.csv')
for fname in fnames:
    trip = pd.read_csv(fname, na_values=['-'],encoding ='U8',index_col=False, header=False, names=['GPSTime','Time','Longitude','Latitude','GPSSpeed','GPSError','Altitude','Bearing','Gx','Gy','Gz','G','Az','Ay','Ax','A','Power','Accuracy','Satellites','GPSAltitude','GPSBearing','Lat2','Lon2','OBDSpeed','GPSSpeedkmhr'])
    trip = trip.dropna(subset = ['Longitude','Latitude'])
    trips.append(trip)
    
fnames
Explanation: Import the file into pandas, and drop all rows without a GPS fix
End of explanation
buffr = 0.01
mins=[(min(trip.Longitude) -buffr,min(trip.Latitude)-buffr) for trip in trips]
maxs=[(max(trip.Longitude) + buffr,max(trip.Latitude)+buffr) for trip in trips]
ll = map(min,zip(*mins))
ur = map(max,zip(*maxs))
print ll
print ur
mymap = osmapping.MLMap(ll,ur)
for trip in trips:
    trip['x'], trip['y'] = mymap.convert_coordinates(trip[['Longitude','Latitude']].values).T
Explanation: Find the Lat/Lon bounding box and create a new map from the osmapping library
End of explanation
reload(osmapping)
mymap.load_shape_file('./shapefiles/boston/line.shp')
mymap.load_shape_file('./shapefiles/boston/polygon.shp')
mymap.shapes.shape
coords = [(79,80),(15,24)]
print zip(*coords)
print zip(*[(1,1),(2,2)])
#print mymap.basemap([79,15],[80,24])
print mymap.basemap(79,80)
print mymap.basemap(15,24)
print zip(*mymap.basemap(*zip(*coords)))
Explanation: Import the shapefiles from Mapzen for Boston
End of explanation
mymap.clear_selected_shapes()
road = {'edgecolor':'white','lw':3, 'facecolor':'none','zorder':6};
mymap.select_shape('highway','motorway',**road)
mymap.select_shape('highway','trunk',**road)
mymap.select_shape('highway','primary',**road)
mymap.select_shape('highway','secondary',**road)
mymap.select_shape('highway','tertiary',**road)
mymap.select_shape('highway','residential',**road)
mymap.select_shape('leisure','park',facecolor='#BBDDBB',edgecolor='none',zorder=4)
mymap.select_shape('waterway','riverbank',facecolor='#0044CC', edgecolor='none', zorder=5)
mymap.select_shape('natural','water',facecolor='#CCCCEE', edgecolor='none', zorder=5)
bselect = lambda x: x['building'] in ['yes', 'apartments', 'commercial', 'house', 'residential', 'university', 'church', 'garage'] 
bldg = {'facecolor':'none', 'edgecolor':'#dedede', 'hatch':'////','zorder':7}
mymap.select_shapes(bselect, **bldg)
Explanation: Select most road-types and some parks for plotting
End of explanation
for trip in trips:
    trip.loc[trip.Satellites < 5,'Satellites'] = None
    trip.loc[trip.Accuracy > 20,'Accuracy'] = None
    trip.dropna(subset=['Accuracy'], inplace=True)
fig = plt.figure(figsize=(12,12))
ax = fig.add_subplot(111)
mymap.draw_map(ax, map_fill='#eeeeee')
for (idx,trip) in enumerate(trips):
    ax.plot(trip.x, trip.y, lw=2, alpha=1,zorder=99, label=str(idx))
plt.legend()
Explanation: Plot the basemap and then overlay the trip trace
End of explanation
<END_TASK>