Exemplo n.º 1
0
def GetData(sites):
    """
        This function loops gathers all the analysis modules needed and imports
        them.
        Function IN:
            parameters (OPTIONAL, LIST):

        Fucntion OUT:
            argout:
                Description of what the fuction returns if any
    """
    # Needs fucntion to specify the filenames and how the data should
    # be opened. For now lets just keep it simple with out Heathfield data

    # If there are no paramters given (and there should be)
    # then use some sample data

    # Get dataframe from LoadData.FromCSV. Leaving the input blank will get
    # the Heathfield data.

    if 'Heathfield' in sites:
        df = LoadData.FromCSV()
        df = TidyData.DateClean_Heathfeild(df)

    elif 'Edinburgh' in sites:
        df = LoadData.Edinburgh_Data()
        df.set_index('Date and Time', inplace=True)

    # Use the DateClean function to make the date into a datetime format

    # Drop last line as this is usually bogus data
    return df[:-1]
Exemplo n.º 2
0
def get_annaualcycle_ytitle(data_info, format):
    if format == 'Variable Name':
        chemical_formula = False
    else:
        chemical_formula = True
    if not data_info:
        return ''
    variable_options = data_info.split(',')[4:]
    ytitle = TidyData.Axis_Title(variable_options, chemical_formula)
    return ytitle
Exemplo n.º 3
0
def get_correlation_clabel(data_info, format):
    if format == 'Variable Name':
        chemical_formula = False
    else:
        chemical_formula = True

    if not data_info:
        return ''

    ytitle = TidyData.Axis_Title([data_info], chemical_formula)
    return ytitle
Exemplo n.º 4
0
def get_dirunal_ytitle(data_info, format):
    if format == 'Variable Name':
        chemical_formula = False
    else:
        chemical_formula = True
    if not data_info:
        return ''
    variable_options = data_info.split(',')[4:]
    ytitle = TidyData.Axis_Title(variable_options, chemical_formula)
    if ytitle.split(' ')[0][:2] == 'PM':
        ytitle = ytitle.split(' ')[0]
    return ytitle
Exemplo n.º 5
0
def get_correlation_ytitle(data_info, format):
    if format == 'Variable Name':
        chemical_formula = False
    else:
        chemical_formula = True

    if not data_info:
        return ''
    if len(data_info.split(',')[4:]) > 1:
        variable_options = data_info.split(',')[4:][1]
    else:
        return ''

    ytitle = TidyData.Axis_Title([variable_options], chemical_formula)
    return ytitle
Exemplo n.º 6
0
def return_user_choice_info(data_info):
    if not data_info:
        return ''
    else:
        return html.H4(TidyData.site_info_message(data_info))