1

I'm currently trying to plot curved trading routes along the sea on a spatial map with R. Results should look something like this: http://spatialanalysis.co.uk/2012/03/mapped-british-shipping-1750-1800/ or this

enter image description here

Can somebody recommend me a package with which this is possible? The main problem are the routes and their "curviness".

I am not very skilled with R (just got started with ggplot2) but I need to know if it is possible, how hard it is and if its better done somehow else what to learn in order to do visualization of this type.

Thx in advance Pavel

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • How far apart are the points? Do they follow great circles or rhumblines in between? – Señor O Jul 30 '15 at 14:49
  • you might want to preprocess in R and then do your plot in gephi. – Henk Jul 30 '15 at 14:57
  • Something with rhumblines/ markes (are thos the same?) would be great!!! The points are in different places in europe, asia and america. So rather far apart. I don't mean circle formed routes like those of airline route visualizations (I suppose this is why you ask) but rather the route from europe to asia going around africa. I should have probably written "non-straight" routes – The Central Scrutinizer Jul 30 '15 at 15:01
  • If the routes are intended to follow physical characteristics (waterways, roads, etc.), then the solution is going to heavily depend on how much of *that* sort of data you have available when trying to draw the routes. I don't know how many of these you plan on doing, but keeping it at least semi-manual seems necessary to guarantee good results. You could maybe set up a system where you use `locator()` to record clicks for intermediate points and then use splines or bezier curves to draw a smooth path through them. – Gregor Thomas Jul 30 '15 at 15:09
  • I think what you really want to do is to digitize those routes into simple linear, spatial features. Though it technically could be done, R is a poor choice to do this kind of work and your best bet would be to do the digitization in QGIS, GRASS, ArcGIS, etc. and then re-import them into R for further analysis if need be. That would be my suggestion... – Forrest R. Stevens Jul 30 '15 at 17:10

1 Answers1

0

you can use the xspline() command to draw the curved splines between points, and one of the packages like maps to draw the underlying maps and look up the city coordinates for splines and labels. May need to transform the coordinates to project on map correctly.

skyebend
  • 1,079
  • 6
  • 19
  • Sorry, I completely forgot to say thanks for the help. The locator function and xspline (or the bezier package) did the job initially! Sadly, after I do the clicking with locator in the window in R, the output in the png files is different. So I guess I will be following Forrest's advice and try my luck with QGIS. Again, Thank you! – The Central Scrutinizer Mar 19 '16 at 16:17