diff --git a/map/colleges.tsv b/map/colleges.tsv index a072ab6..b825c8e 100644 --- a/map/colleges.tsv +++ b/map/colleges.tsv @@ -136,7 +136,7 @@ region active city state country lat long college_abbr college college_long 8A 1 Marquette MI USA 46.559603 -87.404487 Northern Michigan Northern Michigan University 8A 1 Madison WI USA 43.076592 -89.412487 Wisconsin University of Wisconsin-Madison 8A 1 Northfield MN USA 44.461768 -93.182817 St. Olaf St. Olaf College -8A 1 St. Peter MN USA 44.322162 -93.968777 Gustavus Adolphus Gustavus Adolphus College +8A 0 St. Peter MN USA 44.322162 -93.968777 Gustavus Adolphus Gustavus Adolphus College 8A 1 St. Paul MN USA 44.937893 -93.169043 Macalester Macalester College 8A 1 Carleton MN USA 44.461365 -93.155826 Carleton Carleton College 8A 1 Sioux Falls SD USA 43.522604 -96.739689 Augustana Augustana University diff --git a/map/script.js b/map/script.js index e4ba6d9..265d3f0 100644 --- a/map/script.js +++ b/map/script.js @@ -162,13 +162,23 @@ d3.tsv("colleges.tsv", function(error, colleges) { .attr('class', 'region-label region-label-region region-label-id') .text(d => d.id); + var circleClasses = { + 2: 'circle-large', + 1: 'circle-small', + 0: 'circle-inactive', + } + var circleRadii = { + 2: 4, + 1: 2, + 0: 2, + } main.selectAll('.place') .data(colleges) .enter() .append('circle') - .attr('class', d => (d.active > 1) ? 'circle-large' : 'circle-small') + .attr('class', d => circleClasses[d.active]) .attr('transform', d => 'translate(' + projection(d.coordinates) +')') - .attr('r', d => d.active * 2); + .attr('r', d => circleRadii[d.active]); const voronoi = d3.geom.voronoi() @@ -289,6 +299,10 @@ svg.append("text") .attr('class', 'circle-small') .attr('transform', d => 'translate(-16,68)') .attr('r', 2); + legend.append('circle') + .attr('class', 'circle-inactive') + .attr('transform', d => 'translate(-16,92)') + .attr('r', 2); legend.append('text') // .attr('class', 'place-label') .attr('class', 'legend-label-medium') @@ -299,6 +313,11 @@ svg.append("text") // .attr('class', 'place-label') .attr('class', 'legend-label-medium') .text('Attends tournaments'); + legend.append('text') + .attr('transform', d => 'translate(0,96)') + // .attr('class', 'place-label') + .attr('class', 'legend-label-medium') + .text('Inactive'); legend.append('text') .attr('transform', d => 'translate(32,-40)') diff --git a/map/style.css b/map/style.css index 2de8fed..57fee97 100644 --- a/map/style.css +++ b/map/style.css @@ -94,6 +94,11 @@ /*font-family: 'BentonSansCond', sans-serif;*/ } +circle.circle-inactive { + fill: #888; + stroke: #666; + stroke-width: 1px; +} circle.circle-small { /*fill: #3dab89d8;*/ fill: white;