Assignment 3: CartoCSS
This week we talked about some advanced features of CartoCSS. Take this assignment as an opportunity to try these features, improve previous visualizations you've made, and learn a bit about Map Kibera's data.
Resources
Celebrate Google Maps' 10-year anniversary by reading re/code's biography of it.
Advanced CartoCSS Reference (pdf)
This video on Advanced CartoCSS might be helpful.
Part 1: Map Kibera, watsan
Download the watsan (water and sanitation) shapefile from Map Kibera's download page and upload it to your CartoDB account.
Make a CartoDB visualization. Start with a simple visualization wizard and edit the CartoCSS to accomplish the following:
- Add a red outline to the markers of features representing public water points (
watsan
set towater_public
) that have astatus
ofbad
. - Using a variable, make the markers' radius increase as you zoom in. For example, every four zoom levels make the radius increase by 5 pixels.
- Using one conditional statement, style the markers of features with
watsan
set torecyling
[sic] orurban_agriculture
similarly.
Make other changes to the map as you like and provide a public link to the visualization in your submission as well as your CartoCSS.
Part 2: Map Kibera, education
Download the education shapefile from Map Kibera's download page and upload it to your CartoDB account.
Use the students
attribute to make schools with more students larger than schools with fewer students. Not all schools have students
set, and that is okay. You may have to change the type of the students
in CartoDB after you upload it.
Make other changes to the map as you like and provide a public link to the visualization in your submission as well as your CartoCSS.
Part 3: Improve one of your visualizations
Open a visualization you made for Assignment 2 and edit it to use at least one of the CartoCSS concepts covered this week:
- combining conditions,
- variables, and
- using attributes in CartoCSS
Provide a public link to the visualization in your submission as well as your CartoCSS.
Submitting your work
Submit a link to your work and your CartoCSS for each part combined in one PDF. You may optionally choose to include a short paragraph response or summary of your work.