I am trying to illustrate global trade flows within CartoDb. Flows are visualized by a line connecting two lat/long points on a map. The size of the flow would be represented by the width of the line. I have a lat/long and trade magnitude file but cannot figure out, 1) how to get the points to connect in CartoDb using PostGIS functions and 2) how to adjust the line width based on the value using CartoCSS.
Pasted below is the head of the data:
id start_lat start_lon end_lat end_lon Value 1 32.89595056 -97.0372 35.04022222 -106.6091944 100 2 41.979595 -87.9044641 30.19453278 -97.66987194 500 3 32.89595056 -97.0372 41.93887417 -72.68322833 750 4 18.43941667 -66.0018333 41.93887417 -72.68322833 1200
Here's an example of the type of visualization I am trying to make. More or less it is a spatial sankey diagram:
from 2012 GEA Global Energy Assessment