def chart_filter(df, year = None, month = None, neighbourhood = None, crime = None):
    """
    Filters the given database in order to wrange the database into the proper dataframe 
    required the graphs to display relevant information. Default value of None will allow 
    the maps to display every single data point. Given specific information will filter the 
    database 
    
    Parameters
    ----------
    df : Pandas Data Frame
        Dataframe of crime data
    year : int or list 
        year or years of crime committed to be displayed in the graphs
    month : int or list 
        month or months of crime commited to be displayed in the graphs 
    neighbourhood : string or list 
        neighbourhood or neighbourhoods of where crime occurs 
    crime : string or list 
        crime or crimes commited to be displayed

    Returns
    -------
    Pandas Data Frame
        A filtered data frame or relevant information 
    """
    filtered_df = df
    if year != None:
        if type(year) == list:
            year_list = list(range(year[0], year[1]+1))
            filtered_df = filtered_df.query('YEAR == %s' % year_list)
        else:
            filtered_df = filtered_df.query('YEAR == %s' % year)
    if month != None:
        if type(month) == list:
            month_list = list(range(month[0], month[1]+1))
            filtered_df = filtered_df.query('MONTH == %s' % month_list)
        else:
            filtered_df = filtered_df.query('MONTH == %s' % month)
    if neighbourhood != None:
        if neighbourhood == []:
            neighbourhood = None
        elif type(neighbourhood) == list:
            filtered_df = filtered_df.query('DISTRICT == %s' % neighbourhood)
        else:
            filtered_df = filtered_df.query('DISTRICT == "%s"' % neighbourhood)
    if crime != None:
        if crime == []:
            crime = None
        elif type(crime) == list:
            filtered_df = filtered_df.query('OFFENSE_CODE_GROUP == %s' % crime)
        else:
            filtered_df = filtered_df.query('OFFENSE_CODE_GROUP == "%s"' % crime)       
    return filtered_df