Advanced GIS

In-class Exercise

Part 1: Creating styles with Mapbox

  1. Create an account with Mapbox if you don't already have one.
  2. Go to Styles and create a new style. When picking a template style, start with Bright.
  3. Edit the style. Start with the parks layer (Landuse > landuse_park) and change the color and stroke of parks. Zoom into a city to see your handywork.
  4. Make the colors of the parks layer change by zoom level.
  5. Next look at streets (Roads > road_street). What is the relationship between road_street and road_street_casing?
  6. Next look at buildings (Buildings > building and Buildings > building_top. What does building_top do?

Part 2: Using Mapbox styles in Carto

  1. Publish your style from Part 1.
  2. Click the Preview, develop, and use button once you publish it.
  3. From this page you will need the Access token from the Develop with this style section and the Integration URL from under Use style in GIS apps > CartoDB.
  4. Open a Carto map.
  5. Click on the base map (the bottom layer).
  6. Under Source scroll over to and click Mapbox, then click the + under Style.
  7. Copy your Access token into Enter your access token and Integration URL into Enter your map id/url.
  8. Click Add basemap and your basemap from Mapbox should appear.

Part 3: Adding your own data to Carto

  1. Select the rivers layer (Water > waterway_river) and click the Select data tab.
  2. At what zoom level do rivers become available?
  3. Let's say we want to make rivers visible when zoomed out more. Download Natural Earth's rivers data and go to Tilesets in your Mapbox account and upload the zip file you downloaded. This will take a minute or two to upload and process.
  4. Go back to editing your style.
  5. Click New layer, then click the button next to Source. Find and click on the rivers under Unused sources. The name should start with ne_10m....
  6. Set the Zoom max so that this layer does not overlap with the other rivers layer.
  7. Add a filter to only select features with scalerank less than 5—we only want to show the more prominent rivers.
  8. Click Create layer and style it.