Replace Historic View with animated CitiBike Trip Playback overlay - #4
Draft
Vaibhav-Hariani with Copilot wants to merge 3 commits into
Draft
Replace Historic View with animated CitiBike Trip Playback overlay#4Vaibhav-Hariani with Copilot wants to merge 3 commits into
Vaibhav-Hariani with Copilot wants to merge 3 commits into
Conversation
…tiBike data download Co-authored-by: Vaibhav-Hariani <62775035+Vaibhav-Hariani@users.noreply.github.com>
Co-authored-by: Vaibhav-Hariani <62775035+Vaibhav-Hariani@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove historic mode and add trip overlay feature
Replace Historic View with animated CitiBike Trip Playback overlay
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the Historic View mode entirely and replaces it with a Trip Playback mode that streams real CitiBike trip data as animated Google Maps overlays — always keeping 10 trips active simultaneously.
Data layer (
frontend/trip_data.py— new)s3.amazonaws.com/tripdata/YYYYMM-citibike-tripdata.csv.zipon demandprocessed_data/trips/(gitignored); skips already-cached monthsstarted_at-sorted DataFrameApp changes (
frontend/app.py)fetch_timestamps,fetch_artifact,add_historic_view_stations, and all Historic View sidebar/map logicload_playback_trips()— wrapsload_tripswith Streamlit cacheget_trip_route(slat, slng, elat, elng)— single Google Maps Directions (bicycling) call, cached; coordinates rounded to 4 d.p. (~11 m) to maximise cache hits across trips sharing a station; falls back to straight line on API failurecompute_trip_routes(trips_df)— batch-computes routes for the preloaded slicerender_trip_playback()— injects a self-contained Google Maps JS animation viast.components.v1.html():t=0; simulation clock advances atspeed × real timeopacity 0.9); far-past fades to0.08; far-future shows faintly at0.2[0, 10]simulated-second window to avoid burst restartsOriginal prompt
Created from VS Code.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.