Exemple #1
0
def temperature():
    data = get_stream.get_stream_data()
    #print(data)
    return template("""
    <table>
    %for item in data:
        <tr>
        <td>
            {{item['kentid']}}
        </td>
        <td>
            {{item['collection_time']}}
        </td>
        <td>
            {{item['lat']}}
        </td>
        <td>
            {{item['lon']}}
        </td>
        <td>
            {{item['temperature']}}
        </td>
        <td>
            {{item['humidity']}}
        </td>
        </tr>
    %end
    </table>
    """,
                    data=data)
def temperature():
    data = get_stream.get_stream_data()
    print(data)
    return template("""
    <table>
    %for item in data:
        <tr>
        <td>
            {{item['lat']}}
        </td>
        <td>
            {{item['lon']}}
        </td>
        <td>
            {{item['temperature']}}
        </td>
        <td>
            {{item['windspeed']}}
        </td>
        <td>
            {{item['humidity']}}
        </td>
        <td>
            {{item['clouds']}}
        </td>
        </tr>
    %end
    </table>
    """,
                    data=data)
Exemple #3
0
def index():
    data = get_stream.get_stream_data()
    #print(data)
    return template("""
        <b>
        An example weather server.
        </b>
        %for item in data:
            <b>
            {{item}}
            </b>
    """,
                    data=data)
Exemple #4
0
def calendar_chart():
    data = get_stream.get_stream_data()
    return template("calendar_chart", data=data)
Exemple #5
0
def example_map1():
    data = get_stream.get_stream_data()
    return template("example_map1", data=data)
Exemple #6
0
def graph1():
    data = get_stream.get_stream_data()
    return template("project_graph", data=data)
Exemple #7
0
def graph():
    data = get_stream.get_stream_data()
    return template("scatter_graph", data=data)
Exemple #8
0
def example_map():
    data = get_stream.get_stream_data()
    #print (data)
    return template("ice_arena_map.tpl", data=data)