Twitter Trajectories and Our Ever Shrinking Small World
When we were doing the Twitter Black Friday analysis I started to get curious about how Tweets can give us insights to the trajectories of people. Lots of folks travel over Thanksgiving and likely even more get out of the house on Black Friday to do some shopping. We were curious how far from home people were Tweeting on Black Friday and what those trajectories look like.
To answer the question we took advantage of the variety of metadata made available through Twitter streaming API. We’d already mapped the location of Tweets from mobile devices when we did our original analysis and now we wanted to add an origin to the destination data. To get a rough proxy for the home of each Tweet we queried the profile location for each user then connected it to the location for where the Tweet was made. Then generated lines to connect the two, calculated a distance for each and gave the time stamp of the Tweet to the line connecting the points.
The results are pretty interesting (warning the live map has a lot of data a takes a bit to load). Below is an image of the map showing all 12,244 trajectories:
Each trajectory is color coded by it’s length – dark orange being longest and light orange being shortest.
One of the nice things about GeoCommons is when you upload data it will automatically calculate statistics for your data. In this case the statistics tell an interesting story. The range of trajectory lengths went from “0″ (user tweeted from home) to 33,296 km (user went from Los Angeles USA to Auckland New Zealand).
The average (mean) Tweet trajectory was 944 km. This is a little misleading since the standard deviation for the sample is so high – 3544.63. Meaning there was a lot of variation in the values with really long trips like LA to Auckland which skews the distribution. In this case a better indicator is probably the median, which is the middle number in a rank order distribution of the values (1,2,3,5,10,10,11,12,12,13,135 -> median = 10). For the Twitter trajectories the median was 18 km. Which means the vast majority of people stayed fairly close to home while a small minority went very far away for their Black Friday activities. You can see the same pattern in a histogram of the data.
As well as in the map when you filter down to trajectories shorter than 166 km – there are a bunch!
The vast majority of Tweet trajectories fall in the bin between 0 and 160 kms or so. If we really want to get geeky about it – the distribution has power law or exponential characteristics often seen in small world networks. The majority of our connections are local but a few global connections is what allows information to efficiently span the globe at warp speed – six degrees of speration – the Kevin Bacon Game etc etc. It does seem to really get at the essence of Twitter as a hyper efficient broadcast channel for the globe.
* Many thanks to @BillfGreer and @cwhelms for help with the data munging!
4 Responses to Twitter Trajectories and Our Ever Shrinking Small World
Leave a Reply Cancel reply
About Us
Welcome to the GeoIQ blog. We write about features of our GeoIQ analytics engine, what is new and exciting in the GeoCommons community, and general industry thought leadership and discussions of geospatial data visualization and analysis.
Please explore what we're working on and let us know if you have any questions or ideas!
New GeoCommons Maps- RW-map1 lynnr321
- NHGH 1941 data JCReut
- RW-map1 lynnr321
- SRE Citas axas_@hotmail.com
- US FactFinder (2010 Contiguous States) kobl0019
- Colorado Hunting Orientation Map pizard
Recent Comments
- Bargain homes in Murrieta on A Quick Test Drive of Google Table Fusion
- Bargain homes in Murrieta on A Quick Test Drive of Google Table Fusion
- balayı otelleri on Dataset of the Day: Early Voting—November 3, 2008
- haber,haberleri,başbakan on Dataset of the Day: Early Voting—November 3, 2008
- realtor tampa bay on The Spillover Effects of Foreclosures









[...] This post was mentioned on Twitter by geocommons, SeanGorman. SeanGorman said: A little fun with calculating Twitter trajectories and what tell us about global and local connections http://bit.ly/i37bEE [...]
Very Interesting article… If you have the Time Stamps and travel distances could you also tell “at what time of day” people traveled the farthest? For example, people traveled the farthest between the times of 12 noon and 3pm on Black Friday? it seems that would be interesting information as well in this research. great article, thanks.
Something else which could skew the data is the fact that the most direct route from LA to New Zealand is about 10,500 miles.
Hi Neil – interesting question. We have the time of the Tweet and their profile location but we don’t necessarily know when they traveled. They could have gone from LA to Auckland on a Monday but not tweeted till Thursday in their new location. It is not ideal but Twitter is an open data set anyone can use for free so the trade off is not bad.
Good point Paul – the distance algorithm is not calculating the shortest path. something we should tweak next time around.