The percentage of same-sex-couple households has declined on Capitol Hill, but increased in many other Seattle neighborhoods, since 2000.
Related story: FYI Guy: Is Seattle’s ‘gayborhood’ vanishing?
Click on a census tract to see the data.
down 0 to 4
up 0 to .8
up .9 to 1.3
up 1.4 to 2.8
up 2.9 to 4.9
1 – 2%
2 – 3%
3 – 4%
4 – 5%
5+
var map = L.map('map', {minZoom:11}).setView([37.8, -96], 5);
L.tileLayer('http://tile.stamen.com/toner-lines/{z}/{x}/{y}.jpg', { maxZoom: 18, opacity:.5, attribution: 'Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.' }).addTo(map);
// get color depending on population density value function getColor(d) { return d > 5 ? '#BD0026' : d > 4 ? '#F03B20' : d > 3 ? '#FD8D3C' : d > 2 ? '#FECC5C' : d > 1 ? '#FFFFB2' : d > 0 ? '#ffffff' :
'#c2c2c2'; }
function getColor2(d) {
return d >= 2.9 ? '#BD0026' : d >= 1.4 ? '#F03B20' : d >= .9 ? '#FD8D3C' : d >= 0 ? '#FECC5C' : d >= -4 ? '#5CA2D1' :
'#c2c2c2'; }
function style(feature) { return { weight: 2, opacity: 1, color: 'white', dashArray: '', fillOpacity: 0.7, fillColor: getColor(feature.properties.couples_pct_2010) // fillColor: 'blue' }; }
function style2(feature) { return { weight: 2, opacity: 1, color: 'white', dashArray: '', fillOpacity: 0.7, fillColor: getColor(feature.properties.couples_pct_2000) // fillColor: 'blue' }; }
function style3(feature) { var num3 = (feature.properties.point_change); var roundnum3 = num3.toPrecision(2); return { weight: 2, opacity: 1, color: 'white', dashArray: '', fillOpacity: 0.7, fillColor: getColor2(roundnum3) // fillColor: 'blue' }; }
function highlightFeature(e) { var layer = e.target;
layer.setStyle({ weight: 3, fillColor: '#666', dashArray: '', fillOpacity: 0.9 });
// if (!L.Browser.ie && !L.Browser.opera) { // layer.bringToFront(); // }
// info.update(layer.feature.properties); }
var geojson;
function resetHighlight(e) { geojson.resetStyle(e.target); // info.update(); }
function onEachFeature(feature, layer) { var num1 = (feature.properties.__same_sex * 100); var roundnum1 = num1.toPrecision(2); var num2 = (feature.properties.__same_sex2 * 100); var roundnum2 = num2.toPrecision(2); var num3 = (feature.properties.point_change); var roundnum3 = num3.toPrecision(2);
for (i = 0; i < 33; i++) { if (num3 > -10) { layer.bindPopup('
2000:' + roundnum1 + '% of households
2012*: ' + roundnum2 + '% of households
Percentage point difference:
' + roundnum3 + '
'); } };
for (i = 0; i < 33; i++) { if (num3 > -10) { layer.on({ mouseover: highlightFeature, mouseout: resetHighlight // click: zoomToFeature });}} }
geojson = L.geoJson(newtract, { style: style3, onEachFeature: onEachFeature }).addTo(map);
// var geojson2 = new L.geoJson(water, { // style: water, // onEachFeature: onEachFeature // }).addTo(map);
var waterlayer = L.geoJson(water2, {fillColor:"white", fillOpacity:1, weight:0, zIndex:10000}).addTo(map);
$("#firstdata").click(function(){ map.removeLayer(geojson); $("#pointlegend").css( "display","none" ); $("#pctlegend").css( "display","inline" );
geojson = L.geoJson(newtract, { style: style2, onEachFeature: onEachFeature }).addTo(map); L.geoJson(water2, {fillColor:"white", fillOpacity:1, weight:0, zIndex:10000}).addTo(map); } );
$("#seconddata").click(function(){ map.removeLayer(geojson); $("#pointlegend").css( "display","none" ); $("#pctlegend").css( "display","inline" ); geojson = L.geoJson(newtract, { style: style, onEachFeature: onEachFeature }).addTo(map); L.geoJson(water2, {fillColor:"white", fillOpacity:1, weight:0, zIndex:10000}).addTo(map); } );
$("#change").click(function(){ map.removeLayer(geojson); $("#pointlegend").css( "display","inline" ); $("#pctlegend").css( "display","none" ); geojson = L.geoJson(newtract, { style: style3, onEachFeature: onEachFeature }).addTo(map); L.geoJson(water2, {fillColor:"white", fillOpacity:1, weight:0, zIndex:10000}).addTo(map); } );
map.attributionControl.addAttribution('U.S. Census Bureau'); map.fitBounds(geojson.getBounds());
* 2012 American Community Survey estimates are averages of five years of data, from 2008-2012
Source: U.S. Census Bureau
Garland Potts / The Seattle Times
Go here to leave a comment about this story.