Commit a0c3bd0a authored by Grace Orowo Kagho's avatar Grace Orowo Kagho
Browse files

assign weekend specific locations for work

parent d7d567b1
......@@ -9,23 +9,7 @@ def execute(context):
# For weekend
is_weekend_scenario = context.config("weekend_scenario")
if is_weekend_scenario:
df_work_education = context.stage("synthesis.population.spatial.primary.weekend.locations")[0]
df_locations = context.stage("synthesis.population.activities")[["person_id", "activity_index", "purpose"]]
# Work locations
df_work = df_locations[df_locations["purpose"] == "work"]
df_work = pd.merge(df_work,
df_work_education[["person_id", "destination_id", "geometry"]],
on="person_id")
df_work = df_work[["person_id", "activity_index", "destination_id", "geometry"]]
# Education locations
df_education = df_locations[df_locations["purpose"] == "education"]
df_education = pd.merge(df_education,
df_work_education[["person_id", "destination_id", "geometry"]],
on="person_id")
df_education = df_education[["person_id", "activity_index", "destination_id", "geometry"]]
df_work, df_education = context.stage("synthesis.population.spatial.primary.weekend.locations")
else:
df_work = context.stage("synthesis.population.spatial.primary.work.locations")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment