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Equity Dataset
|
| 2 |
+
|
| 3 |
+
This dataset contains MBTA (Massachusetts Bay Transportation Authority) bus service data for Boston Bus Equity analysis.
|
| 4 |
+
|
| 5 |
+
## Dataset Subsets
|
| 6 |
+
|
| 7 |
+
### 1. arrival_departure
|
| 8 |
+
Bus arrival and departure times data (2020-2026).
|
| 9 |
+
|
| 10 |
+
**Schema:**
|
| 11 |
+
- `service_date` (date): Service date
|
| 12 |
+
- `route_id` (string): Bus route identifier
|
| 13 |
+
- `direction_id` (int): Direction (0=outbound, 1=inbound)
|
| 14 |
+
- `half_trip_id` (string): Half trip identifier
|
| 15 |
+
- `stop_id` (int): Bus stop identifier
|
| 16 |
+
- `time_point_id` (string): Time point identifier
|
| 17 |
+
- `time_point_order` (int): Order of time point on route
|
| 18 |
+
- `point_type` (string): Type of point
|
| 19 |
+
- `standard_type` (string): Standard type
|
| 20 |
+
- `scheduled` (datetime): Scheduled arrival/departure time
|
| 21 |
+
- `actual` (datetime): Actual arrival/departure time
|
| 22 |
+
- `scheduled_headway` (float): Scheduled headway in minutes
|
| 23 |
+
- `headway` (float): Actual headway in minutes
|
| 24 |
+
- `year` (int): Year derived from service_date
|
| 25 |
+
- `month` (int): Month derived from service_date
|
| 26 |
+
|
| 27 |
+
**Records:** ~161 million
|
| 28 |
+
**Size:** ~1.9 GB
|
| 29 |
+
|
| 30 |
+
### 2. ridership
|
| 31 |
+
Bus ridership data by trip, season, route, and stop (2016-2024).
|
| 32 |
+
|
| 33 |
+
**Schema:**
|
| 34 |
+
- `season` (string): Season and year (e.g., "Fall 2023")
|
| 35 |
+
- `route_id` (string): Bus route identifier
|
| 36 |
+
- `route_variant` (string): Route variant
|
| 37 |
+
- `direction_id` (int): Direction
|
| 38 |
+
- `trip_start_time` (time): Trip start time
|
| 39 |
+
- `day_type_id` (string): Day type ID
|
| 40 |
+
- `day_type_name` (string): Day type name (weekday, saturday, sunday)
|
| 41 |
+
- `stop_name` (string): Bus stop name
|
| 42 |
+
- `stop_id` (int): Bus stop identifier
|
| 43 |
+
- `stop_sequence` (int): Stop sequence on route
|
| 44 |
+
- `boardings` (float): Number of boardings
|
| 45 |
+
- `alightings` (float): Number of alightings
|
| 46 |
+
- `load_` (float): Passenger load
|
| 47 |
+
- `sample_size` (int): Sample size
|
| 48 |
+
- `year` (int): Year derived from season
|
| 49 |
+
- `season_name` (string): Season name (Fall, Spring, etc.)
|
| 50 |
+
|
| 51 |
+
**Records:** ~7.9 million
|
| 52 |
+
**Size:** ~50 MB
|
| 53 |
+
|
| 54 |
+
### 3. survey
|
| 55 |
+
MBTA 2024 System-Wide Passenger Survey data.
|
| 56 |
+
|
| 57 |
+
**Schema:**
|
| 58 |
+
- `aggregation_level` (string): Level of aggregation
|
| 59 |
+
- `service_mode` (string): Service mode (Bus, Rail, etc.)
|
| 60 |
+
- `reporting_group` (string): Reporting group
|
| 61 |
+
- `measure_group` (string): Measure group
|
| 62 |
+
- `measure` (string): Measure name
|
| 63 |
+
- `category` (string): Category
|
| 64 |
+
- `weighted_percent` (float): Weighted percentage
|
| 65 |
+
- `ObjectId` (int): Object identifier
|
| 66 |
+
- `year` (int): Survey year (2024)
|
| 67 |
+
|
| 68 |
+
**Records:** ~14,000
|
| 69 |
+
**Size:** ~244 KB
|
| 70 |
+
|
| 71 |
+
### 4. gtfs_stops
|
| 72 |
+
GTFS bus stop locations and information.
|
| 73 |
+
|
| 74 |
+
**Schema:**
|
| 75 |
+
- `stop_id` (int): Stop identifier
|
| 76 |
+
- `stop_code` (string): Stop code
|
| 77 |
+
- `stop_name` (string): Stop name
|
| 78 |
+
- `stop_lat` (float): Latitude
|
| 79 |
+
- `stop_lon` (float): Longitude
|
| 80 |
+
- `zone_id` (string): Fare zone
|
| 81 |
+
- `municipality` (string): Municipality name
|
| 82 |
+
- `on_street` (string): Street name
|
| 83 |
+
- `at_street` (string): Cross street
|
| 84 |
+
- `wheelchair_boarding` (int): Wheelchair accessibility
|
| 85 |
+
- `vehicle_type` (int): Vehicle type
|
| 86 |
+
|
| 87 |
+
**Records:** ~10,000
|
| 88 |
+
**Size:** ~550 KB
|
| 89 |
+
|
| 90 |
+
### 5. gtfs_routes
|
| 91 |
+
GTFS route information.
|
| 92 |
+
|
| 93 |
+
**Schema:**
|
| 94 |
+
- `route_id` (string): Route identifier
|
| 95 |
+
- `route_short_name` (string): Short route name
|
| 96 |
+
- `route_long_name` (string): Long route name
|
| 97 |
+
- `route_desc` (string): Route description
|
| 98 |
+
- `route_type` (int): Route type
|
| 99 |
+
- `route_color` (string): Route color (hex)
|
| 100 |
+
- `line_id` (string): Line identifier
|
| 101 |
+
|
| 102 |
+
**Records:** ~400
|
| 103 |
+
**Size:** ~25 KB
|
| 104 |
+
|
| 105 |
+
### 6. census (race, poverty_rates, per_capita_income)
|
| 106 |
+
Boston neighborhood demographic data from Census/ACS (2015-2019).
|
| 107 |
+
|
| 108 |
+
**Files:**
|
| 109 |
+
- `census_race.parquet` - Race/ethnicity by neighborhood
|
| 110 |
+
- `census_poverty_rates.parquet` - Poverty rates by neighborhood
|
| 111 |
+
- `census_per_capita_income.parquet` - Per capita income by neighborhood
|
| 112 |
+
|
| 113 |
+
**Records:** ~30 per file
|
| 114 |
+
**Size:** ~5-11 KB each
|
| 115 |
+
|
| 116 |
+
## Usage
|
| 117 |
+
|
| 118 |
+
```python
|
| 119 |
+
import pandas as pd
|
| 120 |
+
|
| 121 |
+
# Load arrival/departure data
|
| 122 |
+
df = pd.read_parquet("data/arrival_departure/arrival_departure.parquet")
|
| 123 |
+
|
| 124 |
+
# Load ridership data
|
| 125 |
+
ridership = pd.read_parquet("data/ridership/ridership.parquet")
|
| 126 |
+
|
| 127 |
+
# Load survey data
|
| 128 |
+
survey = pd.read_parquet("data/survey/survey.parquet")
|
| 129 |
+
|
| 130 |
+
# Load GTFS data
|
| 131 |
+
stops = pd.read_parquet("data/gtfs/gtfs_stops.parquet")
|
| 132 |
+
routes = pd.read_parquet("data/gtfs/gtfs_routes.parquet")
|
| 133 |
+
|
| 134 |
+
# Load census data
|
| 135 |
+
census_race = pd.read_parquet("data/census/census_race.parquet")
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
## Data Source
|
| 139 |
+
|
| 140 |
+
- MBTA Open Data Portal: https://mbta-massdot.opendata.arcgis.com/
|
| 141 |
+
- Boston Planning & Development Agency (BPDA)
|
| 142 |
+
|
| 143 |
+
## License
|
| 144 |
+
|
| 145 |
+
This dataset is derived from publicly available MBTA and City of Boston data.
|
| 146 |
+
|
| 147 |
+
## Citation
|
| 148 |
+
|
| 149 |
+
If you use this dataset, please cite:
|
| 150 |
+
|
| 151 |
+
```
|
| 152 |
+
@dataset{boston_bus_equity_2025,
|
| 153 |
+
title={Boston Bus Equity Dataset},
|
| 154 |
+
author={Boston Bus Equity Team},
|
| 155 |
+
year={2025},
|
| 156 |
+
publisher={HuggingFace},
|
| 157 |
+
url={https://huggingface.co/datasets/LumenscopeAI/BostonBusEquity}
|
| 158 |
+
}
|
| 159 |
+
```
|