diff --git a/.gitignore b/.gitignore
index c876c288..a6de7440 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,9 @@ core/release/
model-files/runtime/config/pskill.exe
utilities/vta_expresslane_feed_saver/vta_expresslanes_2018*
site/
+.DS_Store
+model-files/model/TripModeChoice.xls
+utilities/sandag-activitysim/configs/*
+utilities/sandag-activitysim/output/*
+utilities/sandag-activitysim/scripts/.Rproj.user/*
+utilities/sandag-activitysim/scripts/.Rhistory
diff --git a/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.Rmd b/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.Rmd
new file mode 100644
index 00000000..67751850
--- /dev/null
+++ b/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.Rmd
@@ -0,0 +1,241 @@
+---
+title: "Mandatory Tour Frequency"
+output: html_notebook
+---
+
+# Overhead
+```{r overhead, include = FALSE}
+packages_vector <- c("tidyverse",
+ "kableExtra")
+
+need_to_install <- packages_vector[!(packages_vector %in% installed.packages()[,"Package"])]
+
+if (length(need_to_install)) install.packages(need_to_install)
+
+for (package in packages_vector) {
+ library(package, character.only = TRUE)
+}
+
+```
+
+# Remote I/O
+```{r remote-io}
+interim_dir <- "../output/"
+
+person_filename <- paste0(interim_dir, "final_persons.csv")
+tour_filename <- paste0(interim_dir, "final_tours.csv")
+
+```
+
+# Parameters
+```{r parameters}
+ptype_dict <- tibble(ptype = seq(1,8),
+ label = c("Full-time Worker",
+ "Part-time Worker",
+ "University Student",
+ "Unemployed",
+ "Retired",
+ "Driving age Student",
+ "Non-driving age Student",
+ "Preschool Student"))
+```
+
+
+# Data Reads
+```{r read}
+person_df <- read_csv(person_filename, col_types = cols(
+ person_id = col_double(),
+ household_id = col_double(),
+ age = col_double(),
+ PNUM = col_double(),
+ sex = col_double(),
+ pemploy = col_double(),
+ pstudent = col_double(),
+ ptype = col_double(),
+ educ = col_double(),
+ naics2_original_code = col_character(),
+ soc2 = col_double(),
+ age_16_to_19 = col_logical(),
+ age_16_p = col_logical(),
+ adult = col_logical(),
+ male = col_logical(),
+ female = col_logical(),
+ has_non_worker = col_logical(),
+ has_retiree = col_logical(),
+ has_preschool_kid = col_logical(),
+ has_driving_kid = col_logical(),
+ has_school_kid = col_logical(),
+ has_full_time = col_logical(),
+ has_part_time = col_logical(),
+ has_university = col_logical(),
+ student_is_employed = col_logical(),
+ nonstudent_to_school = col_logical(),
+ is_student = col_logical(),
+ is_preschool = col_logical(),
+ is_gradeschool = col_logical(),
+ is_highschool = col_logical(),
+ is_university = col_logical(),
+ school_segment = col_double(),
+ is_worker = col_logical(),
+ is_fulltime_worker = col_logical(),
+ is_parttime_worker = col_logical(),
+ is_internal_worker = col_logical(),
+ is_external_worker = col_logical(),
+ home_zone_id = col_double(),
+ time_factor_work = col_double(),
+ time_factor_nonwork = col_double(),
+ naics_code = col_double(),
+ occupation = col_character(),
+ is_income_less25K = col_logical(),
+ is_income_25K_to_60K = col_logical(),
+ is_income_60K_to_120K = col_logical(),
+ is_income_greater60K = col_logical(),
+ is_income_greater120K = col_logical(),
+ is_non_worker_in_HH = col_logical(),
+ is_all_adults_full_time_workers = col_logical(),
+ is_pre_drive_child_in_HH = col_logical(),
+ work_from_home = col_logical(),
+ is_out_of_home_worker = col_logical(),
+ external_workplace_zone_id = col_double(),
+ external_workplace_location_logsum = col_double(),
+ external_workplace_modechoice_logsum = col_double(),
+ school_zone_id = col_double(),
+ school_location_logsum = col_double(),
+ school_modechoice_logsum = col_double(),
+ distance_to_school = col_double(),
+ roundtrip_auto_time_to_school = col_double(),
+ workplace_zone_id = col_double(),
+ workplace_location_logsum = col_double(),
+ workplace_modechoice_logsum = col_double(),
+ distance_to_work = col_double(),
+ workplace_in_cbd = col_logical(),
+ work_zone_area_type = col_double(),
+ auto_time_home_to_work = col_double(),
+ roundtrip_auto_time_to_work = col_double(),
+ work_auto_savings = col_double(),
+ exp_daily_work = col_double(),
+ non_toll_time_work = col_double(),
+ toll_time_work = col_double(),
+ toll_dist_work = col_double(),
+ toll_cost_work = col_double(),
+ toll_travel_time_savings_work = col_double(),
+ transit_pass_subsidy = col_double(),
+ transit_pass_ownership = col_double(),
+ free_parking_at_work = col_logical(),
+ telecommute_frequency = col_character(),
+ cdap_activity = col_character(),
+ travel_active = col_logical(),
+ under16_not_at_school = col_logical(),
+ has_preschool_kid_at_home = col_logical(),
+ has_school_kid_at_home = col_logical(),
+ mandatory_tour_frequency = col_character(),
+ work_and_school_and_worker = col_logical(),
+ work_and_school_and_student = col_logical(),
+ num_mand = col_double(),
+ num_work_tours = col_double(),
+ has_pre_school_child_with_mandatory = col_logical(),
+ has_driving_age_child_with_mandatory = col_logical(),
+ num_joint_tours = col_double(),
+ non_mandatory_tour_frequency = col_double(),
+ num_non_mand = col_double(),
+ num_escort_tours = col_double(),
+ num_eatout_tours = col_double(),
+ num_shop_tours = col_double(),
+ num_maint_tours = col_double(),
+ num_discr_tours = col_double(),
+ num_social_tours = col_double(),
+ num_non_escort_tours = col_double(),
+ num_shop_maint_tours = col_double(),
+ num_shop_maint_escort_tours = col_double(),
+ num_add_shop_maint_tours = col_double(),
+ num_soc_discr_tours = col_double(),
+ num_add_soc_discr_tours = col_double(),
+ model = col_character()
+))
+
+tour_df <- read_csv(tour_filename, col_types = cols(
+ tour_id = col_double(),
+ person_id = col_double(),
+ tour_type = col_character(),
+ tour_type_count = col_double(),
+ tour_type_num = col_double(),
+ tour_num = col_double(),
+ tour_count = col_double(),
+ tour_category = col_character(),
+ number_of_participants = col_double(),
+ destination = col_double(),
+ origin = col_double(),
+ household_id = col_double(),
+ start = col_double(),
+ end = col_double(),
+ duration = col_double(),
+ school_esc_outbound = col_character(),
+ school_esc_inbound = col_character(),
+ num_escortees = col_double(),
+ tdd = col_double(),
+ tour_id_temp = col_double(),
+ composition = col_character(),
+ is_external_tour = col_logical(),
+ is_internal_tour = col_logical(),
+ destination_logsum = col_double(),
+ vehicle_occup_1 = col_character(),
+ vehicle_occup_2 = col_character(),
+ vehicle_occup_3.5 = col_character(),
+ tour_mode = col_character(),
+ mode_choice_logsum = col_double(),
+ selected_vehicle = col_character(),
+ atwork_subtour_frequency = col_character(),
+ parent_tour_id = col_double(),
+ stop_frequency = col_character(),
+ primary_purpose = col_character(),
+ model = col_character()
+))
+```
+
+# Reductions
+```{r reductions}
+temp_df <- tour_df %>%
+ select(tour_id, person_id, tour_category, tour_type) %>%
+ filter(tour_category == "mandatory") %>%
+ group_by(person_id, tour_type) %>%
+ summarise(mandatory_tours = n(), .groups = "drop") %>%
+ mutate(choice = paste0(tour_type, "_", mandatory_tours))
+
+working_df <- temp_df %>%
+ group_by(person_id) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ filter(count > 1) %>%
+ mutate(choice_update = "work_and_school") %>%
+ select(person_id, choice_update)
+
+out_df <- left_join(temp_df, working_df, by = c("person_id")) %>%
+ mutate(choice = if_else(is.na(choice_update), choice, choice_update)) %>%
+ distinct(person_id, choice) %>%
+ left_join(select(person_df, person_id, ptype), ., by = c("person_id")) %>%
+ mutate(choice = if_else(is.na(choice), "none", choice)) %>%
+ left_join(., ptype_dict, by = c("ptype")) %>%
+ rename(person_type = label)
+
+summary_df <- out_df %>%
+ group_by(ptype, person_type, choice) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ group_by(ptype, person_type) %>%
+ mutate(share = count/sum(count)) %>%
+ ungroup() %>%
+ arrange(ptype) %>%
+ select(person_type, choice, share) %>%
+ pivot_wider(names_from = choice, values_from = share, values_fill = 0.0)
+
+summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+```
+The model does show the right types of categories for each of the person types. It seems to have a much higher than expected share of non-mandatory and home activity patterns for workers and students, so the model does not appear to be well calibrated. But the implementation appears correct. ActivitySim files reviewed include:
+
+- `mandatory_tour_frequency_alternatives.csv`
+- `mandatory_tour_frequency_coeffs.csv`
+- `mandatory_tour_frequency.csv`
+- `mandatory_tour_frequency.yaml`
+- `annotate_persons_mtf.csv`
+
diff --git a/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.nb.html b/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.nb.html
new file mode 100644
index 00000000..78bebe2d
--- /dev/null
+++ b/utilities/sandag-activitysim/scripts/mandatory-tour-frequency.nb.html
@@ -0,0 +1,2375 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+Mandatory Tour Frequency
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Overhead
+
+
+
+
+
Remote I/O
+
+
+
+
interim_dir <- "../output/"
+
+person_filename <- paste0(interim_dir, "final_persons.csv")
+tour_filename <- paste0(interim_dir, "final_tours.csv")
+
+
+
+
+
+
+
Parameters
+
+
+
+
ptype_dict <- tibble(ptype = seq(1,8),
+ label = c("Full-time Worker",
+ "Part-time Worker",
+ "University Student",
+ "Unemployed",
+ "Retired",
+ "Driving age Student",
+ "Non-driving age Student",
+ "Preschool Student"))
+
+
+
+
+
+
Data Reads
+
+
+
+
person_df <- read_csv(person_filename, col_types = cols(
+ person_id = col_double(),
+ household_id = col_double(),
+ age = col_double(),
+ PNUM = col_double(),
+ sex = col_double(),
+ pemploy = col_double(),
+ pstudent = col_double(),
+ ptype = col_double(),
+ educ = col_double(),
+ naics2_original_code = col_character(),
+ soc2 = col_double(),
+ age_16_to_19 = col_logical(),
+ age_16_p = col_logical(),
+ adult = col_logical(),
+ male = col_logical(),
+ female = col_logical(),
+ has_non_worker = col_logical(),
+ has_retiree = col_logical(),
+ has_preschool_kid = col_logical(),
+ has_driving_kid = col_logical(),
+ has_school_kid = col_logical(),
+ has_full_time = col_logical(),
+ has_part_time = col_logical(),
+ has_university = col_logical(),
+ student_is_employed = col_logical(),
+ nonstudent_to_school = col_logical(),
+ is_student = col_logical(),
+ is_preschool = col_logical(),
+ is_gradeschool = col_logical(),
+ is_highschool = col_logical(),
+ is_university = col_logical(),
+ school_segment = col_double(),
+ is_worker = col_logical(),
+ is_fulltime_worker = col_logical(),
+ is_parttime_worker = col_logical(),
+ is_internal_worker = col_logical(),
+ is_external_worker = col_logical(),
+ home_zone_id = col_double(),
+ time_factor_work = col_double(),
+ time_factor_nonwork = col_double(),
+ naics_code = col_double(),
+ occupation = col_character(),
+ is_income_less25K = col_logical(),
+ is_income_25K_to_60K = col_logical(),
+ is_income_60K_to_120K = col_logical(),
+ is_income_greater60K = col_logical(),
+ is_income_greater120K = col_logical(),
+ is_non_worker_in_HH = col_logical(),
+ is_all_adults_full_time_workers = col_logical(),
+ is_pre_drive_child_in_HH = col_logical(),
+ work_from_home = col_logical(),
+ is_out_of_home_worker = col_logical(),
+ external_workplace_zone_id = col_double(),
+ external_workplace_location_logsum = col_double(),
+ external_workplace_modechoice_logsum = col_double(),
+ school_zone_id = col_double(),
+ school_location_logsum = col_double(),
+ school_modechoice_logsum = col_double(),
+ distance_to_school = col_double(),
+ roundtrip_auto_time_to_school = col_double(),
+ workplace_zone_id = col_double(),
+ workplace_location_logsum = col_double(),
+ workplace_modechoice_logsum = col_double(),
+ distance_to_work = col_double(),
+ workplace_in_cbd = col_logical(),
+ work_zone_area_type = col_double(),
+ auto_time_home_to_work = col_double(),
+ roundtrip_auto_time_to_work = col_double(),
+ work_auto_savings = col_double(),
+ exp_daily_work = col_double(),
+ non_toll_time_work = col_double(),
+ toll_time_work = col_double(),
+ toll_dist_work = col_double(),
+ toll_cost_work = col_double(),
+ toll_travel_time_savings_work = col_double(),
+ transit_pass_subsidy = col_double(),
+ transit_pass_ownership = col_double(),
+ free_parking_at_work = col_logical(),
+ telecommute_frequency = col_character(),
+ cdap_activity = col_character(),
+ travel_active = col_logical(),
+ under16_not_at_school = col_logical(),
+ has_preschool_kid_at_home = col_logical(),
+ has_school_kid_at_home = col_logical(),
+ mandatory_tour_frequency = col_character(),
+ work_and_school_and_worker = col_logical(),
+ work_and_school_and_student = col_logical(),
+ num_mand = col_double(),
+ num_work_tours = col_double(),
+ has_pre_school_child_with_mandatory = col_logical(),
+ has_driving_age_child_with_mandatory = col_logical(),
+ num_joint_tours = col_double(),
+ non_mandatory_tour_frequency = col_double(),
+ num_non_mand = col_double(),
+ num_escort_tours = col_double(),
+ num_eatout_tours = col_double(),
+ num_shop_tours = col_double(),
+ num_maint_tours = col_double(),
+ num_discr_tours = col_double(),
+ num_social_tours = col_double(),
+ num_non_escort_tours = col_double(),
+ num_shop_maint_tours = col_double(),
+ num_shop_maint_escort_tours = col_double(),
+ num_add_shop_maint_tours = col_double(),
+ num_soc_discr_tours = col_double(),
+ num_add_soc_discr_tours = col_double(),
+ model = col_character()
+))
+
+tour_df <- read_csv(tour_filename, col_types = cols(
+ tour_id = col_double(),
+ person_id = col_double(),
+ tour_type = col_character(),
+ tour_type_count = col_double(),
+ tour_type_num = col_double(),
+ tour_num = col_double(),
+ tour_count = col_double(),
+ tour_category = col_character(),
+ number_of_participants = col_double(),
+ destination = col_double(),
+ origin = col_double(),
+ household_id = col_double(),
+ start = col_double(),
+ end = col_double(),
+ duration = col_double(),
+ school_esc_outbound = col_character(),
+ school_esc_inbound = col_character(),
+ num_escortees = col_double(),
+ tdd = col_double(),
+ tour_id_temp = col_double(),
+ composition = col_character(),
+ is_external_tour = col_logical(),
+ is_internal_tour = col_logical(),
+ destination_logsum = col_double(),
+ vehicle_occup_1 = col_character(),
+ vehicle_occup_2 = col_character(),
+ vehicle_occup_3.5 = col_character(),
+ tour_mode = col_character(),
+ mode_choice_logsum = col_double(),
+ selected_vehicle = col_character(),
+ atwork_subtour_frequency = col_character(),
+ parent_tour_id = col_double(),
+ stop_frequency = col_character(),
+ primary_purpose = col_character(),
+ model = col_character()
+))
+
+
+
+
+
+
Reductions
+
+
+
+
+
+
+
+
+ person_type |
+ none |
+ work_1 |
+ work_2 |
+ school_1 |
+ school_2 |
+ work_and_school |
+
+
+
+
+ Full-time Worker |
+ 0.7793215 |
+ 0.1993803 |
+ 0.0212982 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+
+
+ Part-time Worker |
+ 0.7374583 |
+ 0.2314355 |
+ 0.0311062 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+
+
+ University Student |
+ 0.7873440 |
+ 0.0076863 |
+ 0.0159111 |
+ 0.1704447 |
+ 0.0079819 |
+ 0.0106320 |
+
+
+ Unemployed |
+ 1.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+
+
+ Retired |
+ 1.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0000000 |
+
+
+ Driving age Student |
+ 0.8328733 |
+ 0.0002269 |
+ 0.0053503 |
+ 0.1524559 |
+ 0.0072031 |
+ 0.0018906 |
+
+
+ Non-driving age Student |
+ 0.8154858 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.1819527 |
+ 0.0025614 |
+ 0.0000000 |
+
+
+ Preschool Student |
+ 0.9033079 |
+ 0.0000000 |
+ 0.0000000 |
+ 0.0489189 |
+ 0.0477732 |
+ 0.0000000 |
+
+
+
+
+
+
+
+
summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+
+
+
+
The model does show the right types of categories for each of the
+person types. It seems to have a much higher than expected share of
+non-mandatory and home activity patterns for workers and students, so
+the model does not appear to be well calibrated. But the implementation
+appears correct. ActivitySim files reviewed include:
+
+mandatory_tour_frequency_alternatives.csv
+mandatory_tour_frequency_coeffs.csv
+mandatory_tour_frequency.csv
+mandatory_tour_frequency.yaml
+annotate_persons_mtf.csv
+
+
+
+
+
LS0tCnRpdGxlOiAiTWFuZGF0b3J5IFRvdXIgRnJlcXVlbmN5IgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgojIE92ZXJoZWFkCmBgYHtyIG92ZXJoZWFkLCBpbmNsdWRlID0gRkFMU0V9CnBhY2thZ2VzX3ZlY3RvciA8LSBjKCJ0aWR5dmVyc2UiLAogICAgICAgICAgICAgICAgICAgICAia2FibGVFeHRyYSIpCgpuZWVkX3RvX2luc3RhbGwgPC0gcGFja2FnZXNfdmVjdG9yWyEocGFja2FnZXNfdmVjdG9yICVpbiUgaW5zdGFsbGVkLnBhY2thZ2VzKClbLCJQYWNrYWdlIl0pXQoKaWYgKGxlbmd0aChuZWVkX3RvX2luc3RhbGwpKSBpbnN0YWxsLnBhY2thZ2VzKG5lZWRfdG9faW5zdGFsbCkKCmZvciAocGFja2FnZSBpbiBwYWNrYWdlc192ZWN0b3IpIHsKICBsaWJyYXJ5KHBhY2thZ2UsIGNoYXJhY3Rlci5vbmx5ID0gVFJVRSkKfQoKYGBgCgojIFJlbW90ZSBJL08KYGBge3IgcmVtb3RlLWlvfQppbnRlcmltX2RpciA8LSAiLi4vb3V0cHV0LyIKCnBlcnNvbl9maWxlbmFtZSA8LSBwYXN0ZTAoaW50ZXJpbV9kaXIsICJmaW5hbF9wZXJzb25zLmNzdiIpCnRvdXJfZmlsZW5hbWUgPC0gcGFzdGUwKGludGVyaW1fZGlyLCAiZmluYWxfdG91cnMuY3N2IikKCmBgYAoKIyBQYXJhbWV0ZXJzCmBgYHtyIHBhcmFtZXRlcnN9CnB0eXBlX2RpY3QgPC0gdGliYmxlKHB0eXBlID0gc2VxKDEsOCksCiAgICAgICAgICAgICAgICAgICAgIGxhYmVsID0gYygiRnVsbC10aW1lIFdvcmtlciIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiUGFydC10aW1lIFdvcmtlciIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiVW5pdmVyc2l0eSBTdHVkZW50IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJVbmVtcGxveWVkIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJSZXRpcmVkIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJEcml2aW5nIGFnZSBTdHVkZW50IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJOb24tZHJpd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CgpzdW1tYXJ5X2RmICU+JQogIGtibCgpICU+JQogIGthYmxlX3N0eWxpbmcoKQoKYGBgClRoZSBtb2RlbCBkb2VzIHNob3cgdGhlIHJpZ2h0IHR5cGVzIG9mIGNhdGVnb3JpZXMgZm9yIGVhY2ggb2YgdGhlIHBlcnNvbiB0eXBlcy4gSXQgc2VlbXMgdG8gaGF2ZSBhIG11Y2ggaGlnaGVyIHRoYW4gZXhwZWN0ZWQgc2hhcmUgb2Ygbm9uLW1hbmRhdG9yeSBhbmQgaG9tZSBhY3Rpdml0eSBwYXR0ZXJucyBmb3Igd29ya2VycyBhbmQgc3R1ZGVudHMsIHNvIHRoZSBtb2RlbCBkb2VzIG5vdCBhcHBlYXIgdG8gYmUgd2VsbCBjYWxpYnJhdGVkLiBCdXQgdGhlIGltcGxlbWVudGF0aW9uIGFwcGVhcnMgY29ycmVjdC4gQWN0aXZpdHlTaW0gZmlsZXMgcmV2aWV3ZWQgaW5jbHVkZToKCi0gYG1hbmRhdG9yeV90b3VyX2ZyZXF1ZW5jeV9hbHRlcm5hdGl2ZXMuY3N2YAotIGBtYW5kYXRvcnlfdG91cl9mcmVxdWVuY3lfY29lZmZzLmNzdmAKLSBgbWFuZGF0b3J5X3RvdXJfZnJlcXVlbmN5LmNzdmAKLSBgbWFuZGF0b3J5X3RvdXJfZnJlcXVlbmN5LnlhbWxgCi0gYGFubm90YXRlX3BlcnNvbnNfbXRmLmNzdmAKCg==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/utilities/sandag-activitysim/scripts/parking-subsidy.Rmd b/utilities/sandag-activitysim/scripts/parking-subsidy.Rmd
new file mode 100644
index 00000000..61408341
--- /dev/null
+++ b/utilities/sandag-activitysim/scripts/parking-subsidy.Rmd
@@ -0,0 +1,487 @@
+---
+title: "Parking Subsidy"
+output: html_notebook
+---
+
+# Overhead
+```{r overhead, include = FALSE}
+packages_vector <- c("tidyverse",
+ "kableExtra")
+
+need_to_install <- packages_vector[!(packages_vector %in% installed.packages()[,"Package"])]
+
+if (length(need_to_install)) install.packages(need_to_install)
+
+for (package in packages_vector) {
+ library(package, character.only = TRUE)
+}
+
+```
+
+# Remote I/O
+```{r remote-io}
+interim_dir <- "../output/"
+
+person_filename <- paste0(interim_dir, "final_persons.csv")
+trips_filename <- paste0(interim_dir, "final_trips.csv")
+
+temp_trips_filename <- paste0(interim_dir, "final_trips.RDS")
+
+```
+
+# Parameters
+```{r parameters}
+ptype_dict <- tibble(ptype = seq(1,8),
+ label = c("Full-time Worker",
+ "Part-time Worker",
+ "University Student",
+ "Unemployed",
+ "Retired",
+ "Driving age Student",
+ "Non-driving age Student",
+ "Preschool Student"))
+```
+
+
+# Data Reads
+```{r read}
+trips_df <- read_csv(trips_filename, col_types = cols(
+ trip_id = col_double(),
+ person_id = col_double(),
+ household_id = col_double(),
+ primary_purpose = col_character(),
+ trip_num = col_double(),
+ outbound = col_logical(),
+ trip_count = col_double(),
+ destination = col_double(),
+ origin = col_double(),
+ tour_id = col_double(),
+ escort_participants = col_character(),
+ school_escort_direction = col_character(),
+ purpose = col_character(),
+ destination_logsum = col_double(),
+ depart = col_double(),
+ trip_mode = col_character(),
+ mode_choice_logsum = col_double(),
+ vot_da = col_double(),
+ vot_s2 = col_double(),
+ vot_s3 = col_double(),
+ ownsTransponder = col_logical(),
+ parking_zone = col_double(),
+ trip_period = col_character(),
+ tour_participants = col_double(),
+ distance = col_double(),
+ is_ea = col_logical(),
+ is_am = col_logical(),
+ is_md = col_logical(),
+ is_pm = col_logical(),
+ is_ev = col_logical(),
+ ownTrp = col_logical(),
+ vot1 = col_double(),
+ vot2 = col_double(),
+ vot3 = col_double(),
+ inbound = col_logical(),
+ DRIVEALONE_NOTR_EA_LOW = col_double(),
+ SHARED2_NOTR_EA_LOW = col_double(),
+ SHARED3_NOTR_EA_LOW = col_double(),
+ DRIVEALONE_TR_EA_LOW = col_double(),
+ SHARED2_TR_EA_LOW = col_double(),
+ SHARED3_TR_EA_LOW = col_double(),
+ DRIVEALONE_NOTR_EA_MED = col_double(),
+ SHARED2_NOTR_EA_MED = col_double(),
+ SHARED3_NOTR_EA_MED = col_double(),
+ DRIVEALONE_TR_EA_MED = col_double(),
+ SHARED2_TR_EA_MED = col_double(),
+ SHARED3_TR_EA_MED = col_double(),
+ DRIVEALONE_NOTR_EA_HIGH = col_double(),
+ SHARED2_NOTR_EA_HIGH = col_double(),
+ SHARED3_NOTR_EA_HIGH = col_double(),
+ DRIVEALONE_TR_EA_HIGH = col_double(),
+ SHARED2_TR_EA_HIGH = col_double(),
+ SHARED3_TR_EA_HIGH = col_double(),
+ WALK_LOC_EA = col_double(),
+ WALK_PRM_EA = col_double(),
+ WALK_MIX_EA = col_double(),
+ PNR_LOCOUT_EA = col_double(),
+ PNR_PRMOUT_EA = col_double(),
+ PNR_MIXOUT_EA = col_double(),
+ KNR_LOCOUT_EA = col_double(),
+ KNR_PRMOUT_EA = col_double(),
+ KNR_MIXOUT_EA = col_double(),
+ TNC_LOCOUT_EA = col_double(),
+ TNC_PRMOUT_EA = col_double(),
+ TNC_MIXOUT_EA = col_double(),
+ PNR_LOCIN_EA = col_double(),
+ PNR_PRMIN_EA = col_double(),
+ PNR_MIXIN_EA = col_double(),
+ KNR_LOCIN_EA = col_double(),
+ KNR_PRMIN_EA = col_double(),
+ KNR_MIXIN_EA = col_double(),
+ TNC_LOCIN_EA = col_double(),
+ TNC_PRMIN_EA = col_double(),
+ TNC_MIXIN_EA = col_double(),
+ BIKE_EA = col_double(),
+ WALK_EA = col_double(),
+ DRIVEALONE_NOTR_AM_LOW = col_double(),
+ SHARED2_NOTR_AM_LOW = col_double(),
+ SHARED3_NOTR_AM_LOW = col_double(),
+ DRIVEALONE_TR_AM_LOW = col_double(),
+ SHARED2_TR_AM_LOW = col_double(),
+ SHARED3_TR_AM_LOW = col_double(),
+ DRIVEALONE_NOTR_AM_MED = col_double(),
+ SHARED2_NOTR_AM_MED = col_double(),
+ SHARED3_NOTR_AM_MED = col_double(),
+ DRIVEALONE_TR_AM_MED = col_double(),
+ SHARED2_TR_AM_MED = col_double(),
+ SHARED3_TR_AM_MED = col_double(),
+ DRIVEALONE_NOTR_AM_HIGH = col_double(),
+ SHARED2_NOTR_AM_HIGH = col_double(),
+ SHARED3_NOTR_AM_HIGH = col_double(),
+ DRIVEALONE_TR_AM_HIGH = col_double(),
+ SHARED2_TR_AM_HIGH = col_double(),
+ SHARED3_TR_AM_HIGH = col_double(),
+ WALK_LOC_AM = col_double(),
+ WALK_PRM_AM = col_double(),
+ WALK_MIX_AM = col_double(),
+ PNR_LOCOUT_AM = col_double(),
+ PNR_PRMOUT_AM = col_double(),
+ PNR_MIXOUT_AM = col_double(),
+ KNR_LOCOUT_AM = col_double(),
+ KNR_PRMOUT_AM = col_double(),
+ KNR_MIXOUT_AM = col_double(),
+ TNC_LOCOUT_AM = col_double(),
+ TNC_PRMOUT_AM = col_double(),
+ TNC_MIXOUT_AM = col_double(),
+ PNR_LOCIN_AM = col_double(),
+ PNR_PRMIN_AM = col_double(),
+ PNR_MIXIN_AM = col_double(),
+ KNR_LOCIN_AM = col_double(),
+ KNR_PRMIN_AM = col_double(),
+ KNR_MIXIN_AM = col_double(),
+ TNC_LOCIN_AM = col_double(),
+ TNC_PRMIN_AM = col_double(),
+ TNC_MIXIN_AM = col_double(),
+ BIKE_AM = col_double(),
+ WALK_AM = col_double(),
+ DRIVEALONE_NOTR_MD_LOW = col_double(),
+ SHARED2_NOTR_MD_LOW = col_double(),
+ SHARED3_NOTR_MD_LOW = col_double(),
+ DRIVEALONE_TR_MD_LOW = col_double(),
+ SHARED2_TR_MD_LOW = col_double(),
+ SHARED3_TR_MD_LOW = col_double(),
+ DRIVEALONE_NOTR_MD_MED = col_double(),
+ SHARED2_NOTR_MD_MED = col_double(),
+ SHARED3_NOTR_MD_MED = col_double(),
+ DRIVEALONE_TR_MD_MED = col_double(),
+ SHARED2_TR_MD_MED = col_double(),
+ SHARED3_TR_MD_MED = col_double(),
+ DRIVEALONE_NOTR_MD_HIGH = col_double(),
+ SHARED2_NOTR_MD_HIGH = col_double(),
+ SHARED3_NOTR_MD_HIGH = col_double(),
+ DRIVEALONE_TR_MD_HIGH = col_double(),
+ SHARED2_TR_MD_HIGH = col_double(),
+ SHARED3_TR_MD_HIGH = col_double(),
+ WALK_LOC_MD = col_double(),
+ WALK_PRM_MD = col_double(),
+ WALK_MIX_MD = col_double(),
+ PNR_LOCOUT_MD = col_double(),
+ PNR_PRMOUT_MD = col_double(),
+ PNR_MIXOUT_MD = col_double(),
+ KNR_LOCOUT_MD = col_double(),
+ KNR_PRMOUT_MD = col_double(),
+ KNR_MIXOUT_MD = col_double(),
+ TNC_LOCOUT_MD = col_double(),
+ TNC_PRMOUT_MD = col_double(),
+ TNC_MIXOUT_MD = col_double(),
+ PNR_LOCIN_MD = col_double(),
+ PNR_PRMIN_MD = col_double(),
+ PNR_MIXIN_MD = col_double(),
+ KNR_LOCIN_MD = col_double(),
+ KNR_PRMIN_MD = col_double(),
+ KNR_MIXIN_MD = col_double(),
+ TNC_LOCIN_MD = col_double(),
+ TNC_PRMIN_MD = col_double(),
+ TNC_MIXIN_MD = col_double(),
+ BIKE_MD = col_double(),
+ WALK_MD = col_double(),
+ DRIVEALONE_NOTR_PM_LOW = col_double(),
+ SHARED2_NOTR_PM_LOW = col_double(),
+ SHARED3_NOTR_PM_LOW = col_double(),
+ DRIVEALONE_TR_PM_LOW = col_double(),
+ SHARED2_TR_PM_LOW = col_double(),
+ SHARED3_TR_PM_LOW = col_double(),
+ DRIVEALONE_NOTR_PM_MED = col_double(),
+ SHARED2_NOTR_PM_MED = col_double(),
+ SHARED3_NOTR_PM_MED = col_double(),
+ DRIVEALONE_TR_PM_MED = col_double(),
+ SHARED2_TR_PM_MED = col_double(),
+ SHARED3_TR_PM_MED = col_double(),
+ DRIVEALONE_NOTR_PM_HIGH = col_double(),
+ SHARED2_NOTR_PM_HIGH = col_double(),
+ SHARED3_NOTR_PM_HIGH = col_double(),
+ DRIVEALONE_TR_PM_HIGH = col_double(),
+ SHARED2_TR_PM_HIGH = col_double(),
+ SHARED3_TR_PM_HIGH = col_double(),
+ WALK_LOC_PM = col_double(),
+ WALK_PRM_PM = col_double(),
+ WALK_MIX_PM = col_double(),
+ PNR_LOCOUT_PM = col_double(),
+ PNR_PRMOUT_PM = col_double(),
+ PNR_MIXOUT_PM = col_double(),
+ KNR_LOCOUT_PM = col_double(),
+ KNR_PRMOUT_PM = col_double(),
+ KNR_MIXOUT_PM = col_double(),
+ TNC_LOCOUT_PM = col_double(),
+ TNC_PRMOUT_PM = col_double(),
+ TNC_MIXOUT_PM = col_double(),
+ PNR_LOCIN_PM = col_double(),
+ PNR_PRMIN_PM = col_double(),
+ PNR_MIXIN_PM = col_double(),
+ KNR_LOCIN_PM = col_double(),
+ KNR_PRMIN_PM = col_double(),
+ KNR_MIXIN_PM = col_double(),
+ TNC_LOCIN_PM = col_double(),
+ TNC_PRMIN_PM = col_double(),
+ TNC_MIXIN_PM = col_double(),
+ BIKE_PM = col_double(),
+ WALK_PM = col_double(),
+ DRIVEALONE_NOTR_EV_LOW = col_double(),
+ SHARED2_NOTR_EV_LOW = col_double(),
+ SHARED3_NOTR_EV_LOW = col_double(),
+ DRIVEALONE_TR_EV_LOW = col_double(),
+ SHARED2_TR_EV_LOW = col_double(),
+ SHARED3_TR_EV_LOW = col_double(),
+ DRIVEALONE_NOTR_EV_MED = col_double(),
+ SHARED2_NOTR_EV_MED = col_double(),
+ SHARED3_NOTR_EV_MED = col_double(),
+ DRIVEALONE_TR_EV_MED = col_double(),
+ SHARED2_TR_EV_MED = col_double(),
+ SHARED3_TR_EV_MED = col_double(),
+ DRIVEALONE_NOTR_EV_HIGH = col_double(),
+ SHARED2_NOTR_EV_HIGH = col_double(),
+ SHARED3_NOTR_EV_HIGH = col_double(),
+ DRIVEALONE_TR_EV_HIGH = col_double(),
+ SHARED2_TR_EV_HIGH = col_double(),
+ SHARED3_TR_EV_HIGH = col_double(),
+ WALK_LOC_EV = col_double(),
+ WALK_PRM_EV = col_double(),
+ WALK_MIX_EV = col_double(),
+ PNR_LOCOUT_EV = col_double(),
+ PNR_PRMOUT_EV = col_double(),
+ PNR_MIXOUT_EV = col_double(),
+ KNR_LOCOUT_EV = col_double(),
+ KNR_PRMOUT_EV = col_double(),
+ KNR_MIXOUT_EV = col_double(),
+ TNC_LOCOUT_EV = col_double(),
+ TNC_PRMOUT_EV = col_double(),
+ TNC_MIXOUT_EV = col_double(),
+ PNR_LOCIN_EV = col_double(),
+ PNR_PRMIN_EV = col_double(),
+ PNR_MIXIN_EV = col_double(),
+ KNR_LOCIN_EV = col_double(),
+ KNR_PRMIN_EV = col_double(),
+ KNR_MIXIN_EV = col_double(),
+ TNC_LOCIN_EV = col_double(),
+ TNC_PRMIN_EV = col_double(),
+ TNC_MIXIN_EV = col_double(),
+ BIKE_EV = col_double(),
+ WALK_EV = col_double(),
+ timeDrive = col_double(),
+ distanceDrive = col_double(),
+ costTollDrive = col_double(),
+ timeTransitInVehicle = col_double(),
+ timeRapidTransitInVehicle = col_double(),
+ timeExpressBusTransitInVehicle = col_double(),
+ timeLocalBusTransitInVehicle = col_double(),
+ timeLightRailTransitInVehicle = col_double(),
+ timeCommuterRailTransitInVehicle = col_double(),
+ timeTransitInitialWait = col_double(),
+ costFareTransit = col_double(),
+ transfersTransit = col_double(),
+ timeBike = col_double(),
+ timeWalk = col_double(),
+ sample_rate = col_double(),
+ otaz = col_double(),
+ dtaz = col_double(),
+ model = col_character()
+))
+
+person_df <- read_csv(person_filename, col_types = cols(
+ person_id = col_double(),
+ household_id = col_double(),
+ age = col_double(),
+ PNUM = col_double(),
+ sex = col_double(),
+ pemploy = col_double(),
+ pstudent = col_double(),
+ ptype = col_double(),
+ educ = col_double(),
+ naics2_original_code = col_character(),
+ soc2 = col_double(),
+ age_16_to_19 = col_logical(),
+ age_16_p = col_logical(),
+ adult = col_logical(),
+ male = col_logical(),
+ female = col_logical(),
+ has_non_worker = col_logical(),
+ has_retiree = col_logical(),
+ has_preschool_kid = col_logical(),
+ has_driving_kid = col_logical(),
+ has_school_kid = col_logical(),
+ has_full_time = col_logical(),
+ has_part_time = col_logical(),
+ has_university = col_logical(),
+ student_is_employed = col_logical(),
+ nonstudent_to_school = col_logical(),
+ is_student = col_logical(),
+ is_preschool = col_logical(),
+ is_gradeschool = col_logical(),
+ is_highschool = col_logical(),
+ is_university = col_logical(),
+ school_segment = col_double(),
+ is_worker = col_logical(),
+ is_fulltime_worker = col_logical(),
+ is_parttime_worker = col_logical(),
+ is_internal_worker = col_logical(),
+ is_external_worker = col_logical(),
+ home_zone_id = col_double(),
+ time_factor_work = col_double(),
+ time_factor_nonwork = col_double(),
+ naics_code = col_double(),
+ occupation = col_character(),
+ is_income_less25K = col_logical(),
+ is_income_25K_to_60K = col_logical(),
+ is_income_60K_to_120K = col_logical(),
+ is_income_greater60K = col_logical(),
+ is_income_greater120K = col_logical(),
+ is_non_worker_in_HH = col_logical(),
+ is_all_adults_full_time_workers = col_logical(),
+ is_pre_drive_child_in_HH = col_logical(),
+ work_from_home = col_logical(),
+ is_out_of_home_worker = col_logical(),
+ external_workplace_zone_id = col_double(),
+ external_workplace_location_logsum = col_double(),
+ external_workplace_modechoice_logsum = col_double(),
+ school_zone_id = col_double(),
+ school_location_logsum = col_double(),
+ school_modechoice_logsum = col_double(),
+ distance_to_school = col_double(),
+ roundtrip_auto_time_to_school = col_double(),
+ workplace_zone_id = col_double(),
+ workplace_location_logsum = col_double(),
+ workplace_modechoice_logsum = col_double(),
+ distance_to_work = col_double(),
+ workplace_in_cbd = col_logical(),
+ work_zone_area_type = col_double(),
+ auto_time_home_to_work = col_double(),
+ roundtrip_auto_time_to_work = col_double(),
+ work_auto_savings = col_double(),
+ exp_daily_work = col_double(),
+ non_toll_time_work = col_double(),
+ toll_time_work = col_double(),
+ toll_dist_work = col_double(),
+ toll_cost_work = col_double(),
+ toll_travel_time_savings_work = col_double(),
+ transit_pass_subsidy = col_double(),
+ transit_pass_ownership = col_double(),
+ free_parking_at_work = col_logical(),
+ telecommute_frequency = col_character(),
+ cdap_activity = col_character(),
+ travel_active = col_logical(),
+ under16_not_at_school = col_logical(),
+ has_preschool_kid_at_home = col_logical(),
+ has_school_kid_at_home = col_logical(),
+ mandatory_tour_frequency = col_character(),
+ work_and_school_and_worker = col_logical(),
+ work_and_school_and_student = col_logical(),
+ num_mand = col_double(),
+ num_work_tours = col_double(),
+ has_pre_school_child_with_mandatory = col_logical(),
+ has_driving_age_child_with_mandatory = col_logical(),
+ num_joint_tours = col_double(),
+ non_mandatory_tour_frequency = col_double(),
+ num_non_mand = col_double(),
+ num_escort_tours = col_double(),
+ num_eatout_tours = col_double(),
+ num_shop_tours = col_double(),
+ num_maint_tours = col_double(),
+ num_discr_tours = col_double(),
+ num_social_tours = col_double(),
+ num_non_escort_tours = col_double(),
+ num_shop_maint_tours = col_double(),
+ num_shop_maint_escort_tours = col_double(),
+ num_add_shop_maint_tours = col_double(),
+ num_soc_discr_tours = col_double(),
+ num_add_soc_discr_tours = col_double(),
+ model = col_character()
+))
+
+```
+
+# Temp I/O
+```{r temp-io}
+saveRDS(trips_df, temp_trips_filename)
+trips_df <- readRDS(temp_trips_filename)
+```
+
+
+# Reductions
+```{r reductions}
+summary_df <- person_df %>%
+ select(person_id, ptype, free_parking_at_work) %>%
+ left_join(., ptype_dict, by = c("ptype")) %>%
+ rename(person_type = label) %>%
+ mutate(free_parking_at_work = if_else(free_parking_at_work, "Free Parking at Work", "Not Free Parking at Work")) %>%
+ group_by(ptype, person_type, free_parking_at_work) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ group_by(ptype, person_type) %>%
+ mutate(share = count/sum(count)) %>%
+ ungroup() %>%
+ arrange(ptype) %>%
+ select(person_type, free_parking_at_work, share) %>%
+ pivot_wider(names_from = free_parking_at_work, values_from = share, values_fill = 0.0)
+
+
+summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+```
+The model does show the right types of categories for each of the person types. The implementation appears correct. ActivitySim files reviewed include:
+
+- `free_parking_annotate_persons_preprocessor.csv`
+- `free_parking_coefficients.csv`
+-- For SANDAG: still has coefficients specific to SF Bay Area
+- `free_parking.csv`: not much intelligence in the spec
+- `free_parking.yaml`: appears
+
+```{r Reductions part 2}
+# need to check what choices those with free parking make in regards to parking locations
+summary_df <- trips_df %>%
+ select(trip_id, person_id, purpose, parking_zone, destination) %>%
+ filter(purpose == "work") %>%
+ left_join(., select(person_df, person_id, free_parking_at_work), by = c("person_id")) %>%
+ mutate(parking_choice_made = (parking_zone > 0)) %>%
+ mutate(parking_zone_is_destination = if_else(parking_zone == destination, "Parked at Destination", "Parked and Walked to Destination")) %>%
+ mutate(parking_zone_is_destination = if_else(parking_choice_made, parking_zone_is_destination, "No Parking Choice Made")) %>%
+ mutate(free_parking_at_work = if_else(free_parking_at_work, "Free Parking at Work", "Not Free Parking at Work")) %>%
+ group_by(free_parking_at_work, parking_zone_is_destination) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ group_by(free_parking_at_work) %>%
+ mutate(share = count/sum(count)) %>%
+ ungroup() %>%
+ select(-count) %>%
+ pivot_wider(names_from = parking_zone_is_destination, values_from = share, values_fill = 0.0)
+
+summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+
+
+
+```
+
+The parking location choice model does not appeared to be applied correctly. Emailed Joe F. follow-up question on 10/26.
+
+
diff --git a/utilities/sandag-activitysim/scripts/parking-subsidy.nb.html b/utilities/sandag-activitysim/scripts/parking-subsidy.nb.html
new file mode 100644
index 00000000..fc14fc57
--- /dev/null
+++ b/utilities/sandag-activitysim/scripts/parking-subsidy.nb.html
@@ -0,0 +1,2311 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+Parking Subsidy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Overhead
+
+
+
+
+
Remote I/O
+
+
+
+
interim_dir <- "../output/"
+
+person_filename <- paste0(interim_dir, "final_persons.csv")
+trips_filename <- paste0(interim_dir, "final_trips.csv")
+
+temp_trips_filename <- paste0(interim_dir, "final_trips.RDS")
+
+
+
+
+
+
+
Parameters
+
+
+
+
ptype_dict <- tibble(ptype = seq(1,8),
+ label = c("Full-time Worker",
+ "Part-time Worker",
+ "University Student",
+ "Unemployed",
+ "Retired",
+ "Driving age Student",
+ "Non-driving age Student",
+ "Preschool Student"))
+
+
+
+
+
+
Data Reads
+
+
+
+
trips_df <- read_csv(trips_filename)
+
+
+
+
Rows: 9229920 Columns: 258── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
+Delimiter: ","
+chr (7): primary_purpose, escort_participants, school_escort_direction, purpose, trip_mode, trip_period, model
+dbl (242): trip_id, person_id, household_id, trip_num, trip_count, destination, origin, tour_id, destination_logsum, depart, mode_choice_logsum, vot_da, vot_s2, vot_s3, parking_zone, tour_participants, distance, vot1, vot2, vot3, DRIVEALONE_N...
+lgl (9): outbound, ownsTransponder, is_ea, is_am, is_md, is_pm, is_ev, ownTrp, inbound
+ℹ Use `spec()` to retrieve the full column specification for this data.
+ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
+
+
+
+
+
+
Temp I/O
+
+
+
+
saveRDS(trips_df, temp_trips_filename)
+
+
+
+
+
+
Reductions
+
+
+
+
summary_df <- person_df %>%
+ select(person_id, ptype, free_parking_at_work) %>%
+ left_join(., ptype_dict, by = c("ptype")) %>%
+ rename(person_type = label) %>%
+ mutate(free_parking_at_work = if_else(free_parking_at_work, "Free Parking at Work", "Not Free Parking at Work")) %>%
+ group_by(ptype, person_type, free_parking_at_work) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ group_by(ptype, person_type) %>%
+ mutate(share = count/sum(count)) %>%
+ ungroup() %>%
+ arrange(ptype) %>%
+ select(person_type, free_parking_at_work, share) %>%
+ pivot_wider(names_from = free_parking_at_work, values_from = share, values_fill = 0.0)
+
+
+summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+
+
+
+
+
+
+ person_type |
+ Free Parking at Work |
+ Not Free Parking at Work |
+
+
+
+
+ Full-time Worker |
+ 0.4530072 |
+ 0.5469928 |
+
+
+ Part-time Worker |
+ 0.5140448 |
+ 0.4859552 |
+
+
+ University Student |
+ 0.1371233 |
+ 0.8628767 |
+
+
+ Unemployed |
+ 0.0000000 |
+ 1.0000000 |
+
+
+ Retired |
+ 0.0000000 |
+ 1.0000000 |
+
+
+ Driving age Student |
+ 0.0413185 |
+ 0.9586815 |
+
+
+ Non-driving age Student |
+ 0.0000000 |
+ 1.0000000 |
+
+
+ Preschool Student |
+ 0.0000000 |
+ 1.0000000 |
+
+
+
+
+
+
+
+
NA
+
+
+
+
The model does show the right types of categories for each of the
+person types. The implementation appears correct. ActivitySim files
+reviewed include:
+
+free_parking_annotate_persons_preprocessor.csv
+free_parking_coefficients.csv
– For SANDAG: still has
+coefficients specific to SF Bay Area
+free_parking.csv
: not much intelligence in the
+spec
+free_parking.yaml
: appears
+
+
+
+
+
# need to check what choices those with free parking make in regards to parking locations
+summary_df <- trips_df %>%
+ select(trip_id, person_id, purpose, parking_zone, destination) %>%
+ filter(purpose == "work") %>%
+ left_join(., select(person_df, person_id, free_parking_at_work), by = c("person_id")) %>%
+ mutate(parking_choice_made = (parking_zone > 0)) %>%
+ mutate(parking_zone_is_destination = if_else(parking_zone == destination, "Parked at Destination", "Parked and Walked to Destination")) %>%
+ mutate(parking_zone_is_destination = if_else(parking_choice_made, parking_zone_is_destination, "No Parking Choice Made")) %>%
+ mutate(free_parking_at_work = if_else(free_parking_at_work, "Free Parking at Work", "Not Free Parking at Work")) %>%
+ group_by(free_parking_at_work, parking_zone_is_destination) %>%
+ summarise(count = n(), .groups = "drop") %>%
+ group_by(free_parking_at_work) %>%
+ mutate(share = count/sum(count)) %>%
+ ungroup() %>%
+ select(-count) %>%
+ pivot_wider(names_from = parking_zone_is_destination, values_from = share, values_fill = 0.0)
+
+summary_df %>%
+ kbl() %>%
+ kable_styling()
+
+
+
+
+
+
+
+ free_parking_at_work |
+ No Parking Choice Made |
+ Parked at Destination |
+
+
+
+
+ Free Parking at Work |
+ 0.9386687 |
+ 0.0613313 |
+
+
+ Not Free Parking at Work |
+ 0.9406610 |
+ 0.0593390 |
+
+
+
+
+
+
+
+
NA
+NA
+NA
+NA
+
+
+
+
The parking location choice model does not appeared to be applied
+correctly. Emailed Joe F. follow-up question on 10/26.
+
+
+
+
LS0tCnRpdGxlOiAiUGFya2luZyBTdWJzaWR5IgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgojIE92ZXJoZWFkCmBgYHtyIG92ZXJoZWFkLCBpbmNsdWRlID0gRkFMU0V9CnBhY2thZ2VzX3ZlY3RvciA8LSBjKCJ0aWR5dmVyc2UiLAogICAgICAgICAgICAgICAgICAgICAia2FibGVFeHRyYSIpCgpuZWVkX3RvX2luc3RhbGwgPC0gcGFja2FnZXNfdmVjdG9yWyEocGFja2FnZXNfdmVjdG9yICVpbiUgaW5zdGFsbGVkLnBhY2thZ2VzKClbLCJQYWNrYWdlIl0pXQoKaWYgKGxlbmd0aChuZWVkX3RvX2luc3RhbGwpKSBpbnN0YWxsLnBhY2thZ2VzKG5lZWRfdG9faW5zdGFsbCkKCmZvciAocGFja2FnZSBpbiBwYWNrYWdlc192ZWN0b3IpIHsKICBsaWJyYXJ5KHBhY2thZ2UsIGNoYXJhY3Rlci5vbmx5ID0gVFJVRSkKfQoKYGBgCgojIFJlbW90ZSBJL08KYGBge3IgcmVtb3RlLWlvfQppbnRlcmltX2RpciA8LSAiLi4vb3V0cHV0LyIKCnBlcnNvbl9maWxlbmFtZSA8LSBwYXN0ZTAoaW50ZXJpbV9kaXIsICJmaW5hbF9wZXJzb25zLmNzdiIpCnRyaXBzX2ZpbGVuYW1lIDwtIHBhc3RlMChpbnRlcmltX2RpciwgImZpbmFsX3RyaXBzLmNzdiIpCgp0ZW1wX3RyaXBzX2ZpbGVuYW1lIDwtIHBhc3RlMChpbnRlcmltX2RpciwgImZpbmFsX3RyaXBzLlJEUyIpCgpgYGAKCiMgUGFyYW1ldGVycwpgYGB7ciBwYXJhbWV0ZXJzfQpwdHlwZV9kaWN0IDwtIHRpYmJsZShwdHlwZSA9IHNlcSgxLDgpLAogICAgICAgICAgICAgICAgICAgICBsYWJlbCA9IGMoIkZ1bGwtdGltZSBXb3JrZXIiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlBhcnQtdGltZSBXb3JrZXIiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlVuaXZlcnNpdHkgU3R1ZGVudCIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiVW5lbXBsb3llZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiUmV0aXJlZCIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiRHJpdmluZyBhZ2UgU3R1ZGVudCIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiTm9uLWRyaXZpbmcgYWdlIFN0dWRlbnQiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlByZXNjaG9vbCBTdHVkZW50IikpCmBgYAoKCiMgRGF0YSBSZWFkcwpgYGB7ciByZWFkfQp0cmlwc19kZiA8LSByZWFkX2Nzdih0cmlwc19maWxlbmFtZSwgY29sX3R5cGVzID0gY29scygKICB0cmlwX2lkID0gY29sX2RvdWJsZSgpLAogIHBlcnNvbl9pZCA9IGNvbF9kb3VibGUoKSwKICBob3VzZWhvbGRfaWQgPSBjb2xfZG91YmxlKCksCiAgcHJpbWFyeV9wdXJwb3NlID0gY29sX2NoYXJhY3RlcigpLAogIHRyaXBfbnVtID0gY29sX2RvdWJsZSgpLAogIG91dGJvdW5kID0gY29sX2xvZ2ljYWwoKSwKICB0cmlwX2NvdW50ID0gY29sX2RvdWJsZSgpLAogIGRlc3RpbmF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AgCgoKCmBgYAoKVGhlIHBhcmtpbmcgbG9jYXRpb24gY2hvaWNlIG1vZGVsIGRvZXMgbm90IGFwcGVhcmVkIHRvIGJlIGFwcGxpZWQgY29ycmVjdGx5LiBFbWFpbGVkIEpvZSBGLiBmb2xsb3ctdXAgcXVlc3Rpb24gb24gMTAvMjYuIAoKCg==
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/utilities/sandag-activitysim/scripts/scripts.Rproj b/utilities/sandag-activitysim/scripts/scripts.Rproj
new file mode 100644
index 00000000..8e3c2ebc
--- /dev/null
+++ b/utilities/sandag-activitysim/scripts/scripts.Rproj
@@ -0,0 +1,13 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX