def read_multiseq_data(): with open('data/multiseq.txt', 'r') as file: l = file.readlines() # print(l[0].split(',')) hid = l[0].split(',') obs = l[1].split(',') hid = clean_data(hid) obs = clean_data(obs) return obs, hid
def read_data_lower_middle_SIR(): with open('data/sir_lower_income.txt', 'r') as file: l = file.readlines() # print(l[0].split(',')) l = l[0].split(',') l = clean_data(l) with open('data/sir_middle_income.txt', 'r') as file: m = file.readlines() # print(m[0].split(',')) m = m[0].split(',') m = clean_data(m) return l, m
def read_data_lower_middle_SIR(): with open('data/sir_data.txt', 'r') as file: l = file.readlines() # print(l[0].split(',')) l = l[0].split(',') l = clean_data(l) return l
def read_data_lower_middle_SIR(): with open('data/sir_data.txt', 'r') as file: l = file.readlines() # print(l[0].split(',')) l = l[0].split(',') l = clean_data(l) data = [] for i in range(len(l) - 1): data.append([l[i], l[i + 1]]) with open('data/sir_col_data.txt', 'w') as file: data_line = [] for line in data: data_line = [] a = 'flu_' + line[0] b = 'flu_' + line[1] # c = 'flu_' + line[2] file.write(f'{a},{b} \n') return l