Skip to content

Average Weighted Distance

Brice Nichols edited this page Dec 29, 2023 · 17 revisions

One measure of accessibility is the average distance someone must travel to access good or services. In equity analysis, average distances can be compared across equity groups. The script distance_indicator.py in this repository provides this measure using a technique described below.

Usage

Virtual Environment

Activate the 'equity_tracker' Anaconda virtual environment as follows:

  • conda activate equity_tracker

Input

The script relies on database tables from Elmer, regional transit GTFS data, and equity geography definitions specific to the Equity Tracker project. Elmer data tables includes quintile equity geography definitions in the tables "equity.blockgroup_shares" and "equity.blockgroup_counts". This file identifies which quintile every block group is in for all equity categories. This file is produced from the equity_blockgroups.R script within this repository. Users can specify which year these quintile defintions are used by the script by changing the equity_quintiles_year variable at the top of the distance_indicator.py script. Elmer also sources parcel centroid and geographic lookups to create geographic dataframes with Geopandas. OFM household totals by parcel are joined to this data and used as weights.

Script Execution

From the Anaconda prompt within the equity-tracker repository, the script can now be run with python distance_indicator.py. Ensure that the equity_tracker conda environment is activated. Settings for analysis year and data locations are set within configuration.toml.

Output

This script will produce 5 files in the local working directory.

blockgroup_hct_distance.csv

This file provides an average weighted distance (in miles) for 6 equity groups and transit submodes. The table below provides an example of the expected output. These data are aggregated based on averages across block groups within each quintile.

aggregation quintile access_to wt_avg_miles
poc High light_rail 5.93853487039769
poc Low light_rail 15.199311710470578
poc Low Medium light_rail 11.418237648161703
poc Medium light_rail 9.305563044192095
poc Medium High light_rail 7.937733573020143

Results are produced across quintiles of each equity group as follows:

  • People of Color
  • Income
  • Disability
  • Youth
  • Older
  • English Language Proficiency

For each of these groups averages are computed for distances to stations/stops for different types of high-capacity transit:

  • all HCT modes (whichever is nearest)
  • Light Rail
  • Commuter Rail
  • Ferry
  • BRT

tract_hct_distance.csv

This file is similar to blockgroup_hct_distance.csv but the aggregations are performed at the tract level. The results should be similar but not identical to those computed using block group definitions.

blockgroup_hct_distance_full.csv

This file includes the average weighted distance to each type of transit submode and each equity definition, but with disaggregate results for each block group.

tract_hct_distance_full.csv

This file includes the average weighted distance to each type of transit submode and each equity definition, but with disaggregate results for each tract.

Calculation Method

The detailed calculation process can be followed through comments in the distance_indicator.py script, but a brief description is also provided here.

This script starts by calculating the nearest distance to a transit stop/station for each parcel. This is done iteratively, where each parcel will have its nearest light rail/commuter rail/ferry/etc. stop identified. Once the nearest parcel is identified and the straight-line distance between each parcel centroid and stop is identified, a parcel weighting procedure is followed.

Weights account for multiple households living within a parcel and ensures multi-family properties are fully taken into account. This weight comes from OFM estimates in Elmer that includes total households per parcel. Weighted average distance is calculated by multiplying the distance times the number of households, and dividing by the total household population in a given area. In this case, the area is defined as the block groups associated with each quintile in an equity group. For example, the quintile representing block groups with the highest concentration of People of Color (quintile labeled "High") might include 20 different block groups. All parcels within those block groups will be assigned an average distance by multiplying household population (in those 20 block groups) times total distance (traveled from each parcel in those 20 block groups), divided by total population (within those 20 block groups). The result is an average for each of the quintiles for each measure and transit submode.

The results (already weighted on household population at the parcel level) are weighted again by the number of people within an equity definition on a given block group. For comparison the same type of weight is calculated for people not in an equity definition. For instance, if Block Group 1 has a total population of 1000 and 700 are included as Low Income and an average distance of 0.5 miles, the weighted distance for that block group is 700 * 0.5. For the same block group, the weight for people outside that equity group would be 300 * 0.5 This accounts for variations in equity concentrations across block groups and allows a more direct comparison between people in equity groups compared to people not in equity groups.