def varaible_list(site): site_vars = LoadData.get_site_variables_db(site) var_options = [{ 'label': i.replace('<sub>', '').replace('</sub>', ''), 'value': i } for i in site_vars] return var_options, False
def get_colourbychoices(data, value): if not data: return '' data = data.split(',') df = load_station_data(data[0], data[1], [int(data[2]), int(data[3])], data[4:]) if not isinstance(df, pd.DataFrame): return '' variable_list = LoadData.get_site_variables_db(data[1]) var_options = [{'label': i, 'value': i} for i in variable_list] return var_options