Lab 2: CartoDB

Using spatial SQL to CartoDB to create curved line features

Q1: In general terms to make a map as such first one would have to obtain the data. This is from data sources such as that at naturalearthdata.com which can be easily imported into CartoDB as a table making polygons representing the boundaries for every country.

The next key step is the Post GIS SQL which enables the addition of new projections and transformations of features. This is a major advantage of CartoDB compared to others like MapBox. Then the SQL query must be put in to convert the polygon data into points. Then a copy of the data should be made to provide another layer for the map. In addition, a spatial reference system from spacialreference.org should be copied from the site and entered into the CartoDB query.

The next step is to turn the points into lines using UB in this particular example as the starting point by using a SET statement followed by a SELECT statement (ST_Transform , ST_Segmentize, and ST_MakeLine) These make them turn into lines and make them start at the proper location.

The next and close to final part is styling the map, such as selecting the base map and using the wizards to alter the thickness, color, and/or opacity of the line. Also adding the other layer (the points) is essential to create the visualization or map with both the curved lines and the points. Then after those are applied, you can select which features to have hidden or show up by hovering over an area or clicking on it. Once finished, the map can be shared and embedded into a website or a blog page.