Skip to content

Commit

Permalink
integrated run school enrollment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ennazus committed Jul 23, 2018
1 parent 925cc67 commit 88a075e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/accessibility/accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ def main():
df_enrollment['year'] = df_enrollment['year'].astype('str')
df_enrollment = df_enrollment[df_enrollment['year'] == str(model_year)]

df = pd.merge(parcels,df_enrollment,how='left',left_on='PARCELID',right_on='parcelid')
parcels = pd.merge(parcels,df_enrollment,how='left',left_on='PARCELID',right_on='parcelid')

df['STUGRD_P'] = df['stugrd_p']
df['STUHGH_P'] = df['stuhgh_p']
df['STUUNI_P'] = df['stuuni_p']
parcels['STUGRD_P'] = parcels['stugrd_p']
parcels['STUHGH_P'] = parcels['stuhgh_p']
parcels['STUUNI_P'] = parcels['stuuni_p']

df = df.fillna(0)
parcels = parcels.fillna(0)

df.drop(['parcelid','stugrd_p','stuhgh_p','stuuni_p','year'], axis=1, inplace=True)
parcels.drop(['parcelid','stugrd_p','stuhgh_p','stuuni_p','year'], axis=1, inplace=True)

# nodes must be indexed by node_id column, which is the first column
nodes = pd.DataFrame.from_csv(nodes_file_name)
Expand Down

0 comments on commit 88a075e

Please sign in to comment.