In 1979, Forrest Gump started running. 3 years, 2 months, 14 days, 16 hours, and 13,089 miles later he said he was tired... and went home.
I wanted to see how long it would take Forrest (and the Internet) to do it again. So I built a Rails app where every time #runforrestrun is Tweeted, Forrest runs one mile across America.
Forrest runs between the 9 known locations from the movie. The GeoJSON route was calculated using the Mapbox Directions API, which generated thousands of latitude-longitude coordinates following the roads.
A scheduled Sidekiq background task calls the Twitter API every 24-seconds (maximising Twitter's 150 API calls/hour limit) to search for new Tweets using #runforrestrun.
When a new Tweet is found, the Forrest Gump marker moves 1 mile, the map zooms into the new location, and a random Forrest Gump quote appears in a pop-up.
Tweet(s) are stored in a PostgreSQL database and the most recent 50 Tweets are displayed in a custom card. Hash tags, mentions, and links are all clickable.
The site has been optimised for mobile using the Bootstrap grid. You know, for those on the go!