-
Notifications
You must be signed in to change notification settings - Fork 23
Notes On Working With Raw Inmate Data
nwinklareth edited this page Jun 14, 2014
·
3 revisions
For the most part working with the raw inmate data is pretty straightforward, the description of the structure found at Raw Inmate Data Format provides sufficient guidance on how to process or work with the data. The problem comes with derivative information, in particular finding discharged inmates or inmates not found for a given day.
To find the discharged inmates between two days is given by the following equation
- First Day Inmates(FDI) = set(select column[0] from first_day_raw_data)
- Second Day Inmates(SDI) = set(select column[0] from second_day_raw_data)
- Booked Inmates for Second Day(BISD) = set(select column[0] from second_day_raw_data where column[1] == second_day.date)
- Discharged Inmates = FDI - (SDI - BSID)
Note that the Discharged Inmates is a set of booking ids.