#Libraries----------------------------------------------------------------------

"""
Dependencies and modules necessary for analytical functions to work
"""


#Data processing

import seaborn as sns
import matplotlib.pyplot as plt


##Exploratory plots----------------------------------------------------------------------


def scatter_plot(data,var1=None,var2=None):

    """
    Function takes a data file provided by the data_prep function and plots analytical scatter plots for selected variables.

    Input values: data frame generated by the data_prep function, as well as variables to plot, e.g. "MW" and "TSPA".

    Output values: scatter plot.
    """
    #Error handling
    if var1 is None:
        print("Please enter a var1 variable for plotting")
        return data.head()
    if var2 is None:
        print("Please enter a var2 variable for plotting")
        return data.head()

    # Error handling
    if var1 not in data.columns:
        print("%s not in the data frame" % var1)
        return data.head()
    if var2 not in data.columns:
        print("%s not in the data frame" % var2)
        return data.head()

    sns.jointplot(data[var1], data[var2])
    plt.show()

    return
