# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/BPD_P1.ipynb (unless otherwise specified).

__all__ = []

# Cell
dft['crime'+year] = (
    dft['Desc__AGG. ASSAULT'] +
    dft['Desc__AUTO THEFT'] +
    dft['Desc__BURGLARY'] +
    dft['Desc__HOMICIDE'] +
    dft['Desc__LARCENY'] +
    dft['Desc__LARCENY FROM AUTO'] +
    dft['Desc__RAPE'] +
    dft['Desc__ROBBERY - CARJACKING'] +
    dft['Desc__ROBBERY - COMMERCIAL'] +
    dft['Desc__ROBBERY - RESIDENCE'] +
    dft['Desc__ROBBERY - STREET']
) * 1000 / csa['tpop10']

# Just checking I got all but the three. 14 desc cols - 11 being used = 3 not used. Alls good.

# Cell
dft['viol'+year] = (dft['Desc__ROBBERY - CARJACKING'] +
                   dft['Desc__ROBBERY - COMMERCIAL'] +
                   dft['Desc__ROBBERY - RESIDENCE'] +
                   dft['Desc__ROBBERY - STREET'] +
                   dft['Desc__AGG. ASSAULT'] +
                   dft['Desc__RAPE'] +
                   dft['Desc__HOMICIDE'] ) * 1000 / csa['tpop10']

# Cell
dft['prop'+year] = (dft['Desc__LARCENY'] +
                   dft['Desc__LARCENY FROM AUTO'] +
                   dft['Desc__BURGLARY'] +
                   dft['Desc__AUTO THEFT'] ) * 1000 / csa['tpop10']

# Cell
dft['gunhom'+year] = (dft['gunhom'] ) * 1000 / csa['tpop10']