def extract_gang_related_incidents(df): 
    df_gangs = df[df.gang==1]
    df_gangs = df_gangs[df_gangs.location <= 77]

    print "Found %d gang-related incidents" % len(df_gangs)

    return df_gangs
Get the gang-related incidents for use in the Hawkes process
dataset/ETHPy150Open slinderman/pyhawkes/data/chicago/parse_data.py/extract_gang_related_incidents