def combined_data(): newData = getRangeDowData(1957,1960) jsonNewData5 = str(JSONEncoder().encode(newData)) return render_template('combined_data.html', data = jsonNewData5)
def swine_flu(): newData = getRangeDowData(2009,2015) jsonNewData4 = str(JSONEncoder().encode(newData)) return render_template('swine_flu.html', data = jsonNewData4)
def spanish_flu(): spanish_flu_data = getRangeDowData(1917,1922) json_spanish_flu_data = str(JSONEncoder().encode(spanish_flu_data)) return render_template('spanish_flu.html', data = json_spanish_flu_data)
def hong_kong_flu(): hong_kong_data = getRangeDowData(1968,1973) hong_kong_data1 = getMonthlyDeathsData() json_hong_kong_data1 = str(JSONEncoder().encode(hong_kong_data1)) json_hong_kong_data = str(JSONEncoder().encode(hong_kong_data)) return render_template('hong_kong_flu.html', data1 = json_hong_kong_data, data2 = json_hong_kong_data1)
def index(): # call to database to get latest data yearData = getRangeDowData(1918,1920) data = getLatest() return render_template('index.html', data = data )