Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configs_dev/annotate_persons.csv
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ school_segment university,school_segment,"np.where(is_university, SCHOOL_SEGMENT
#,,
is_worker,is_worker,"persons.pemploy.isin([PEMPLOY_FULL, PEMPLOY_PART])"
,is_out_of_home_worker,is_worker
#,is_telecommuter,"np.where(persons.telework_time >= 3, True, False)"
#,,
home_zone_id,home_zone_id,"reindex(households.home_zone_id, persons.household_id)"
,_mean_work,distributed_time_factor_work_mean
Expand Down
464 changes: 248 additions & 216 deletions configs_dev/cdap_coefficients.csv

Large diffs are not rendered by default.

254 changes: 182 additions & 72 deletions configs_dev/cdap_indiv_and_hhsize1.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions configs_dev/disaggregate_accessibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ CREATE_TABLES:
grade: 0 # Not attending
timeFactorWork: 1 # mean
timeFactorNonWork: 1 # mean
telework_time: 0 # not teleworking
mapped_fields:
pnum:
age:
Expand Down
668 changes: 452 additions & 216 deletions configs_dev/non_mandatory_tour_frequency.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions configs_dev/non_mandatory_tour_frequency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ preprocessor:
DF: persons
TABLES:
- tours
- households
# - accessibility
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ Description,Target,Expression
#,,
,max_window,person_max_window(persons)
,log_max_window,np.log1p(max_window)
,medium_low_income,(persons.income_in_thousands > 20) & (persons.income_in_thousands <= 50)
,medium_high_income,(persons.income_in_thousands > 50) & (persons.income_in_thousands <= 100)
,high_income,(persons.income_in_thousands > 100)
,total_hours_available_7am_to_10pm,"person_available_periods(persons, start_bin=7, end_bin=22, continuous=False) / 2"
,max_consecutive_hours_available_7am_to_10pm,"person_available_periods(persons, start_bin=7, end_bin=22, continuous=True) / 2"
,log_total_hours_available_7am_to_10pm,"np.log1p(total_hours_available_7am_to_10pm)"
,log_max_consecutive_hours_available_7am_to_10pm,"np.log1p(max_consecutive_hours_available_7am_to_10pm)"
,low_income,(persons.income_in_thousands <= 25)
,medium_low_income,(persons.income_in_thousands > 25) & (persons.income_in_thousands <= 50)
,medium_high_income,(persons.income_in_thousands > 100) & (persons.income_in_thousands <= 150)
,high_income,(persons.income_in_thousands > 150)
,no_cars,(persons.auto_ownership == 0)
,car_sufficiency,persons.auto_ownership-persons.num_workers
#,,
Expand Down
408 changes: 197 additions & 211 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_DRIVING.csv

Large diffs are not rendered by default.

545 changes: 331 additions & 214 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_FULL.csv

Large diffs are not rendered by default.

437 changes: 224 additions & 213 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_NONWORK.csv

Large diffs are not rendered by default.

533 changes: 318 additions & 215 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_PART.csv

Large diffs are not rendered by default.

409 changes: 194 additions & 215 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_PRESCHOOL.csv

Large diffs are not rendered by default.

431 changes: 220 additions & 211 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_RETIRED.csv

Large diffs are not rendered by default.

408 changes: 195 additions & 213 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_SCHOOL.csv

Large diffs are not rendered by default.

532 changes: 318 additions & 214 deletions configs_dev/non_mandatory_tour_frequency_coeffs_PTYPE_UNIVERSITY.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions configs_dev/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ expression_profile: True

# number of households to simulate
households_sample_size: 0


disable_zarr: True
#chunk_size:
#chunk_size: 123_000_000_000
chunk_training_mode: explicit
Expand Down Expand Up @@ -131,6 +130,7 @@ models:
- workplace_location
- free_parking
- telecommute_frequency
- telecommute_status
- cdap_simulate
- mandatory_tour_frequency
- mandatory_tour_scheduling
Expand Down
63 changes: 32 additions & 31 deletions configs_dev/telecommute_frequency.csv
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
Label,Description,Expression,No_Telecommute,1_day_week,2_3_days_week,4_days_week
util_employment_density_at_work,log employment density work,@df.log_employment_density_at_work,0,coef_Emp_Density_At_Work_1day,coef_Emp_Density_At_Work_23day,coef_Emp_Density_At_Work_4day
util_asc_KingCounty,King County constant,@df.county_id==1,0,coef_ASC_KingCounty_1day,coef_ASC_KingCounty_23day,coef_ASC_KingCounty_4day
util_asc,asc constant,1,0,coef_ASC_1_day,coef_ASC_2_3_day,coef_ASC_4_day
util_HasChildren0to5,Has children 0 to 5 years old,@df.has_young_children,0,coef_HasChildren0to5_1day,coef_HasChildren0to5_23day,coef_HasChildren0to5_4day
util_HasChildren6to12,Has children 6 to 12 years old,@df.has_children_6_to_12,0,coef_HasChildren6to12_1day,coef_HasChildren6to12_23day,coef_HasChildren6to12_4day
util_OneAdultInHH,One adult in hh,@df.num_adults==1,0,coef_OneAdultInHH_1day,coef_OneAdultInHH_23day,coef_OneAdultInHH_4day
util_2plusAdultsInHH,2 or more adults in hh,@df.num_adults==2,0,coef_2plusAdultsInHH_1day,coef_2plusAdultsInHH_23day,coef_2plusAdultsInHH_4day
util_Female,female,@df.sex==2,0,coef_Female_1day,coef_Female_23day,coef_Female_4day
util_PartTimeWorker,Part-time worker,@df.pemploy==PEMPLOY_PART,0,coef_PartTimeWorker_1day,coef_PartTimeWorker_23day,coef_PartTimeWorker_4day
util_CollegeStudent,College student,@df.ptype==PTYPE_UNIVERSITY,0,coef_CollegeStudent_1day,coef_CollegeStudent_23day,coef_CollegeStudent_4day
util_PaysToPark,Pays to park,@df.pay_to_park_at_work,0,coef_PaysToPark_1day,coef_PaysToPark_23day,coef_PaysToPark_4day
#util_PaysToPark,Pays to park,@~df.free_parking_at_work,0,coef_PaysToPark_1day,coef_PaysToPark_23day,coef_PaysToPark_4day
util_missing_income,Missing Income,@df.income==-1,0,coef_MissingIncome_1day,coef_MissingIncome_23day,coef_MissingIncome_4day
util_Income60to100k,Income 60-100k,@(df.income >= 60000) & (df.income < 100000),0,coef_Income60to100k_1day,coef_Income60to100k_23day,coef_Income60to100k_4day
util_Income100to150k,Income 100-150k,@(df.income >= 100000) & (df.income < 150000),0,coef_Income100to150k_1day,coef_Income100to150k_23day,coef_Income100to150k_4day
util_Income150to200k,Income 150-200k,@(df.income >= 150000) & (df.income < 200000),0,coef_Income150to200k_1day,coef_Income150to200k_23day,coef_Income150to200k_4day
util_Income200kplus,Income 200k+,@df.income >=200000,0,coef_Income200kplus_1day,coef_Income200kplus_23day,coef_Income200kplus_4day
util_0Autos,0 Autos,@df.auto_ownership==0,0,coef_0Autos_1day,coef_0Autos_23day,coef_0Autos_4day
util_1Auto,1 Auto,@df.auto_ownership==1,0,coef_1Auto_1day,coef_1Auto_23day,coef_1Auto_4day
util_3plusAutos,3+ Autos,@df.auto_ownership>=3,0,coef_3plusAutos_1day,coef_3plusAutos_23day,coef_3plusAutos_4day
util_DistanceToWork,Distance to work,@np.log1p(df.distance_to_work),0,coef_DistanceToWork_1day,coef_DistanceToWork_23day,coef_DistanceToWork_4day
util_workplace_AGREMPN_share,workplace AGR employment share,@df.workplace_AGREMPN_share,0,coef_WorkAGREMPNshare_1day,coef_WorkAGREMPNshare_23day,coef_WorkAGREMPNshare_4day
util_workplace_FOOEMPN_share,workplace FOO employment share,@df.workplace_FOOEMPN_share,0,coef_WorkFOOEMPNshare_1day,coef_WorkFOOEMPNshare_23day,coef_WorkFOOEMPNshare_4day
util_workplace_FPSEMPN_share,workplace FPS employment share,@df.workplace_FPSEMPN_share,0,coef_WorkFPSEMPNshare_1day,coef_WorkFPSEMPNshare_23day,coef_WorkFPSEMPNshare_4day
util_workplace_HEREMPN_share,workplace HER employment share,@df.workplace_HEREMPN_share,0,coef_WorkHEREMPNshare_1day,coef_WorkHEREMPNshare_23day,coef_WorkHEREMPNshare_4day
util_workplace_MWTEMPN_share,workplace MWT employment share,@df.workplace_MWTEMPN_share,0,coef_WorkMWTEMPNshare_1day,coef_WorkMWTEMPNshare_23day,coef_WorkMWTEMPNshare_4day
util_workplace_OTHEMPN_share,workplace OTH employment share,@df.workplace_OTHEMPN_share,0,coef_WorkOTHEMPNshare_1day,coef_WorkOTHEMPNshare_23day,coef_WorkOTHEMPNshare_4day
util_workplace_RETEMPN_share,workplace RET employment share,@df.workplace_RETEMPN_share,0,coef_WorkRETEMPNshare_1day,coef_WorkRETEMPNshare_23day,coef_WorkRETEMPNshare_4day
util_Shopping_Maint_Accessibility,shopping accessiblity,@(df.shopping_accessibility + df.othdiscr_accessibility) / 2,0,coef_ShopMaintAcc_1day,coef_ShopMaint_23day,coef_ShopMaintAcc_4day
#util_temp,temp_calibration,1,0,-4,-4.25,-6
Label,Description,Expression,No_Telecommute,1_day_week,2_days_week,3_days_week,4_days_week
util_employment_density_at_work,log employment density work,@df.log_employment_density_at_work,0,coef_Emp_Density_At_Work_1day,coef_Emp_Density_At_Work_23day,coef_Emp_Density_At_Work_23day,coef_Emp_Density_At_Work_4day
util_asc_KingCounty,King County constant,@df.county_id==1,0,coef_ASC_KingCounty_1day,coef_ASC_KingCounty_23day,coef_ASC_KingCounty_23day,coef_ASC_KingCounty_4day
util_asc,asc constant,1,0,coef_ASC_1_day,coef_ASC_2_3_day,coef_ASC_2_3_day,coef_ASC_4_day
util_HasChildren0to5,Has children 0 to 5 years old,@df.has_young_children,0,coef_HasChildren0to5_1day,coef_HasChildren0to5_23day,coef_HasChildren0to5_23day,coef_HasChildren0to5_4day
util_HasChildren6to12,Has children 6 to 12 years old,@df.has_children_6_to_12,0,coef_HasChildren6to12_1day,coef_HasChildren6to12_23day,coef_HasChildren6to12_23day,coef_HasChildren6to12_4day
util_OneAdultInHH,One adult in hh,@df.num_adults==1,0,coef_OneAdultInHH_1day,coef_OneAdultInHH_23day,coef_OneAdultInHH_23day,coef_OneAdultInHH_4day
util_2plusAdultsInHH,2 or more adults in hh,@df.num_adults==2,0,coef_2plusAdultsInHH_1day,coef_2plusAdultsInHH_23day,coef_2plusAdultsInHH_23day,coef_2plusAdultsInHH_4day
util_Female,female,@df.sex==2,0,coef_Female_1day,coef_Female_23day,coef_Female_23day,coef_Female_4day
util_PartTimeWorker,Part-time worker,@df.pemploy==PEMPLOY_PART,0,coef_PartTimeWorker_1day,coef_PartTimeWorker_23day,coef_PartTimeWorker_23day,coef_PartTimeWorker_4day
util_CollegeStudent,College student,@df.ptype==PTYPE_UNIVERSITY,0,coef_CollegeStudent_1day,coef_CollegeStudent_23day,coef_CollegeStudent_23day,coef_CollegeStudent_4day
util_PaysToPark,Pays to park,@df.pay_to_park_at_work,0,coef_PaysToPark_1day,coef_PaysToPark_23day,coef_PaysToPark_23day,coef_PaysToPark_4day
#util_PaysToPark,Pays to park,@~df.free_parking_at_work,0,coef_PaysToPark_1day,coef_PaysToPark_23day,coef_PaysToPark_23day,coef_PaysToPark_4day
util_missing_income,Missing Income,@df.income==-1,0,coef_MissingIncome_1day,coef_MissingIncome_23day,coef_MissingIncome_23day,coef_MissingIncome_4day
util_Income60to100k,Income 60-100k,@(df.income >= 60000) & (df.income < 100000),0,coef_Income60to100k_1day,coef_Income60to100k_23day,coef_Income60to100k_23day,coef_Income60to100k_4day
util_Income100to150k,Income 100-150k,@(df.income >= 100000) & (df.income < 150000),0,coef_Income100to150k_1day,coef_Income100to150k_23day,coef_Income100to150k_23day,coef_Income100to150k_4day
util_Income150to200k,Income 150-200k,@(df.income >= 150000) & (df.income < 200000),0,coef_Income150to200k_1day,coef_Income150to200k_23day,coef_Income150to200k_23day,coef_Income150to200k_4day
util_Income200kplus,Income 200k+,@df.income >=200000,0,coef_Income200kplus_1day,coef_Income200kplus_23day,coef_Income200kplus_23day,coef_Income200kplus_4day
util_0Autos,0 Autos,@df.auto_ownership==0,0,coef_0Autos_1day,coef_0Autos_23day,coef_0Autos_23day,coef_0Autos_4day
util_1Auto,1 Auto,@df.auto_ownership==1,0,coef_1Auto_1day,coef_1Auto_23day,coef_1Auto_23day,coef_1Auto_4day
util_3plusAutos,3+ Autos,@df.auto_ownership>=3,0,coef_3plusAutos_1day,coef_3plusAutos_23day,coef_3plusAutos_23day,coef_3plusAutos_4day
util_DistanceToWork,Distance to work,@np.log1p(df.distance_to_work),0,coef_DistanceToWork_1day,coef_DistanceToWork_23day,coef_DistanceToWork_23day,coef_DistanceToWork_4day
util_workplace_AGREMPN_share,workplace AGR employment share,@df.workplace_AGREMPN_share,0,coef_WorkAGREMPNshare_1day,coef_WorkAGREMPNshare_23day,coef_WorkAGREMPNshare_23day,coef_WorkAGREMPNshare_4day
util_workplace_FOOEMPN_share,workplace FOO employment share,@df.workplace_FOOEMPN_share,0,coef_WorkFOOEMPNshare_1day,coef_WorkFOOEMPNshare_23day,coef_WorkFOOEMPNshare_23day,coef_WorkFOOEMPNshare_4day
util_workplace_FPSEMPN_share,workplace FPS employment share,@df.workplace_FPSEMPN_share,0,coef_WorkFPSEMPNshare_1day,coef_WorkFPSEMPNshare_23day,coef_WorkFPSEMPNshare_23day,coef_WorkFPSEMPNshare_4day
util_workplace_HEREMPN_share,workplace HER employment share,@df.workplace_HEREMPN_share,0,coef_WorkHEREMPNshare_1day,coef_WorkHEREMPNshare_23day,coef_WorkHEREMPNshare_23day,coef_WorkHEREMPNshare_4day
util_workplace_MWTEMPN_share,workplace MWT employment share,@df.workplace_MWTEMPN_share,0,coef_WorkMWTEMPNshare_1day,coef_WorkMWTEMPNshare_23day,coef_WorkMWTEMPNshare_23day,coef_WorkMWTEMPNshare_4day
util_workplace_OTHEMPN_share,workplace OTH employment share,@df.workplace_OTHEMPN_share,0,coef_WorkOTHEMPNshare_1day,coef_WorkOTHEMPNshare_23day,coef_WorkOTHEMPNshare_23day,coef_WorkOTHEMPNshare_4day
util_workplace_RETEMPN_share,workplace RET employment share,@df.workplace_RETEMPN_share,0,coef_WorkRETEMPNshare_1day,coef_WorkRETEMPNshare_23day,coef_WorkRETEMPNshare_23day,coef_WorkRETEMPNshare_4day
util_Shopping_Maint_Accessibility,shopping accessiblity,@(df.shopping_accessibility + df.othdiscr_accessibility) / 2,0,coef_ShopMaintAcc_1day,coef_ShopMaint_23day,coef_ShopMaint_23day,coef_ShopMaintAcc_4day
#util_temp,temp_calibration,1,0,-4,-4.25,-4.25,-6
util_split_2_3_days_constant, Constant for splitting 2_3_days telecommute frequency,@np.log(0.5),,,1,1,
11 changes: 11 additions & 0 deletions configs_dev/telecommute_status.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Label,Description,Expression,telecommuting,commuting
util_no_commute,commute 0 day a week,@df.work_from_home,,coef_unavailable
util_no_telecommute,telecommute 0 day a week,@df.telecommute_frequency=='No_Telecommute',coef_unavailable,
util_commute_1_day_a_week,commute to work 1 day a week,@(df.telecommute_frequency=='4_days_week') * np.log(1),,coef_one
util_telecommute_4_days_a_week,telecommute 4 days a week,@(df.telecommute_frequency=='4_days_week') * np.log(4),coef_one,
util_commute_2_days_a_week,commute to work 2 days a week,@(df.telecommute_frequency=='3_days_week') * np.log(2),,coef_one
util_telecommute_3_days_a_week,telecommute 3 days a week,@(df.telecommute_frequency=='3_days_week') * np.log(3),coef_one,
util_commute_3_days_a_week,commute to work 3 days a week,@(df.telecommute_frequency=='2_days_week') * np.log(3),,coef_one
util_telecommute_2_days_a_week,telecommute 2 days a week,@(df.telecommute_frequency=='2_days_week') * np.log(2),coef_one,
util_commute_4_days_a_week,commute to work 4 days a week,@(df.telecommute_frequency=='1_day_week') * np.log(4),,coef_one
util_telecommute_1_day_a_week,telecommute 1 day a week,@(df.telecommute_frequency=='1_day_week') * np.log(1),coef_one,
6 changes: 6 additions & 0 deletions configs_dev/telecommute_status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SPEC: telecommute_status.csv
COEFFICIENTS: telecommute_status_coeffs.csv

LOGIT_TYPE: MNL

TELECOMMUTE_ALT: 0
3 changes: 3 additions & 0 deletions configs_dev/telecommute_status_coeffs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coefficient_name,value,constrain
coef_unavailable,-999,F
coef_one,1,F
Loading
Loading