예제 #1
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 = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)
예제 #2
0
파일: bixi.py 프로젝트: LAouini19/Website
def stations(city):
    designations = {
        'Toronto': 'toronto',
        'Montréal': 'montreal',
        'Ottawa': 'capitale'
    }
    designation = designations[city]
    url = 'https://{}.bixi.com/data/bikeStations.xml'.format(designation)
    data = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)
예제 #3
0
파일: lacub.py 프로젝트: LAouini19/Website
def stations(city):
    # The city parameter is necessary so that everything works
    key = keys["lacub"]
    url = (
        "http://data.lacub.fr/wfs?key={}"
        "&SERVICE=WFS&VERSION=1.1.0&"
        "REQUEST=GetFeature"
        "&TYPENAME=CI_VCUB_P&SRSNAME=EPSG:4326"
    )
    data = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)
예제 #4
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = "http://minaport.ubweb.jp/stations.php"
    data = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)
예제 #5
0
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'https://secure.niceridemn.org/data2/bikeStations.xml'
    data = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)
예제 #6
0
파일: hubway.py 프로젝트: LAouini19/Website
def stations(city):
    # The city parameter is necessary so that everything works
    url = 'http://www.thehubway.com/data/stations/bikeStations.xml'
    data = tb.query_API(url)
    stations = tb.load_xml(data)
    return normalize(stations)