def init_filter(df, report=False):
    """Keep relevant subset of topics"""
    keep_topics = ['economy', 'europe', 'health', 'crime', 'education', 'immigration', 'law']
    groups = df.groupby('topic')
    sub_df = df[df['topic'].isin(keep_topics)]
    sub_groups = sub_df.groupby('topic')
    if report:
        print("Found {} topics in data:".format(len(groups)))
        for g in groups:
            print("  {:20s} {:3d}".format(g[0], len(g[1])))
        print("Keeping {} topics".format(len(sub_groups)))
    return sub_df