I love Citi Bike. As of the writing of this blurb, I have taken 1,959 rides, covered 3,600+ miles, spent 360+ hours biking, and saved countless minutes by not having to rely on the subway for intra-Brooklyn travel.
This site uses the General Bikeshare Feed Specification endpoints that Citi Bike publishes to show live bikes, open docks, e-bikes, station capacity, and whether a station is actually accepting pickups or dropoffs, refreshed every 15 seconds or so.
The data aggregation layer lives in a small separate service. Every 15 minutes it fetches station status, refreshes the station catalog when needed, and stores a compact sample for each station with occupancy, dock availability, empty and full flags, and inferred arrivals and departures. From there, another job rolls those samples into daily summaries, which is what powers the station table and keeps the raw samples from piling up forever.
I want to give props to bikemap.nyc, who made an awesome project visualizing a Lyft data dump of user rides. Give it a visit.
The project is open source and available at mattbolanos/pedal-map, if you're into that kind of thing. If you want to support the project or just say thanks, you can buy me a coffee.