A connection map shows the connections between several positions on a map. The link between 2 locations is usually drawn using great circle: the shortest route between them. It results in a rounded line that gives a really pleasant look to the map. In R, this is made possible thanks to libraries like
The following example is a step by step approach to great circles in
R. It will guides you through the use of the
gcintermediate() function of the
geosphere package. It notably tackles the issue that arises when 2 cities have their shortest distance passing behind the globe. Explore it here.
Background map and circle
Start by remembering how to plot a absic background map with circles to show 3 cities
The following map shows where surfers travel based on their twitter activity. Thousands of tweets containing
#surf have been recovered and geocoded. Home and current locations are represented using great circles following the method described above.
Note: This project is extensively described in data-to-viz.comAbout the project Code