Do some initial testing and analysis


In [4]:
import pickle
from geopy.distance import vincenty

Import all data (data was previously cleaning in other notebooks)


In [5]:
station_data = pickle.load( open( "station_data.p", "rb" ) )
bike_location = pickle.load( open( "bike_location.p", "rb" ) )

Now I have one dict with metro stations and one with bike stations


In [4]:
print(station_data['RD']['Bethesda'])
print(bike_location['Silver Spring Metro/Colesville Rd & Wayne Ave'])


[38.984282, -77.094431]
[38.99521, -77.02918]

step 1) create list of bike stations along each line

Compare the distances of each bike station to each metro station of each line. If the bike station is "close" to a metro station, it should be added to a list.

  • Build test example with RD line

In [28]:
vincenty(station_data['RD']['Silver Spring'], bike_location['11th & O St NW']).miles
for key_bike in bike_location:
        dist = vincenty(station_data['RD']['Silver Spring'], bike_location[key_bike]).miles
        if dist <= 0.3:
            print([key_bike ,dist])


['Silver Spring Metro/Colesville Rd & Wayne Ave', 0.14900125289692967]
['East West Hwy & Blair Mill Rd', 0.269544825073598]
['Ripley & Bonifant St', 0.12842855448544993]
  • Iterate through each metro line, calculating the distance between each station of that line to each bikeshare station.
  • Use set to drop duplicates

make the below code a function that can be used to generate lists of stations based on different distances


In [6]:
def close_stations(distance):
    """This fn will return a dict of bikeshare stations close 
    to each metro stop based on the suppled distance in miles"""
    lines = ['RD', 'YL', 'GR','BL', 'OR', 'SV']
    bikes_close = dict()
    for ii in range(len(lines)):
        bikes_temp = []
        for key_metro in station_data[lines[ii]]:
            for key_bike in bike_location:
                dist = vincenty(station_data[lines[ii]][key_metro], bike_location[key_bike]).miles
                if dist <= distance:
                    bikes_temp.append(key_bike)
                    print([lines[ii], key_metro, key_bike, dist])
        bikes_close[lines[ii]] = list(set(bikes_temp))
    return bikes_close

In [57]:
lines = ['RD', 'YL', 'GR','BL', 'OR', 'SV']
bikes_close = dict()
for ii in range(len(lines)):
    bikes_temp = []
    for key_metro in station_data[lines[ii]]:
        for key_bike in bike_location:
            dist = vincenty(station_data[lines[ii]][key_metro], bike_location[key_bike]).miles
            if dist <= 0.25:
                bikes_temp.append(key_bike)
                print([lines[ii], key_metro, key_bike, dist])
    bikes_close[lines[ii]] = list(set(bikes_temp))


['RD', 'Metro Center', '14th St & New York Ave NW', 0.21398470451775278]
['RD', 'Metro Center', '13th St & New York Ave NW', 0.16516781023326638]
['RD', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['RD', 'Metro Center', '14th & G St NW', 0.2013871937335083]
['RD', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['RD', 'Metro Center', '10th & E St NW', 0.19796628566735064]
['RD', 'Metro Center', 'MLK Library/9th & G St NW', 0.2059236753082303]
['RD', 'Farragut North', '17th & K St NW', 0.06809744971683841]
['RD', 'Farragut North', '18th & M St NW', 0.14583455959811434]
['RD', 'Farragut North', '19th & L St NW', 0.2097660688445131]
['RD', 'Farragut North', '17th & K St NW / Farragut Square', 0.11020264340930738]
['RD', 'Farragut North', '17th & Rhode Island Ave NW', 0.24109371721077677]
['RD', 'Farragut North', '19th & K St NW', 0.205866878789979]
['RD', 'Farragut North', '16th & K St NW', 0.22001877202091058]
['RD', 'Dupont Circle', 'Massachusetts Ave & Dupont Circle NW', 0.05904192211308173]
['RD', 'Dupont Circle', '20th & O St NW / Dupont South', 0.07475003434079858]
['RD', 'Dupont Circle', '18th & R St NW', 0.23759175540568198]
['RD', 'Woodley Park-Zoo/Adams Morgan', 'Calvert St & Woodley Pl NW', 0.17087686958666962]
['RD', 'Cleveland Park', 'Connecticut Ave & Newark St NW / Cleveland Park', 0.032888310887331594]
['RD', 'Van Ness-UDC', 'Van Ness Metro / UDC', 0.06748728170569013]
['RD', 'Van Ness-UDC', 'Connecticut Ave & Tilden St NW', 0.18775077370601284]
['RD', 'Tenleytown-AU', 'Tenleytown / Wisconsin Ave & Albemarle St NW', 0.01870215984191263]
['RD', 'Tenleytown-AU', 'Yuma St & Tenley Circle NW', 0.12385090651369136]
['RD', 'Tenleytown-AU', 'Wisconsin Ave & Brandywine St NW', 0.14205790278530103]
['RD', 'Friendship Heights', 'Friendship Hts Metro/Wisconsin Ave & Wisconsin Cir', 0.07030935754340062]
['RD', 'Friendship Heights', 'Friendship Blvd & Willard Ave', 0.1475568018064194]
['RD', 'Friendship Heights', 'Wisconsin Ave & Ingomar St NW', 0.1853364965975283]
['RD', 'Bethesda', 'Montgomery Ave & Waverly St ', 0.12343704983228442]
['RD', 'Bethesda', 'Montgomery & East Ln', 0.07256963207918365]
['RD', 'Bethesda', '47th & Elm St', 0.1819995760006289]
['RD', 'Bethesda', 'Bethesda Metro', 0.028784887064349826]
['RD', 'Medical Center', 'Medical Center Metro ', 0.05183570243479291]
['RD', 'Rockville', 'Monroe St & Monroe Pl', 0.1518784402852736]
['RD', 'Rockville', 'Rockville Metro East', 0.08791680580313965]
['RD', 'Rockville', 'Rockville Metro West', 0.02631890291879981]
['RD', 'Shady Grove', 'Shady Grove Metro West', 0.06308897851791358]
['RD', 'Gallery Pl-Chinatown', '5th & F St NW', 0.15545516612698382]
['RD', 'Gallery Pl-Chinatown', '8th & H St NW', 0.1150334216235156]
['RD', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['RD', 'Gallery Pl-Chinatown', '5th St & Massachusetts Ave NW', 0.24736734908032668]
['RD', 'Gallery Pl-Chinatown', 'MLK Library/9th & G St NW', 0.1310612600808437]
['RD', 'Judiciary Square', '3rd & H St NW', 0.2406276772242024]
['RD', 'Judiciary Square', '5th & F St NW', 0.16555436487233147]
['RD', 'Judiciary Square', '4th & D St NW / Judiciary Square', 0.058682349306896676]
['RD', 'Judiciary Square', '6th St & Indiana Ave NW', 0.20603767723861652]
['RD', 'Union Station', 'Columbus Circle / Union Station', 0.11109583809423976]
['RD', 'Union Station', 'North Capitol St & F St NW', 0.1704964397188881]
['RD', 'Union Station', 'North Capitol St & G Pl NE', 0.17968423401360265]
['RD', 'Union Station', '2nd & G St NE', 0.21350387027687284]
['RD', 'Rhode Island Ave-Brentwood', 'Rhode Island Ave Metro', 0.007101677542623397]
['RD', 'Brookland-CUA', 'John McCormack Dr & Michigan Ave NE', 0.10738651336738618]
['RD', 'Brookland-CUA', '12th & Newton St NE', 0.19242312312348303]
['RD', 'Brookland-CUA', '10th & Monroe St NE', 0.10206706540697874]
['RD', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['RD', 'Takoma', 'Takoma Metro', 0.05696539632243835]
['RD', 'Silver Spring', 'Silver Spring Metro/Colesville Rd & Wayne Ave', 0.14900125289692967]
['RD', 'Silver Spring', 'Ripley & Bonifant St', 0.12842855448544993]
['RD', 'NoMa-Gallaudet U', '1st & M St NE', 0.184651850477089]
['RD', 'NoMa-Gallaudet U', 'M St & Delaware Ave NE', 0.1173464582697328]
['YL', 'Pentagon City', 'Pentagon City Metro / 12th & S Hayes St', 0.05616960461752927]
['YL', 'Pentagon City', 'S Joyce & Army Navy Dr', 0.20948884489390635]
['YL', 'Crystal City', 'Eads St & 15th St S', 0.16409119071554526]
['YL', 'Crystal City', '18th & Eads St.', 0.1519332512988562]
['YL', 'Crystal City', '20th & Crystal Dr', 0.11925812826792695]
['YL', 'Crystal City', '15th & Crystal Dr', 0.17273774606001854]
['YL', 'Crystal City', 'Crystal City Metro / 18th & Bell St', 0.03952555633368628]
['YL', 'Braddock Road', 'Braddock Rd Metro', 0.06474084924822252]
['YL', 'Braddock Road', 'Madison & N Henry St', 0.23459378802342581]
['YL', 'King St-Old Town', 'King St Metro South', 0.05322495125055565]
['YL', 'King St-Old Town', 'Duke St & John Carlyle St', 0.14520436443395887]
['YL', 'King St-Old Town', 'King St Metro North / Cameron St', 0.08020183404313651]
['YL', 'Eisenhower Avenue', 'Eisenhower Ave & Mill Race Ln', 0.1319180413655747]
['YL', 'Mt Vernon Sq 7th St-Convention Center', '5th & K St NW', 0.2481376013434445]
['YL', 'Mt Vernon Sq 7th St-Convention Center', 'Convention Center / 7th & M St NW', 0.009205412414386742]
['YL', 'Mt Vernon Sq 7th St-Convention Center', '8th & O St NW', 0.21124985040669653]
['YL', 'Shaw-Howard U', '7th & T St NW', 0.1780397511948995]
['YL', 'Shaw-Howard U', '7th & R St NW / Shaw Library', 0.013955344171547574]
['YL', 'Shaw-Howard U', 'New Jersey Ave & R St NW', 0.24452519804246325]
['YL', 'U Street/African-Amer Civil War Memorial/Cardozo', '14th & V St NW', 0.18684085297228728]
['YL', 'U Street/African-Amer Civil War Memorial/Cardozo', '10th & U St NW', 0.1709066185507988]
['YL', 'U Street/African-Amer Civil War Memorial/Cardozo', '12th & U St NW', 0.047713514018469315]
['YL', 'U Street/African-Amer Civil War Memorial/Cardozo', '11th & S St NW', 0.21456936049401606]
['YL', 'Columbia Heights', '14th & Harvard St NW', 0.13279705137830278]
['YL', 'Columbia Heights', 'Park Rd & Holmead Pl NW', 0.1620712692428792]
['YL', 'Columbia Heights', '16th & Irving St NW', 0.18785630620859795]
['YL', 'Columbia Heights', '14th & Girard St NW', 0.2346992048938659]
['YL', 'Columbia Heights', '14th & Irving St NW', 0.03082093490087573]
['YL', 'Georgia Ave-Petworth', 'Georgia & New Hampshire Ave NW', 0.004859580763556235]
['YL', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['YL', 'Gallery Pl-Chinatown', '5th & F St NW', 0.15545516612698382]
['YL', 'Gallery Pl-Chinatown', '8th & H St NW', 0.1150334216235156]
['YL', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['YL', 'Gallery Pl-Chinatown', '5th St & Massachusetts Ave NW', 0.24736734908032668]
['YL', 'Gallery Pl-Chinatown', 'MLK Library/9th & G St NW', 0.1310612600808437]
['YL', 'Archives-Navy Memorial-Penn Quarter', '10th St & Constitution Ave NW', 0.22950697051048521]
['YL', 'Archives-Navy Memorial-Penn Quarter', '7th & F St NW/Portrait Gallery', 0.2352078996996687]
['YL', 'Archives-Navy Memorial-Penn Quarter', '6th St & Indiana Ave NW', 0.11570080522927167]
['YL', 'Archives-Navy Memorial-Penn Quarter', '8th & D St NW', 0.09782339862004422]
['YL', "L'Enfant Plaza", "L'Enfant Plaza / 7th & C St SW", 0.10392845771796301]
['YL', "L'Enfant Plaza", 'Maryland & Independence Ave SW', 0.23855994005900782]
['YL', "L'Enfant Plaza", '4th & E St SW', 0.24779407268961226]
['YL', "L'Enfant Plaza", "10th St & L'Enfant Plaza SW", 0.20814928065410226]
['GR', 'Mt Vernon Sq 7th St-Convention Center', '5th & K St NW', 0.2481376013434445]
['GR', 'Mt Vernon Sq 7th St-Convention Center', 'Convention Center / 7th & M St NW', 0.009205412414386742]
['GR', 'Mt Vernon Sq 7th St-Convention Center', '8th & O St NW', 0.21124985040669653]
['GR', 'Shaw-Howard U', '7th & T St NW', 0.1780397511948995]
['GR', 'Shaw-Howard U', '7th & R St NW / Shaw Library', 0.013955344171547574]
['GR', 'Shaw-Howard U', 'New Jersey Ave & R St NW', 0.24452519804246325]
['GR', 'U Street/African-Amer Civil War Memorial/Cardozo', '14th & V St NW', 0.18684085297228728]
['GR', 'U Street/African-Amer Civil War Memorial/Cardozo', '10th & U St NW', 0.1709066185507988]
['GR', 'U Street/African-Amer Civil War Memorial/Cardozo', '12th & U St NW', 0.047713514018469315]
['GR', 'U Street/African-Amer Civil War Memorial/Cardozo', '11th & S St NW', 0.21456936049401606]
['GR', 'Columbia Heights', '14th & Harvard St NW', 0.13279705137830278]
['GR', 'Columbia Heights', 'Park Rd & Holmead Pl NW', 0.1620712692428792]
['GR', 'Columbia Heights', '16th & Irving St NW', 0.18785630620859795]
['GR', 'Columbia Heights', '14th & Girard St NW', 0.2346992048938659]
['GR', 'Columbia Heights', '14th & Irving St NW', 0.03082093490087573]
['GR', 'Georgia Ave-Petworth', 'Georgia & New Hampshire Ave NW', 0.004859580763556235]
['GR', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['GR', 'Gallery Pl-Chinatown', '5th & F St NW', 0.15545516612698382]
['GR', 'Gallery Pl-Chinatown', '8th & H St NW', 0.1150334216235156]
['GR', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['GR', 'Gallery Pl-Chinatown', '5th St & Massachusetts Ave NW', 0.24736734908032668]
['GR', 'Gallery Pl-Chinatown', 'MLK Library/9th & G St NW', 0.1310612600808437]
['GR', 'Archives-Navy Memorial-Penn Quarter', '10th St & Constitution Ave NW', 0.22950697051048521]
['GR', 'Archives-Navy Memorial-Penn Quarter', '7th & F St NW/Portrait Gallery', 0.2352078996996687]
['GR', 'Archives-Navy Memorial-Penn Quarter', '6th St & Indiana Ave NW', 0.11570080522927167]
['GR', 'Archives-Navy Memorial-Penn Quarter', '8th & D St NW', 0.09782339862004422]
['GR', "L'Enfant Plaza", "L'Enfant Plaza / 7th & C St SW", 0.10392845771796301]
['GR', "L'Enfant Plaza", 'Maryland & Independence Ave SW', 0.23855994005900782]
['GR', "L'Enfant Plaza", '4th & E St SW', 0.24779407268961226]
['GR', "L'Enfant Plaza", "10th St & L'Enfant Plaza SW", 0.20814928065410226]
['GR', 'Waterfront', '4th & M St SW', 0.037004749474119414]
['GR', 'Waterfront', '6th & Water St SW / SW Waterfront', 0.20700758680781464]
['GR', 'Navy Yard-Ballpark', '1st & N St  SE', 0.16126219017567328]
['GR', 'Navy Yard-Ballpark', 'M St & New Jersey Ave SE', 0.0773294486819899]
['GR', 'Navy Yard-Ballpark', '1st & K St SE', 0.14800096458115383]
['GR', 'Navy Yard-Ballpark', '3rd & Tingey St SE', 0.18117640721210493]
['GR', 'Anacostia', 'Anacostia Metro', 0.06832870667596788]
['GR', 'Congress Heights', 'Congress Heights Metro', 0.04687429980919824]
['BL', 'Metro Center', '14th St & New York Ave NW', 0.21398470451775278]
['BL', 'Metro Center', '13th St & New York Ave NW', 0.16516781023326638]
['BL', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['BL', 'Metro Center', '14th & G St NW', 0.2013871937335083]
['BL', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['BL', 'Metro Center', '10th & E St NW', 0.19796628566735064]
['BL', 'Metro Center', 'MLK Library/9th & G St NW', 0.2059236753082303]
['BL', 'McPherson Square', '14th St & New York Ave NW', 0.15723885768535162]
['BL', 'McPherson Square', 'New York Ave & 15th St NW', 0.1528829909635483]
['BL', 'McPherson Square', '13th St & New York Ave NW', 0.21839717496341166]
['BL', 'McPherson Square', '14th & G St NW', 0.2447178506415466]
['BL', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['BL', 'McPherson Square', '15th & L St NW', 0.17402814495613508]
['BL', 'McPherson Square', '14th & L St NW', 0.19171259255494894]
['BL', 'McPherson Square', '16th & K St NW', 0.14657107395136645]
['BL', 'Farragut West', '19th St & Pennsylvania Ave NW', 0.1805688709642097]
['BL', 'Farragut West', '17th & K St NW', 0.1184736548215834]
['BL', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['BL', 'Farragut West', '18th St & Pennsylvania Ave NW', 0.14609472497519788]
['BL', 'Farragut West', '19th & K St NW', 0.20153425530675095]
['BL', 'Farragut West', '17th & G St NW', 0.20036382189279997]
['BL', 'Farragut West', '16th & K St NW', 0.23898899297867704]
['BL', 'Foggy Bottom-GWU', '21st & I St NW', 0.17696624776430825]
['BL', 'Foggy Bottom-GWU', '21st St & Pennsylvania Ave NW', 0.21017496483160936]
['BL', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['BL', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['BL', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['BL', 'Rosslyn', 'Rosslyn Metro / Wilson Blvd & Ft Myer Dr', 0.1449589727329511]
['BL', 'Rosslyn', 'N Lynn St & Fairfax Dr', 0.19139610904944696]
['BL', 'Pentagon City', 'Pentagon City Metro / 12th & S Hayes St', 0.05616960461752927]
['BL', 'Pentagon City', 'S Joyce & Army Navy Dr', 0.20948884489390635]
['BL', 'Crystal City', 'Eads St & 15th St S', 0.16409119071554526]
['BL', 'Crystal City', '18th & Eads St.', 0.1519332512988562]
['BL', 'Crystal City', '20th & Crystal Dr', 0.11925812826792695]
['BL', 'Crystal City', '15th & Crystal Dr', 0.17273774606001854]
['BL', 'Crystal City', 'Crystal City Metro / 18th & Bell St', 0.03952555633368628]
['BL', 'Braddock Road', 'Braddock Rd Metro', 0.06474084924822252]
['BL', 'Braddock Road', 'Madison & N Henry St', 0.23459378802342581]
['BL', 'King St-Old Town', 'King St Metro South', 0.05322495125055565]
['BL', 'King St-Old Town', 'Duke St & John Carlyle St', 0.14520436443395887]
['BL', 'King St-Old Town', 'King St Metro North / Cameron St', 0.08020183404313651]
['BL', 'Federal Triangle', '10th St & Constitution Ave NW', 0.12906616047758845]
['BL', 'Federal Triangle', '14th & D St NW / Ronald Reagan Building', 0.19052632348683196]
['BL', 'Federal Triangle', '10th & E St NW', 0.18873662309316802]
['BL', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['BL', 'Smithsonian', 'Jefferson Dr & 14th St SW', 0.22921295383213527]
['BL', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['BL', 'Smithsonian', "Independence Ave & L'Enfant Plaza SW/DOE", 0.14188395524883454]
['BL', "L'Enfant Plaza", "L'Enfant Plaza / 7th & C St SW", 0.10392845771796301]
['BL', "L'Enfant Plaza", 'Maryland & Independence Ave SW', 0.23855994005900782]
['BL', "L'Enfant Plaza", '4th & E St SW', 0.24779407268961226]
['BL', "L'Enfant Plaza", "10th St & L'Enfant Plaza SW", 0.20814928065410226]
['BL', 'Federal Center SW', 'Maryland & Independence Ave SW', 0.2315870445775665]
['BL', 'Federal Center SW', '4th & E St SW', 0.10316959194745154]
['BL', 'Federal Center SW', 'Washington & Independence Ave SW/HHS', 0.17923314597574783]
['BL', 'Capitol South', '3rd & D St SE', 0.15322522684657777]
['BL', 'Capitol South', '3rd St & Pennsylvania Ave SE', 0.2388866523917833]
['BL', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['BL', 'Eastern Market', 'Eastern Market / 7th & North Carolina Ave SE', 0.2106018035593906]
['BL', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['BL', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['BL', 'Potomac Ave', '14th & D St SE', 0.21886517471083275]
['BL', 'Benning Road', 'Benning Rd & East Capitol St NE / Benning Rd Metro', 0.06875196675595115]
['BL', 'Capitol Heights', '61st St & Banks Pl NE', 0.14160870072421566]
['OR', 'Metro Center', '14th St & New York Ave NW', 0.21398470451775278]
['OR', 'Metro Center', '13th St & New York Ave NW', 0.16516781023326638]
['OR', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['OR', 'Metro Center', '14th & G St NW', 0.2013871937335083]
['OR', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['OR', 'Metro Center', '10th & E St NW', 0.19796628566735064]
['OR', 'Metro Center', 'MLK Library/9th & G St NW', 0.2059236753082303]
['OR', 'McPherson Square', '14th St & New York Ave NW', 0.15723885768535162]
['OR', 'McPherson Square', 'New York Ave & 15th St NW', 0.1528829909635483]
['OR', 'McPherson Square', '13th St & New York Ave NW', 0.21839717496341166]
['OR', 'McPherson Square', '14th & G St NW', 0.2447178506415466]
['OR', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['OR', 'McPherson Square', '15th & L St NW', 0.17402814495613508]
['OR', 'McPherson Square', '14th & L St NW', 0.19171259255494894]
['OR', 'McPherson Square', '16th & K St NW', 0.14657107395136645]
['OR', 'Farragut West', '19th St & Pennsylvania Ave NW', 0.1805688709642097]
['OR', 'Farragut West', '17th & K St NW', 0.1184736548215834]
['OR', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['OR', 'Farragut West', '18th St & Pennsylvania Ave NW', 0.14609472497519788]
['OR', 'Farragut West', '19th & K St NW', 0.20153425530675095]
['OR', 'Farragut West', '17th & G St NW', 0.20036382189279997]
['OR', 'Farragut West', '16th & K St NW', 0.23898899297867704]
['OR', 'Foggy Bottom-GWU', '21st & I St NW', 0.17696624776430825]
['OR', 'Foggy Bottom-GWU', '21st St & Pennsylvania Ave NW', 0.21017496483160936]
['OR', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['OR', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['OR', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['OR', 'Rosslyn', 'Rosslyn Metro / Wilson Blvd & Ft Myer Dr', 0.1449589727329511]
['OR', 'Rosslyn', 'N Lynn St & Fairfax Dr', 0.19139610904944696]
['OR', 'Federal Triangle', '10th St & Constitution Ave NW', 0.12906616047758845]
['OR', 'Federal Triangle', '14th & D St NW / Ronald Reagan Building', 0.19052632348683196]
['OR', 'Federal Triangle', '10th & E St NW', 0.18873662309316802]
['OR', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['OR', 'Smithsonian', 'Jefferson Dr & 14th St SW', 0.22921295383213527]
['OR', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['OR', 'Smithsonian', "Independence Ave & L'Enfant Plaza SW/DOE", 0.14188395524883454]
['OR', "L'Enfant Plaza", "L'Enfant Plaza / 7th & C St SW", 0.10392845771796301]
['OR', "L'Enfant Plaza", 'Maryland & Independence Ave SW', 0.23855994005900782]
['OR', "L'Enfant Plaza", '4th & E St SW', 0.24779407268961226]
['OR', "L'Enfant Plaza", "10th St & L'Enfant Plaza SW", 0.20814928065410226]
['OR', 'Federal Center SW', 'Maryland & Independence Ave SW', 0.2315870445775665]
['OR', 'Federal Center SW', '4th & E St SW', 0.10316959194745154]
['OR', 'Federal Center SW', 'Washington & Independence Ave SW/HHS', 0.17923314597574783]
['OR', 'Capitol South', '3rd & D St SE', 0.15322522684657777]
['OR', 'Capitol South', '3rd St & Pennsylvania Ave SE', 0.2388866523917833]
['OR', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['OR', 'Eastern Market', 'Eastern Market / 7th & North Carolina Ave SE', 0.2106018035593906]
['OR', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['OR', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['OR', 'Potomac Ave', '14th & D St SE', 0.21886517471083275]
['OR', 'Minnesota Ave', 'Minnesota Ave Metro/DOES', 0.0901446515107497]
['OR', 'Deanwood', 'Deanwood Rec Center', 0.1735496282518451]
['OR', 'Court House', 'Wilson Blvd & N Uhle St', 0.03960186288180089]
['OR', 'Court House', 'N Rhodes & 16th St N', 0.24874370238994145]
['OR', 'Court House', 'N Veitch & Key Blvd', 0.16639183585323736]
['OR', 'Court House', '15th & N Scott St', 0.1727411666694406]
['OR', 'Court House', 'Court House Metro / 15th & N Uhle St ', 0.0777875707328746]
['OR', 'Clarendon', 'Clarendon Blvd & N Fillmore St', 0.24086497799497678]
['OR', 'Clarendon', 'Clarendon Metro / Wilson Blvd & N Highland St', 0.1522934803671394]
['OR', 'Clarendon', 'Fairfax Dr & Wilson Blvd', 0.05774363584589857]
['OR', 'Clarendon', 'Washington Blvd & 10th St N', 0.21895913150870006]
['OR', 'Virginia Square-GMU', 'Wilson Blvd & N Oakland St', 0.12594698087453432]
['OR', 'Virginia Square-GMU', 'Virginia Square Metro / N Monroe St & 9th St N', 0.07025997566428539]
['OR', 'Virginia Square-GMU', 'Central Library / N Quincy St & 10th St N', 0.19742106200673581]
['OR', 'Virginia Square-GMU', 'Fairfax Dr & Kenmore St', 0.19401144387935257]
['OR', 'Ballston-MU', 'Ballston Metro / N Stuart & 9th St N', 0.0709644315787311]
['OR', 'Ballston-MU', 'N Randolph St & Fairfax Dr', 0.13909018298795253]
['OR', 'Ballston-MU', 'Utah St & 11th St N ', 0.1564819022944289]
['OR', 'East Falls Church', 'East Falls Church Metro/Sycamore St & 19th St N', 0.09326212342602272]
['SV', 'Metro Center', '14th St & New York Ave NW', 0.21398470451775278]
['SV', 'Metro Center', '13th St & New York Ave NW', 0.16516781023326638]
['SV', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['SV', 'Metro Center', '14th & G St NW', 0.2013871937335083]
['SV', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['SV', 'Metro Center', '10th & E St NW', 0.19796628566735064]
['SV', 'Metro Center', 'MLK Library/9th & G St NW', 0.2059236753082303]
['SV', 'McPherson Square', '14th St & New York Ave NW', 0.15723885768535162]
['SV', 'McPherson Square', 'New York Ave & 15th St NW', 0.1528829909635483]
['SV', 'McPherson Square', '13th St & New York Ave NW', 0.21839717496341166]
['SV', 'McPherson Square', '14th & G St NW', 0.2447178506415466]
['SV', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['SV', 'McPherson Square', '15th & L St NW', 0.17402814495613508]
['SV', 'McPherson Square', '14th & L St NW', 0.19171259255494894]
['SV', 'McPherson Square', '16th & K St NW', 0.14657107395136645]
['SV', 'Farragut West', '19th St & Pennsylvania Ave NW', 0.1805688709642097]
['SV', 'Farragut West', '17th & K St NW', 0.1184736548215834]
['SV', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['SV', 'Farragut West', '18th St & Pennsylvania Ave NW', 0.14609472497519788]
['SV', 'Farragut West', '19th & K St NW', 0.20153425530675095]
['SV', 'Farragut West', '17th & G St NW', 0.20036382189279997]
['SV', 'Farragut West', '16th & K St NW', 0.23898899297867704]
['SV', 'Foggy Bottom-GWU', '21st & I St NW', 0.17696624776430825]
['SV', 'Foggy Bottom-GWU', '21st St & Pennsylvania Ave NW', 0.21017496483160936]
['SV', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['SV', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['SV', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['SV', 'Rosslyn', 'Rosslyn Metro / Wilson Blvd & Ft Myer Dr', 0.1449589727329511]
['SV', 'Rosslyn', 'N Lynn St & Fairfax Dr', 0.19139610904944696]
['SV', 'Federal Triangle', '10th St & Constitution Ave NW', 0.12906616047758845]
['SV', 'Federal Triangle', '14th & D St NW / Ronald Reagan Building', 0.19052632348683196]
['SV', 'Federal Triangle', '10th & E St NW', 0.18873662309316802]
['SV', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['SV', 'Smithsonian', 'Jefferson Dr & 14th St SW', 0.22921295383213527]
['SV', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['SV', 'Smithsonian', "Independence Ave & L'Enfant Plaza SW/DOE", 0.14188395524883454]
['SV', "L'Enfant Plaza", "L'Enfant Plaza / 7th & C St SW", 0.10392845771796301]
['SV', "L'Enfant Plaza", 'Maryland & Independence Ave SW', 0.23855994005900782]
['SV', "L'Enfant Plaza", '4th & E St SW', 0.24779407268961226]
['SV', "L'Enfant Plaza", "10th St & L'Enfant Plaza SW", 0.20814928065410226]
['SV', 'Federal Center SW', 'Maryland & Independence Ave SW', 0.2315870445775665]
['SV', 'Federal Center SW', '4th & E St SW', 0.10316959194745154]
['SV', 'Federal Center SW', 'Washington & Independence Ave SW/HHS', 0.17923314597574783]
['SV', 'Capitol South', '3rd & D St SE', 0.15322522684657777]
['SV', 'Capitol South', '3rd St & Pennsylvania Ave SE', 0.2388866523917833]
['SV', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['SV', 'Eastern Market', 'Eastern Market / 7th & North Carolina Ave SE', 0.2106018035593906]
['SV', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['SV', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['SV', 'Potomac Ave', '14th & D St SE', 0.21886517471083275]
['SV', 'Benning Road', 'Benning Rd & East Capitol St NE / Benning Rd Metro', 0.06875196675595115]
['SV', 'Capitol Heights', '61st St & Banks Pl NE', 0.14160870072421566]
['SV', 'Court House', 'Wilson Blvd & N Uhle St', 0.03960186288180089]
['SV', 'Court House', 'N Rhodes & 16th St N', 0.24874370238994145]
['SV', 'Court House', 'N Veitch & Key Blvd', 0.16639183585323736]
['SV', 'Court House', '15th & N Scott St', 0.1727411666694406]
['SV', 'Court House', 'Court House Metro / 15th & N Uhle St ', 0.0777875707328746]
['SV', 'Clarendon', 'Clarendon Blvd & N Fillmore St', 0.24086497799497678]
['SV', 'Clarendon', 'Clarendon Metro / Wilson Blvd & N Highland St', 0.1522934803671394]
['SV', 'Clarendon', 'Fairfax Dr & Wilson Blvd', 0.05774363584589857]
['SV', 'Clarendon', 'Washington Blvd & 10th St N', 0.21895913150870006]
['SV', 'Virginia Square-GMU', 'Wilson Blvd & N Oakland St', 0.12594698087453432]
['SV', 'Virginia Square-GMU', 'Virginia Square Metro / N Monroe St & 9th St N', 0.07025997566428539]
['SV', 'Virginia Square-GMU', 'Central Library / N Quincy St & 10th St N', 0.19742106200673581]
['SV', 'Virginia Square-GMU', 'Fairfax Dr & Kenmore St', 0.19401144387935257]
['SV', 'Ballston-MU', 'Ballston Metro / N Stuart & 9th St N', 0.0709644315787311]
['SV', 'Ballston-MU', 'N Randolph St & Fairfax Dr', 0.13909018298795253]
['SV', 'Ballston-MU', 'Utah St & 11th St N ', 0.1564819022944289]
['SV', 'East Falls Church', 'East Falls Church Metro/Sycamore St & 19th St N', 0.09326212342602272]
['SV', 'Tysons Corner', 'Tysons One Pl & Chain Bridge Rd', 0.12183139163117795]
['SV', 'Tysons Corner', 'Tysons Corner Station', 0.08879534239817481]
['SV', 'Spring Hill', 'Spring Hill Metro', 0.06290622660573775]
['SV', 'Wiehle-Reston East', 'Reston Station', 0.11867529251487194]

In [59]:
print(len(bikes_close['GR']))
print(bikes_close['GR'][:5])


37
['8th & O St NW', '10th & U St NW', '3rd & Tingey St SE', '5th St & Massachusetts Ave NW', 'Anacostia Metro']

I now have a dictionary of a list of bike stations (values) within 0.25 miles of each metro line (key).
Save it with pickle for use in other notebooks


In [60]:
pickle.dump( bikes_close, open( "bikes_close.p", "wb" ) )

step 2)

how many bike stations are considered close to each line? I need to make sure the numbers are appropriate for doing statistical analysis


In [63]:
for ii in bikes_close:
    print(ii, len(bikes_close[ii]))


RD 57
YL 42
GR 37
BL 57
OR 62
SV 66

About 10% to 15% of bike stations are within 0.25 miles of each metro line

test my function


In [8]:
fn_test = close_stations(0.1)


['RD', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['RD', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['RD', 'Farragut North', '17th & K St NW', 0.06809744971683841]
['RD', 'Dupont Circle', 'Massachusetts Ave & Dupont Circle NW', 0.05904192211308173]
['RD', 'Dupont Circle', '20th & O St NW / Dupont South', 0.07475003434079858]
['RD', 'Cleveland Park', 'Connecticut Ave & Newark St NW / Cleveland Park', 0.032888310887331594]
['RD', 'Van Ness-UDC', 'Van Ness Metro / UDC', 0.06748728170569013]
['RD', 'Tenleytown-AU', 'Tenleytown / Wisconsin Ave & Albemarle St NW', 0.01870215984191263]
['RD', 'Friendship Heights', 'Friendship Hts Metro/Wisconsin Ave & Wisconsin Cir', 0.07030935754340062]
['RD', 'Bethesda', 'Montgomery & East Ln', 0.07256963207918365]
['RD', 'Bethesda', 'Bethesda Metro', 0.028784887064349826]
['RD', 'Medical Center', 'Medical Center Metro ', 0.05183570243479291]
['RD', 'Rockville', 'Rockville Metro East', 0.08791680580313965]
['RD', 'Rockville', 'Rockville Metro West', 0.02631890291879981]
['RD', 'Shady Grove', 'Shady Grove Metro West', 0.06308897851791358]
['RD', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['RD', 'Judiciary Square', '4th & D St NW / Judiciary Square', 0.058682349306896676]
['RD', 'Rhode Island Ave-Brentwood', 'Rhode Island Ave Metro', 0.007101677542623397]
['RD', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['RD', 'Takoma', 'Takoma Metro', 0.05696539632243835]
['YL', 'Pentagon City', 'Pentagon City Metro / 12th & S Hayes St', 0.05616960461752927]
['YL', 'Crystal City', 'Crystal City Metro / 18th & Bell St', 0.03952555633368628]
['YL', 'Braddock Road', 'Braddock Rd Metro', 0.06474084924822252]
['YL', 'King St-Old Town', 'King St Metro South', 0.05322495125055565]
['YL', 'King St-Old Town', 'King St Metro North / Cameron St', 0.08020183404313651]
['YL', 'Mt Vernon Sq 7th St-Convention Center', 'Convention Center / 7th & M St NW', 0.009205412414386742]
['YL', 'Shaw-Howard U', '7th & R St NW / Shaw Library', 0.013955344171547574]
['YL', 'U Street/African-Amer Civil War Memorial/Cardozo', '12th & U St NW', 0.047713514018469315]
['YL', 'Columbia Heights', '14th & Irving St NW', 0.03082093490087573]
['YL', 'Georgia Ave-Petworth', 'Georgia & New Hampshire Ave NW', 0.004859580763556235]
['YL', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['YL', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['YL', 'Archives-Navy Memorial-Penn Quarter', '8th & D St NW', 0.09782339862004422]
['GR', 'Mt Vernon Sq 7th St-Convention Center', 'Convention Center / 7th & M St NW', 0.009205412414386742]
['GR', 'Shaw-Howard U', '7th & R St NW / Shaw Library', 0.013955344171547574]
['GR', 'U Street/African-Amer Civil War Memorial/Cardozo', '12th & U St NW', 0.047713514018469315]
['GR', 'Columbia Heights', '14th & Irving St NW', 0.03082093490087573]
['GR', 'Georgia Ave-Petworth', 'Georgia & New Hampshire Ave NW', 0.004859580763556235]
['GR', 'Fort Totten', 'Fort Totten Metro', 0.05035612084528124]
['GR', 'Gallery Pl-Chinatown', '7th & F St NW/Portrait Gallery', 0.0742649832638229]
['GR', 'Archives-Navy Memorial-Penn Quarter', '8th & D St NW', 0.09782339862004422]
['GR', 'Waterfront', '4th & M St SW', 0.037004749474119414]
['GR', 'Navy Yard-Ballpark', 'M St & New Jersey Ave SE', 0.0773294486819899]
['GR', 'Anacostia', 'Anacostia Metro', 0.06832870667596788]
['GR', 'Congress Heights', 'Congress Heights Metro', 0.04687429980919824]
['BL', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['BL', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['BL', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['BL', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['BL', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['BL', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['BL', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['BL', 'Pentagon City', 'Pentagon City Metro / 12th & S Hayes St', 0.05616960461752927]
['BL', 'Crystal City', 'Crystal City Metro / 18th & Bell St', 0.03952555633368628]
['BL', 'Braddock Road', 'Braddock Rd Metro', 0.06474084924822252]
['BL', 'King St-Old Town', 'King St Metro South', 0.05322495125055565]
['BL', 'King St-Old Town', 'King St Metro North / Cameron St', 0.08020183404313651]
['BL', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['BL', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['BL', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['BL', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['BL', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['BL', 'Benning Road', 'Benning Rd & East Capitol St NE / Benning Rd Metro', 0.06875196675595115]
['OR', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['OR', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['OR', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['OR', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['OR', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['OR', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['OR', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['OR', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['OR', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['OR', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['OR', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['OR', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['OR', 'Minnesota Ave', 'Minnesota Ave Metro/DOES', 0.0901446515107497]
['OR', 'Court House', 'Wilson Blvd & N Uhle St', 0.03960186288180089]
['OR', 'Court House', 'Court House Metro / 15th & N Uhle St ', 0.0777875707328746]
['OR', 'Clarendon', 'Fairfax Dr & Wilson Blvd', 0.05774363584589857]
['OR', 'Virginia Square-GMU', 'Virginia Square Metro / N Monroe St & 9th St N', 0.07025997566428539]
['OR', 'Ballston-MU', 'Ballston Metro / N Stuart & 9th St N', 0.0709644315787311]
['OR', 'East Falls Church', 'East Falls Church Metro/Sycamore St & 19th St N', 0.09326212342602272]
['SV', 'Metro Center', 'Metro Center / 12th & G St NW', 0.01309254369908234]
['SV', 'Metro Center', '11th & F St NW', 0.06795192147122418]
['SV', 'McPherson Square', '15th & K St NW', 0.04763881826771269]
['SV', 'Farragut West', '17th & K St NW / Farragut Square', 0.09544363416981075]
['SV', 'Foggy Bottom-GWU', '22nd & I St NW / Foggy Bottom', 0.07593069408964832]
['SV', 'Foggy Bottom-GWU', 'New Hampshire Ave & 24th St NW', 0.09093780040088711]
['SV', 'Rosslyn', 'Lynn & 19th St North', 0.05568150440235235]
['SV', 'Smithsonian', 'USDA / 12th & Independence Ave SW', 0.05415065082052175]
['SV', 'Smithsonian', 'Smithsonian-National Mall / Jefferson Dr & 12th St SW', 0.054707995095332536]
['SV', 'Capitol South', '1st & D St SE', 0.044784851938701166]
['SV', 'Eastern Market', 'Eastern Market Metro / Pennsylvania Ave & 7th St SE', 0.009203298676164777]
['SV', 'Potomac Ave', 'Potomac & Pennsylvania Ave SE', 0.045383595416708646]
['SV', 'Benning Road', 'Benning Rd & East Capitol St NE / Benning Rd Metro', 0.06875196675595115]
['SV', 'Court House', 'Wilson Blvd & N Uhle St', 0.03960186288180089]
['SV', 'Court House', 'Court House Metro / 15th & N Uhle St ', 0.0777875707328746]
['SV', 'Clarendon', 'Fairfax Dr & Wilson Blvd', 0.05774363584589857]
['SV', 'Virginia Square-GMU', 'Virginia Square Metro / N Monroe St & 9th St N', 0.07025997566428539]
['SV', 'Ballston-MU', 'Ballston Metro / N Stuart & 9th St N', 0.0709644315787311]
['SV', 'East Falls Church', 'East Falls Church Metro/Sycamore St & 19th St N', 0.09326212342602272]
['SV', 'Tysons Corner', 'Tysons Corner Station', 0.08879534239817481]
['SV', 'Spring Hill', 'Spring Hill Metro', 0.06290622660573775]

In [11]:
for ii in fn_test:
    print(ii, len(fn_test[ii]))


RD 20
YL 13
GR 12
BL 18
OR 19
SV 21

In [12]:
fn_test


Out[12]:
{'BL': ['Braddock Rd Metro',
  'Metro Center / 12th & G St NW',
  'Benning Rd & East Capitol St NE / Benning Rd Metro',
  'USDA / 12th & Independence Ave SW',
  'King St Metro South',
  '17th & K St NW / Farragut Square',
  'Crystal City Metro / 18th & Bell St',
  'Lynn & 19th St North',
  '11th & F St NW',
  'King St Metro North / Cameron St',
  '22nd & I St NW / Foggy Bottom',
  '1st & D St SE',
  '15th & K St NW',
  'Smithsonian-National Mall / Jefferson Dr & 12th St SW',
  'New Hampshire Ave & 24th St NW',
  'Eastern Market Metro / Pennsylvania Ave & 7th St SE',
  'Pentagon City Metro / 12th & S Hayes St',
  'Potomac & Pennsylvania Ave SE'],
 'GR': ['Anacostia Metro',
  '12th & U St NW',
  'Congress Heights Metro',
  '7th & F St NW/Portrait Gallery',
  '7th & R St NW / Shaw Library',
  'Convention Center / 7th & M St NW',
  'Georgia & New Hampshire Ave NW',
  '4th & M St SW',
  '8th & D St NW',
  '14th & Irving St NW',
  'M St & New Jersey Ave SE',
  'Fort Totten Metro'],
 'OR': ['Ballston Metro / N Stuart & 9th St N',
  'Fairfax Dr & Wilson Blvd',
  'Virginia Square Metro / N Monroe St & 9th St N',
  'Metro Center / 12th & G St NW',
  'Court House Metro / 15th & N Uhle St ',
  'USDA / 12th & Independence Ave SW',
  '17th & K St NW / Farragut Square',
  '1st & D St SE',
  'Lynn & 19th St North',
  '11th & F St NW',
  'Potomac & Pennsylvania Ave SE',
  '22nd & I St NW / Foggy Bottom',
  'Minnesota Ave Metro/DOES',
  '15th & K St NW',
  'Smithsonian-National Mall / Jefferson Dr & 12th St SW',
  'New Hampshire Ave & 24th St NW',
  'Wilson Blvd & N Uhle St',
  'Eastern Market Metro / Pennsylvania Ave & 7th St SE',
  'East Falls Church Metro/Sycamore St & 19th St N'],
 'RD': ['Shady Grove Metro West',
  'Van Ness Metro / UDC',
  'Medical Center Metro ',
  'Bethesda Metro',
  'Metro Center / 12th & G St NW',
  'Tenleytown / Wisconsin Ave & Albemarle St NW',
  '4th & D St NW / Judiciary Square',
  'Massachusetts Ave & Dupont Circle NW',
  '7th & F St NW/Portrait Gallery',
  '20th & O St NW / Dupont South',
  'Friendship Hts Metro/Wisconsin Ave & Wisconsin Cir',
  '17th & K St NW',
  '11th & F St NW',
  'Rockville Metro West',
  'Rhode Island Ave Metro',
  'Takoma Metro',
  'Fort Totten Metro',
  'Rockville Metro East',
  'Montgomery & East Ln',
  'Connecticut Ave & Newark St NW / Cleveland Park'],
 'SV': ['Virginia Square Metro / N Monroe St & 9th St N',
  'Court House Metro / 15th & N Uhle St ',
  '11th & F St NW',
  'Wilson Blvd & N Uhle St',
  'East Falls Church Metro/Sycamore St & 19th St N',
  'Ballston Metro / N Stuart & 9th St N',
  'Smithsonian-National Mall / Jefferson Dr & 12th St SW',
  'Benning Rd & East Capitol St NE / Benning Rd Metro',
  '17th & K St NW / Farragut Square',
  'Potomac & Pennsylvania Ave SE',
  'Tysons Corner Station',
  '15th & K St NW',
  'Fairfax Dr & Wilson Blvd',
  'Metro Center / 12th & G St NW',
  'Lynn & 19th St North',
  'Eastern Market Metro / Pennsylvania Ave & 7th St SE',
  'USDA / 12th & Independence Ave SW',
  '1st & D St SE',
  'Spring Hill Metro',
  '22nd & I St NW / Foggy Bottom',
  'New Hampshire Ave & 24th St NW'],
 'YL': ['Braddock Rd Metro',
  '12th & U St NW',
  'King St Metro South',
  '7th & F St NW/Portrait Gallery',
  '7th & R St NW / Shaw Library',
  'Convention Center / 7th & M St NW',
  'Crystal City Metro / 18th & Bell St',
  'King St Metro North / Cameron St',
  'Georgia & New Hampshire Ave NW',
  '8th & D St NW',
  '14th & Irving St NW',
  'Fort Totten Metro',
  'Pentagon City Metro / 12th & S Hayes St']}

In [ ]: