Closed timathomas closed 3 years ago
Issues:
4014 & 4018 got labeled as OD because it has lostli_18
, the gentrification measures do not account for this category.
Ongoing displacement code does not account for whether it gentrified.
df['OD'] = 0
df['OD'] = np.where((df['pop00flag']==1)&
((df['low_pdmt_medhhinc_18']==1)|(df['mix_low_medhhinc_18']==1))&
(df['lostli_18']==1), 1, 0)
df['OD_loss'] = np.where((df['pop00flag'].isna())|
(df['low_pdmt_medhhinc_18'].isna())|
(df['mix_low_medhhinc_18'].isna())|
(df['lostli_18'].isna()), np.nan, df['OD'])
df['OD'] = np.where((df['OD'] == 1)&(df['ARG']==1), 0, df['OD']) ### This is to account for double classification
df['OD'] = np.where((df['OD'] == 1)&(df['EOG']==1), 0, df['OD']) ### This is to account for double classification
If defined as gentrified as 00_18, go to EOG and out of OD.
When we assign tracts to either gentrification or displacement categories, I thought we were prioritizing gentrification. So why would a tract that gentrified 2000-18 be ongoing displacement? This happens in Oakland with 4014 and 4018. Maybe others too.