示例#1
0
def stations(city):
    designations = {
        'Toronto': 'toronto',
        'Montréal': 'montreal',
        'Ottawa': 'capitale'
    }
    designation = designations[city]
    url = 'https://{}.bixi.com/data/bikeStations.xml'.format(designation)
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#2
0
def stations(city):
    designations = {
        'Toronto': 'toronto',
        'Montréal': 'montreal',
        'Ottawa': 'capitale'
    }
    designation = designations[city]
    url = 'https://{}.bixi.com/data/bikeStations.xml'.format(designation)
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#3
0
def stations(city):
    # The city parameter is necessary so that everything works
    key = tools.read_json('config/keys.json')['lacub']
    url = 'http://data.lacub.fr/wfs?key={}' \
          '&SERVICE=WFS&VERSION=1.1.0&' \
          'REQUEST=GetFeature' \
          '&TYPENAME=CI_VCUB_P&SRSNAME=EPSG:4326'
    print(url)
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    print(stations)
    return normalize(stations)
示例#4
0
def stations(city):
    # The city parameter is necessary so that everything works
    key = tools.read_json('config/keys.json')['lacub']
    url = 'http://data.lacub.fr/wfs?key={}' \
          '&SERVICE=WFS&VERSION=1.1.0&' \
          'REQUEST=GetFeature' \
          '&TYPENAME=CI_VCUB_P&SRSNAME=EPSG:4326'
    print(url)
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    print(stations)
    return normalize(stations)
示例#5
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://www.capitalbikeshare.com/data/stations/bikeStations.xml'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#6
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://www.capitalbikeshare.com/data/stations/bikeStations.xml'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#7
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://secure.niceridemn.org/data2/bikeStations.xml'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#8
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'http://minaport.ubweb.jp/stations.php'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#9
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'http://minaport.ubweb.jp/stations.php'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#10
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://secure.niceridemn.org/data2/bikeStations.xml'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)
示例#11
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml'
    data = tools.query_API(url)
    stations = tools.load_xml(data)
    return normalize(stations)