def sliding_window_avg(data, window_size):
    Computes the sliding window average of a given list of data.

        data (list): A list of numeric values.
        window_size (int): The size of the sliding window.

        A list of the sliding window averages.
    # Check if window size is valid
    if window_size < 1:
        raise ValueError("Window size must be greater than or equal to 1")

    # Initialize variables
    window_sum = sum(data[:window_size])
    window_avg = window_sum / window_size
    window_avgs = [window_avg]

    # Compute sliding window averages
    for i in range(window_size, len(data)):
        window_sum += data[i] - data[i-window_size]
        window_avg = window_sum / window_size

    return window_avgs