Generalize stats_data for filtering

@nickpell