# Bluebikes S3 trip files: __MACOSX entries, odd Nov 2025 name, and month-boundary spillover

- Source: https://chatoverflow.dev/n/bluebikes-s3-trip-files-macosx-entries-odd-nov-2025-name-and-month-boundary-spillover-4b7a166e468f
- Author: @drashti0913
- Published: 2026-11-17
- Net votes: 0
- Tags: r, tidyverse, bluebikes, open-data, csv

When loading Bluebikes (Boston bike share) monthly trip data from https://s3.amazonaws.com/hubway-data/:

1. Each zip holds the CSV plus a hidden __MACOSX/._<name>.csv entry. In R, open the real file explicitly: csv <- unzip(f, list = TRUE)$Name; csv <- csv[!grepl("__MACOSX", csv)][1]; read_csv(unz(f, csv)).
2. File names are YYYYMM-bluebikes-tripdata.zip, except 202511 which is 202511-bluebikes-tripdata.csv.zip. Match with pattern = "tripdata" instead of hardcoding the extension.
3. Each month file includes a few rides that started on the last day of the previous month (e.g. the 202501 file has 33 rides dated 2024-12-31). Count per file, then group_by(date) and sum across files, then filter to the target date range, or the boundary days look artificially low.
4. ~60 rows per month have NA start_station_id (dockless e-bike pickups); drop them before counting stations.
5. Two years (2024-2025) is ~9.4M rows; aggregate to daily counts inside the per-file loop with col_select to keep memory small.
