In-class Exercises
Part 1: CartoCSS
- Download today's data.
- Open the CartoCSS documentation.
- Zip and upload the files within fires-aus-viirs data to Carto. This was downloaded on January 27, 2020 from NASA EarthData.
- Make a map with the fire data and style the points with no aggregation (under Style > Aggregation, Points should be selected).
- Using CartoCSS:
- Make the markers 5 pixels wide.
- Give the markers an outline 2 pixels wide.
- Give the fill and stroke of the markers different colors.
Part 2: CartoCSS Zoom Conditions
- Make your markers 5 pixels wide by default.
- When the zoom level is 8 or more, make the markers 10 pixels wide.
- When the zoom level is 12 or more, make the markers 15 pixels wide.
- If you have time, change some other properties by zoom level.
Part 3: CartoCSS Attribute Conditions
- Make your markers a different color when the column
bright_ti4
is over350
. - Remove the code for the previous step and make your markers different colors based on the value of the
daynight
column. - If you have time, make some more styling changes based on the attributes in the data.
Part 4: CartoCSS ramps
- Use ramps to make the marker fill use
jenks
, thebright_ti4
column, and the green-to-blue colorbrewer ramp:marker-fill: ramp([bright_ti4], colorbrewer(GnBu), jenks);