Skip to contents

All functions

add_geometry_to_table()
Add Geometry to Zone Groups Table
adjust_pums_to_reference()
Adjust PUMS weights to match ACS
adjust_ref_counts_dataset()
Adjust ACS counts to match county totals
adjust_reference_to_target()
Adjust reference counts to match targets
adjust_target_to_study_zones()
Adjust targets to client zones
adjust_unrelated_per_wts()
Adjust person weights for unrelated persons
adjust_unrelated_pums()
Split unrelated householders in PUMS
adjust_unrelated_survey()
Adjust survey data to account for unrelated householders
aggregate_targets()
Aggregate targets to higher-level geography
append_var_lab()
Append value labels to variable
archive_file()
Archive file with timestamp if exists
blend_initial_weights()
Blend initial weights for ABS and NPS samples
build_update_map()
: Build Update Map for Combined Target Categories
calc_alpha()
Calculate blending factor for NPS sample
calc_complete_hhdays()
Calculate complete household weekdays
calc_day_trip_class()
Classify day trip type
calc_day_weights()
Calculate day weights for each person-day
calc_daypat_probabilities()
Save day pattern summary results
calc_initial_weights()
Calculate initial survey weights
calc_linked_trip_weights()
Calculate linked trip weights
calc_max_error()
Calculate maximum error across weighted variables
calc_person_type()
Calculate person type classification
calc_person_weights()
Calculate person weights from household weights
calc_sample_plan_counts()
Allocate ACS counts to sample plan geographies
calc_survey_ci()
Calculate survey confidence intervals by zone group and region
calc_target_ci()
Calculate target confidence intervals by zone group and region
calc_tour_weights()
Calculate tour weights for each person
calc_trip_rate_factor()
Calculate trip rate factor from model
calc_trip_weights()
Calculate trip weights for each person-trip
calc_uwe()
Calculate unequal weighting effect (UWE)
calc_weight_fit()
Calculate fit between target and survey confidence intervals
calc_weight_mape()
calc_target_fit
calculate_acs_proportions()
Calculate ACS proportions from counts
calculate_aggegrate_trip_rates()
Aggregate trip rates by platform and type
cap_trip_rate_factors()
Cap trip rate factors
check_all_settings()
Validate all YAML configs under a directory
check_daypat_results()
Check day pattern model results against original data
check_group_sum()
Check group sum consistency for target columns
check_group_sums()
Check group sums for target columns
check_initial_weights()
Check initial weights against PUMS reference counts
check_ref_counts()
Check reference counts against PUMS data
check_settings()
Validate a single YAML config against the JSON schema
check_settings_doc_coverage()
CI/PR gate: ensure settings are documented in the schema
check_weight_skew()
Check skew between household and person weights in PUMS
check_write_to_db()
Confirm database write intent
clean_data_dict()
Clean PUMS data dictionary
clip.vector()
Clip vector to bounds
cluster_pumas()
Cluster PUMAs
connect_to_pops()
Connect to the POPS server using Rpostgres
create_full_xwalk()
Create PUMA-to-zone group crosswalk
create_ie_adjustment_data()
Create adjustment factors to match expansion data to target year
create_importance_list()
create_importance_list
create_target_update_table()
Create target update mapping table for control file
cut_and_label()
Cut variable into labeled intervals
db_table_exists()
Check if table exists on DB
db_table_has_geometry()
Check if database table has geometry column
diff_settings_vs_schema()
Compare used settings against documented schema properties
discover_settings_in_code()
Discover settings keys used in the codebase
entropy_zone_groups()
Group PUMAs by sample rate using entropy-based clustering
extract_trip_rate_factors()
Summarize trip rate factors by platform and day group
fetch_acs()
Fetch ACS table with caching
fetch_all_hts_tables()
Load all HTS tables from POPS or disk
fetch_from_db()
Fetch table from database with geometry support
fetch_hts_table()
Load HTS table from POPS, cache, or CSV
fetch_pums()
Fetch PUMS data with caching
fetch_study_region()
Fetch study region geometry from POPS or cache
fillna()
Fill NA values in data.table
filter_settings()
Exclude loader-generated and deprecated settings from coverage checks
find_income_overlaps()
Match income bins by overlap
find_level_idx()
Find index for compound range in target string
find_ncols()
find_ncols
find_project_root()
Locate SharePoint project root directory
fix_value_labels_on_load()
Fix value labels on load
force_balance_pums_weights()
Peg household weights to person weights
format_income_bins()
Format income bin labels
geoid_pad()
Pad GEOID columns to fixed width
get_acs_bg_counts()
Get ACS block group counts (multi-unit)
get_acs_bg_counts_base()
Get ACS reference counts for block groups
get_acs_ethnicity()
Fetch ACS ethnicity table for imputation
get_acs_race()
Fetch and format ACS race table for imputation
get_age_upper_bounds()
Parse upper bounds from age class labels
get_bg_geom()
Fetch block group shapefile for study region
get_county_fips()
Get county FIPS codes for study region
get_day_groups()
Get day group data table
get_db_table_name()
Resolve full database table name for HTS
get_hh_person_sums()
Aggregate person-level variables to household totals
get_income_bounds()
Get income breaks from labels
get_income_broad()
Recode household income to broad bins
get_income_broad_xwalk()
Create income broad crosswalk
get_is_wfh()
Determine work-from-home status
get_max_income_bin()
Get maximum income bin
get_overlap_allocation()
Compute overlap allocation ratios between polygons
get_puma_geom()
Fetch PUMA shapefile for study region
get_puma_ids()
Get PUMA IDs for study region
get_pumas()
Get PUMA shapefile
get_python_path()
Get Python path from settings
get_settings()
Load and validate weighting pipeline settings
get_state_fips()
Get state FIPS codes for study region
get_target_level()
Extract Target Name and Level from Target String
get_target_map()
Extract target mapping from settings
get_target_methods()
List available target preparation methods
get_test_settings()
Initialize test settings for project
get_tracts_puma_xwalk()
Get tracts-to-PUMA crosswalk from Census
get_user_specs()
Get user specifications for puma groups or clustering method
get_xwalk_sfx_to_sfy()
Reallocate data between polygon sets
group_from_defined_list()
Prepare PUMA/Client Zone groups from defined list
impute_ethnicity()
Impute ethnicity for survey persons using ACS
impute_gender()
Impute gender for ambiguous responses
impute_income_nonrelatives()
Impute household income for nonrelative households
impute_income_pnta()
Impute household income for missing responses
impute_race()
Impute race for survey persons
integerize()
DEPRECATED. Integerize grouped columns to match totals
integerize_probs()
Deprecated Integerize probability columns by sampling#' @description Converts groups of probability columns to binary indicators by sampling, ensuring each row sums to 1. Use for multinomial assignment from probabilities.
kmeans_zone_groups()
Run k-means clustering on PUMA centroids and data
label_targets()
Label Targets Table
load_sf_obj()
Load the SF Object
load_xwalk()
Load tract-to-PUMA crosswalk file
make_binary()
Convert probability columns to binary indicators (max selection)
make_probs_binary()
DEPRECATED. Convert probability columns to binary indicators (sampling)
make_schema_patch_snippet()
Generate a JSON snippet to patch missing schema properties
parse_code_root()
Resolve code root directory
parse_raw_data_root()
Resolve raw data directory
parse_settings_path()
Resolve and validate settings file path
plot_bias_variance()
Create bias/variance plot, if data has been prepared
plot_weight_distribution()
Violin Plot of Household Weight Distribution by Zone Group
plot_weight_fit()
Plot survey vs. target fit by group
plot_zones_map()
Plot a map of the zone groups
popsim_calculate_importance()
Calculate target importance from confidence intervals
popsim_make_control_config()
Create control config for PopulationSim
popsim_make_geoxwalk()
Create geo crosswalk for PopulationSim
popsim_make_input_data()
Create seed and control data for PopulationSim
popsim_make_settings()
Write PopulationSim settings.yaml file
popsim_make_weights()
Run PopulationSim and generate final weights
popsim_search()
Run PopulationSim grid search over expansion factors and bounds
popsim_search_stats()
Compute diagnostics for PopulationSim grid search results
popsim_settings_defaults()
popsim_settings_defaults
popsim_settings_updates()
Update PopulationSim settings for additional geographies
prep_control_counts()
Prepare the control counts for use in reporting.
prep_control_tables()
Prepare the control (PUMS) tables for use in reporting.
prep_hhs_for_income_imputation()
Prepare household-level data for income imputation
prep_initial_expansion_data()
Prepare initial expansion summary table for weighting memo
prep_mape_totals()
Prepare the MAPE totals for use in reporting.
prep_seed_counts()
Prepare the seed counts for use in reporting.
prep_seed_tables()
Prepare the seed (survey) data for use in reporting.
prep_seed_weights()
Prepare the seed (survey) data + weights for use in reporting.
prep_target_adults()
Prepare number of adults target variable for weighting
prep_target_age()
Prepare age target variable for weighting
prep_target_commutemode()
Prepare commute mode target variable for weighting
prep_target_cross()
Prepare cross-tabulated targets for weighting
prep_target_edulevel()
Prepare education level target variable for weighting
prep_target_employment()
Prepare employment target variable for weighting
prep_target_ethnicity()
Prepare ethnicity target variable for weighting
prep_target_gender()
Prepare gender target variable for weighting
prep_target_h_size()
Prepare household size target variable for weighting
prep_target_income()
Prepare income target variable for weighting
prep_target_kids()
Prepare number of children target variable for weighting
prep_target_race()
Prepare race target variable for weighting
prep_target_univstudent()
Prepare university student target variable for weighting
prep_target_vehicles()
Prepare household vehicles target variable for weighting
prep_target_workers()
Prepare household workers target variable for weighting
prep_transit_target()
Prepare transit boardings target by day group
prep_weight_summary()
Prepare the weight summary for use in reporting.
prep_zone_groups_table()
Prepare the zone group table for the weighting memo
prep_zones_sf()
Prepare a simple features object of the zone groups
prepare_acs_income()
Prepare ACS income fractions for imputation
prepare_targets()
Prepare targets for weighting
prepare_trip_adj_model_dt()
Prepare data for trip rate model fitting
prepare_zone_groups()
Create zone group crosswalk for weighting
print_params()
Print loaded run parameters
pums_checksum()
Calculate PUMS checksums
read_from_db()
Read data from database as data.table
read_pums_codebook()
Read PUMS data dictionary from tidycensus
read_schema_properties()
Read the set of properties defined in the JSON schema
read_survey_codebook()
Deprecated: Read survey codebook
record_checksum()
Record checksums of arbitrary data
report_settings_schema_diff()
Console report for settings/schema differences
rescale_trip_rate_factors()
Rescale trip rate factors to minimum 1
run_tabulate_method()
Tabulate target variable by method
sampled_latlon_to_bg()
Convert sampled lat/lon points to block groups
save_daypat_results()
Calculate day pattern probabilities
set_defaults()
Set default values in settings
spectral_zone_groups()
Group PUMAs by sample rate using spectral clustering
summarize_data()
Summarize survey data with confidence intervals
summarize_person_types()
Summarize person type assignment
summarize_pums()
Summarize PUMS data with target updates and confidence intervals
summarize_survey()
Summarize survey data with target updates and confidence intervals
tabulate_target()
Tabulate frequency counts for variable
test_results()
Test project results against database
test_teardown()
Teardown test data after tests
unlist_levels()
Unlist a list to n-levels deep
update_data_root()
Setup weighting data root directory
update_daypat_seed()
Update seed and targets for day pattern model
update_daypat_targets()
Update day pattern model targets with predicted probabilities
update_directories()
Setup project subdirectories
update_income_broad_labels()
Update income_broad value labels
update_rate_report()
Update rate report with adjusted factors
update_settings_pums_vars()
Setup PUMS variable lists
update_targets()
Update targets by combining levels
weighted.median()
Calculate weighted median
weighted.percentile()
Calculate weighted percentile
write_to_db()
Write table to DB
zone_group_plots()
Plot Zone Groups