Data were munged here.


In [1]:
import pandas as pd
import numpy as np
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
df = pd.read_csv('../../data/processed/complaints-3-29-scrape.csv')


How many cases of property loss/theft that are offline were there at Emeritus Springfield Woodside b/ween 5/2013 and 8/2013?

(Facility ID 70M226)


In [2]:
df[['outcome','incident_date']][(df['facility_id']=='70M226') &
   (df['incident_date']<'2013-08-01') & 
   (df['incident_date']>'2013-05-01') &
   (df['public']=='offline') &
   (df['outcome'].str.contains('Property'))].sort_values('incident_date').count()


Out[2]:
outcome          10
incident_date    10
dtype: int64

In [3]:
df[['abuse_number','outcome_notes']][(df['facility_id']=='70M226') &
   (df['incident_date']<'2013-08-01') & 
   (df['incident_date']>'2013-05-01') &
   (df['public']=='offline') &
   (df['outcome'].str.contains('Property'))]


Out[3]:
abuse_number outcome_notes
12325 ES133617 Resident #1 reported $40 cash and jewelry take...
12327 ES133814 Resident #1 reported $25 cash missing from the...
12328 ES133720 Resident #1 reported $20 cash missing. Residen...
12329 ES133683 Resident #1 reported $50 missing from a wallet...
12330 ES133958 Resident #1 reported missing a jar full of cha...
12331 ES133678 Resident #1 reported $125 cash missing from a ...
12332 ES133237 Resident #1 reported the loss of $300. There h...
12334 ES133441 Resident #1 reported loss of $20 from her/his ...
12335 ES133150 Resident #1 and Resident #2 reported loss of m...
12336 ES133673 Resident #1 reported money missing from her/hi...

The case below lists two thefts. That's why our total in the paragraph is 11.


In [4]:
df['outcome_notes'][df['abuse_number']=='ES133150']


Out[4]:
12335    Resident #1 and Resident #2 reported loss of m...
Name: outcome_notes, dtype: object

What cases at Briarwood were there that same year that are online and comparable to the offline ones at Woodside?


In [5]:
df[['outcome_notes','abuse_number']][(df['facility_id']=='70A299') & 
   (df['outcome']=='Loss of Resident Property') & 
   (df['public']=='online') &
   (df['year']==2013)]


Out[5]:
outcome_notes abuse_number
9964 A total of $370 worth of PIF (Personal Inciden... ES134746
9999 Jewelry, estimated at $200-$300 was reported t... ES133333
10002 Resident #1 reported two fishing poles and two... ES133151
10003 Resident #1 reported a bag missing from her/hi... ES133128
10005 Resident #1 reported the loss of 28 narcotic p... ES133033
10006 Resident #1 reported a brand new laptop worth ... ES132740

Upon review, use my own judgement to determine that cases ES134746 and ES133151 have a similar severity to the ten cases at Woodside.


In [6]:
df[['abuse_number','outcome_notes']][df['abuse_number'].isin(['ES133151','ES134746'])]


Out[6]:
abuse_number outcome_notes
9964 ES134746 A total of $370 worth of PIF (Personal Inciden...
10002 ES133151 Resident #1 reported two fishing poles and two...

DONE