← Advanced GIS

In-class Exercises

Part 1: CartoCSS

  1. Download today's data.
  2. Open the CartoCSS documentation.
  3. Zip and upload the files within fires-aus-viirs data to Carto. This was downloaded on January 27, 2020 from NASA EarthData.
  4. Make a map with the fire data and style the points with no aggregation (under Style > Aggregation, Points should be selected).
  5. Using CartoCSS:
    1. Make the markers 5 pixels wide.
    2. Give the markers an outline 2 pixels wide.
    3. Give the fill and stroke of the markers different colors.

Part 2: CartoCSS Zoom Conditions

  1. Make your markers 5 pixels wide by default.
  2. When the zoom level is 8 or more, make the markers 10 pixels wide.
  3. When the zoom level is 12 or more, make the markers 15 pixels wide.
  4. If you have time, change some other properties by zoom level.

Part 3: CartoCSS Attribute Conditions

  1. Make your markers a different color when the column bright_ti4 is over 350.
  2. Remove the code for the previous step and make your markers different colors based on the value of the daynight column.
  3. If you have time, make some more styling changes based on the attributes in the data.

Part 4: CartoCSS ramps

  1. Use ramps to make the marker fill use jenks, the bright_ti4 column, and the green-to-blue colorbrewer ramp:
    marker-fill: ramp([bright_ti4], colorbrewer(GnBu), jenks);