Skip to content

Commit d64cdc7

Browse files
committed
update activity
1 parent 38c0752 commit d64cdc7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

activity_03-01.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ In this activity you'll be using CartoCSS and TileMill to make a choropleth map
2424
10. You should see the *Add Layer* window. Fill in the **ID** field with a short name for the layer. You can name it whatever you want, but it's helpful to name your layer something that describes what it is. (I opted for *tracts*). Select lucasCo&#95;hungarian&#95;tracts.geojson dataset wherever you have it saved. Leave everything else as it is and click **Save &amp; Style**<br /><img src="https://maptastik.github.com/os-webmap-workshop/images/tm-map4.PNG" width=100% />
2525
11. Alright! You've loaded in your data. You'll see some default cartoCSS for our tracts layers has been loaded into the style.mss pane on the right. Also note that in the bottom-left in the *Layers* window, we now have our tracts layer listed. You may initially not be able to the actual map of our tracts. In the *Layers* window, to the right of #tracts is a magnifying glass icon. Click that and the view will zoom to our tracts<br /><img src="https://maptastik.github.com/os-webmap-workshop/images/tm-map5.png" width=100% />
2626
12. Let's take a look at the data? What are we going to map? In the *Layers* window, to the right of #tracts is a table icon. Click it and you should see the attribute table of the tracts data. We've got too attribute fields that were joined from ACS Census data. **t_hung** is total population in the tract claiming Hungarian ancestry. **p_hung** is the percentage of the population in the tract that claims Hungarian ancestry. Because we're making a choropleth map, it's best to use normalized data. We'll be working with the **p_hung** field for this map<br /><img src="https://maptastik.github.com/os-webmap-workshop/images/tm-map6.png" width=100% />
27+
13. In the stylesheet pane, we have our default styling for our tracts layer:<br /><br />`#tracts {
28+
line-color:#594;
29+
line-width:0.5;
30+
polygon-opacity:1;
31+
polygon-fill:#ae8;
32+
}`<br /><br />These style description give the map it's current look, but there are many properties of the polygon's fill and outline that can be edited. You can access the built-in CartoCSS reference by click the curly-brace button on that vertical stack of buttons mentioned earlier. Additionally, Mapbox includes the [reference](https://github.com/mapbox/carto/blob/master/docs/latest.md) on their GitHub page along with [several examples](https://www.mapbox.com/tilemill/docs/crashcourse/styling/) in the TileMill documentation on their website.<img src="https://maptastik.github.com/os-webmap-workshop/images/tm-ref1.png" width=100% />

images/tm-ref1.png

38.6 KB
Loading

0 commit comments

Comments
 (0)