# A fee for a whole zone on one day: what happened to ride-hail trips

On 5 January 2025 New York began charging app ride-hail trips that start, end or run in Manhattan below 60th Street a
US$1.50 fee, everywhere in the zone at once. This study asks what happened to trips touching the zone, and how sure
anyone can be, using the city's public trip records. It compares three methods (before and after, difference in
differences, synthetic control) and runs each again on 200 placebo dates when nothing launched. The page is
`index.html`.

## Data

The Taxi and Limousine Commission's High Volume For-Hire Vehicle trip records, monthly parquet files at
`https://d37ci6vzurychx.cloudfront.net/trip-data/fhvhv_tripdata_YYYY-MM.parquet`, published as NYC open data. `tools/aggregate.py` reads only the needed columns of each file and keeps only the aggregate.

The aggregates (pickup date x hour x pickup zone x drop-off zone class, 2022-01 to 2026-01, with fare, driver pay,
tips, the zone fee, miles and trip durations from 2024 on) are described by `data/aggregates/MANIFEST.json` (source URL, columns read, rows per file). The
public download carries the manifest and the daily series built from them. Fare and driver
pay are in the aggregates and not analysed here. Companies are pooled: the company field was never read.

## Reproduce

Python 3.12 with numpy, scipy, pyarrow and duckdb.

```
# rebuild the aggregates
MODE=counts bash tools/pull_months.sh python3 data/aggregates 20 2022-01 2022-02 ... 2023-12
bash tools/pull_months.sh python3 data/aggregates 20 2024-01 2024-02 ... 2026-01
# zone classes (already in data/zones.json): from a January 2025 zone-pair count with the fee field
python3 -I tools/classify_zones.py data/zone-pairs-2025-01.csv data/zones.json data/taxi_zone_lookup.csv
# series, estimates, page
python3 -I tools/build_series.py data/aggregates data/zones.json data/taxi_zone_lookup.csv results
python3 -I tools/estimate.py results protocol-r1.json
# Added after the results: placebo drift diagnostics (fee shares need data/aggregates)
python3 -I tools/diagnostics.py results protocol-r1.json data/aggregates data/zones.json data/taxi_zone_lookup.csv
python3 -B tests/test_study.py
python3 -I -B site/render.py
```

From the public download, `tools/estimate.py` and the tests run on the published `results/daily.csv` and
`results/donors.parquet`, and the replay test checks that they reproduce `results/summary.json` exactly.

## Files

- `tools/aggregate.py`, `tools/pull_months.sh`: the column reader and its driver.
- `tools/classify_zones.py`, `data/zones.json`: the fee and edge zones, from the fee field alone.
- `tools/build_series.py`: daily trips touching the zone, the rest, and the donor zones.
- `tools/estimate.py`: the three methods, the 200 placebo dates, the official-period reconciliation.
- `tools/diagnostics.py`, `results/change1-diagnostics.json`: a change to the protocol made after the results were
  seen: how the placebo estimates drift with the anchor date, the launch net of that drift, and the fee share of each
  group. It reuses `tools/estimate.py` unchanged and changes no declared result.
- `protocol-r1.json`, `predictions-r1.json`: the design and predictions, committed before the run.
- `results/summary.json`: every estimate and every placebo estimate; `results/weekly.csv`: the weekly series.
- `site/render.py`, `site/page.css`: the page; every number comes from `results/`, and the claims the text makes are
  asserted in `render.py`.
- `vendor/viz-design-system/`: the chart kit (version 2.3.0) with its licences.

## Licence of the data

NYC open data. The trip records are submitted by the dispatching bases; the Commission says it cannot guarantee their
accuracy or completeness.

Some files are packed in congestion-fee-ride-hail-data-1.zip; unzip it here to restore the full export, which the manifest lists file by file.
