Skip to content

Instantly share code, notes, and snippets.

@stiles
Created February 24, 2012 21:52
Show Gist options
  • Save stiles/1904014 to your computer and use it in GitHub Desktop.
Save stiles/1904014 to your computer and use it in GitHub Desktop.
TileMill Poverty Map US Counties
<h3>Poverty Rate</h3>
<ul class="scale">
<li><span class="colorbox" style="background:#c5e0e1; color:#c5e0e1;">▉</span> 0-10%</li>
<li><span class="colorbox" style="background:#8BC0BF; color:#8BC0BF;">▉</span> 10-15%</li>
<li><span class="colorbox" style="background:#51A09E; color:#51A09E;">▉</span> 15-20%</li>
<li><span class="colorbox" style="background:#18817E; color:#18817E;">▉</span> 20-25%</li>
<li><span class="colorbox" style="background:#14615F; color:#14615F;">▉</span> > 25%</li>
</ul>
@scale1: #999;
@scale2: #c5e0e1;
@scale3: #8BC0BF;
@scale4: #51A09E;
@scale5: #18817E;
@scale6: #14615F;
Map {
background-color: #333;
}
#countries {
::outline {
line-color: #666;
line-width: 2;
line-join: round;
}
polygon-fill: #666;
}
#lakes [ScaleRank < 3] {
line-color:#333;
line-width:0.5;
polygon-opacity:1;
polygon-fill:#333;
}
#poverty {
line-color:#fff;
line-width:0.5;
polygon-opacity:1;
polygon-fill:#e6e6e6;
[Percent > 0] { polygon-fill:@scale2; }
[Percent > 10] { polygon-fill:@scale3; }
[Percent > 15] { polygon-fill:@scale4; }
[Percent > 20] { polygon-fill:@scale5; }
[Percent > 25] { polygon-fill:@scale6; }
}
#states [ISO='USA'] {
line-color:#fff;
line-width:1;
polygon-opacity:0;
polygon-fill:#666;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment