somemone commited on
Commit
82178d5
·
verified ·
1 Parent(s): c263bcc

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ pretty_name: AC Transit Automatic Passenger Counter Records, 2019-2026
6
+ size_categories:
7
+ - 100M<n<1B
8
+ task_categories:
9
+ - time-series-forecasting
10
+ tags:
11
+ - transit
12
+ - transportation
13
+ - mobility
14
+ - urban
15
+ - geospatial
16
+ - bay-area
17
+ configs:
18
+ - config_name: default
19
+ data_files: "year=*/month=*/data_0.parquet"
20
+ ---
21
+
22
+ # AC Transit Automatic Passenger Counter Records, 2019-2026
23
+
24
+ Stop-level boarding and alighting counts for the AC Transit bus network in
25
+ Alameda and Contra Costa counties, California, from January 2019 through
26
+ May 2026. The records come from the automatic passenger counters (APCs)
27
+ mounted at the doors of the buses: one row per stop event, with the number of
28
+ passengers who got on, the number who got off, and the load the bus left with.
29
+
30
+ 89 monthly Parquet files, ~5.9 GB, partitioned `year=/month=`. The span covers
31
+ the pre-pandemic baseline, the March 2020 collapse, and the uneven recovery
32
+ that followed, which is the comparison the data was assembled to support.
33
+
34
+ ## Loading
35
+
36
+ ```python
37
+ import pandas as pd
38
+
39
+ df = pd.read_parquet(
40
+ "hf://datasets/somemone/ac-transit-apc/year=2019/month=2/data_0.parquet"
41
+ )
42
+ ```
43
+
44
+ Or the whole thing as a partitioned dataset:
45
+
46
+ ```python
47
+ import pyarrow.dataset as ds
48
+ from huggingface_hub import snapshot_download
49
+
50
+ path = snapshot_download("somemone/ac-transit-apc", repo_type="dataset")
51
+ table = ds.dataset(path, format="parquet", partitioning="hive")
52
+ ```
53
+
54
+ ## Schema
55
+
56
+ | column | type | notes |
57
+ | --- | --- | --- |
58
+ | `route` | string | route as reported by the vehicle |
59
+ | `route_id` | string | GTFS route identifier |
60
+ | `stop_id` | string | GTFS stop identifier |
61
+ | `event_timestamp` | timestamp[us] | when the doors opened |
62
+ | `service_date` | timestamp[us] | service day the event belongs to |
63
+ | `boardings` | int32 | passengers on |
64
+ | `alightings` | int32 | passengers off |
65
+ | `passenger_load` | int32 | load leaving the stop |
66
+ | `latitude` | double | stop position |
67
+ | `longitude` | double | stop position |
68
+ | `door_lift_flags_possibly` | string | vehicle flag field; its low bit separates the two APC-equipped subfleets |
69
+
70
+ ## Working with it
71
+
72
+ These are **raw counts, not ridership estimates.** Two corrections matter
73
+ before the numbers mean what you want them to:
74
+
75
+ - **Partial fleet coverage.** Not every bus carries a working APC, and the
76
+ equipped share varies by route and by month. Summing raw boardings
77
+ undercounts actual ridership, unevenly. Scale by the observed capture rate
78
+ per (route, subfleet) before comparing across routes or over time. The low
79
+ bit of `door_lift_flags_possibly` separates the two subfleets, which have
80
+ materially different capture rates.
81
+ - **Drift against reported totals.** Even after capture correction, monthly
82
+ sums do not match the agency's National Transit Database filings. A
83
+ per-month calibration factor closes the gap.
84
+
85
+ `passenger_load` is the counter's running estimate and accumulates error along
86
+ a trip; it is more useful for relative load profiles than as an absolute.
87
+
88
+ A small number of coordinates are wrong. In a representative month, ~0.1% of
89
+ rows across ~15 stop IDs fall outside the service area, and the extremes land
90
+ hundreds of kilometres away. Most apparent outliers are legitimate -- the
91
+ network reaches Fremont, and the Dumbarton corridor crosses to Palo Alto --
92
+ but do not derive a bounding box from `min`/`max` without filtering first.
93
+
94
+ ## Privacy
95
+
96
+ The records contain no operator, vehicle, or fare-media identifiers, and no
97
+ rider-level information of any kind. A row is a count at a stop at a time.
98
+ Coordinates are bus stop positions.
99
+
100
+ ## Provenance and license
101
+
102
+ The underlying records originate with the Alameda-Contra Costa Transit
103
+ District (AC Transit). Released here under
104
+ [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). This dataset is not
105
+ affiliated with or endorsed by AC Transit.
106
+
107
+ ## Related
108
+
109
+ Built for the **[AC Transit Ridership Explorer](https://github.com/somemone0/ac-transit-ridership)**,
110
+ an interactive map of weekly stop-level ridership and pandemic recovery
111
+ ([live](https://ac-transit-ridership-385939155005.us-west1.run.app)). That
112
+ repository carries the capture-correction and calibration pipeline these
113
+ records feed.