Commit 2c84f241 authored by 高雅喆's avatar 高雅喆

add file to store history rate data fot plot

parent dbfe7ffc
......@@ -228,9 +228,52 @@ def result2file():
f.write("\n\n")
def rate2file():
output_path = DIRECTORY_PATH + "rate.csv"
with open(output_path, 'a+') as f:
line = get_yesterday_date()+','+\
str(answer_imp_rate_all[3])+','+str(answer_imp_rate_ios[3])+','+str(answer_imp_rate_android[3])+','+\
str(diary_imp_rate_all[3])+','+str(diary_imp_rate_ios[3])+','+str(diary_imp_rate_android[3])+','+\
str(activate_uid_ctr_all[3])+','+str(activate_uid_ctr_ios[3])+','+str(activate_uid_ctr_android[3])+','+\
str(activate_uid_imp_all[3])+','+str(activate_uid_imp_beijing[3])+','+\
str(click_answer_all[3])+','+str(click_answer_ios[3])+','+str(click_answer_android[3])+','+\
str(click_diary_all[3])+','+str(click_diary_ios[3])+','+str(click_diary_android[3])+','+\
str(click_everything_all[3])+','+str(click_everything_ios[3])+','+str(click_everything_android[3])+','+'\n'
f.write(line)
if __name__ == '__main__':
result2file()
rate2file()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment