Checking all matches for 0-0 and replays.

master
Ben Burlingham 9 years ago
parent 5b960371b2
commit 9157f31b3a
  1. 72
      index.html
  2. 23
      js/bundle.js
  3. 2
      js/diagram.js
  4. 21
      js/index.js

@ -21,7 +21,7 @@
<blockquote>
Explore D3's chord diagrams using World Cup match data. Use Haskell to build JSON parsers.
<br><br>
Visualization should invite interaction to create and answer questions such as:
The visualization should invite interaction to create and answer questions such as:
<ul>
<li>How many times has Iran competed in a World Cup?</li>
<li>Which teams played the in final in 1986?</li>
@ -53,34 +53,65 @@
</div>
</div>
<div class="notes">
<h5>TODO</h5>
<!-- <div class="notes">
1930: OK
1934: Patched.
Italy Spain replay 1-0!
OK Italy Spain replay 1-0!
1938:
Switzerland Germany 1-1 replay 4-2
Cuba Romania 3-3 replay 3-2
Brazil Czech 1-1 replay 2-1
OK Switzerland Germany 1-1 replay 4-2
OK Cuba Romania 3-3 replay 3-2
OK Brazil Czech 1-1 replay 2-1
1950: OK
1954:
Germany Turkey playoff 7-2
Switzerland Italy playoff 4-1
Germany Hungary final 3-2
OK Germany Turkey 4-1 playoff 7-2
OK Switzerland Italy 2-1 playoff 4-1
OK Germany Hungary 3-8 final 3-2
1958:
Northern Ireland Czech playoff 2-1
Wales Hungary replay 2-1
Sweden Wales 0-0
Brazil England 0-0
Russia England replay 1-0
OK Northern Ireland Czech 1-0 playoff 2-1
OK Wales Hungary 1-1 replay 2-1
OK Russia England 1-0 replay 2-2
1962:
Germany Italy 0-0
Brazil Czech Republic 0-0
Hungary Argentina 0-0
England Bulgaria 0-0
1966:
England Uruguay 0-0
Mexico Uruguay 0-0
Argentina Germany 0-0
1970:
Mexico Russia 0-0
Uruguay Italy 0-0
Israel Italy 0-0
1974:
Australia Chile 0-0
Brazil Yugoslavia 0-0
Scotland Brazil 0-0
Sweden Bulgaria 0-0
1978:
Germany Poland 0-0
Germany Tunisia 0-0
Brazil Spain 0-0
Netherlands Peru 0-0
Italy Germany 0-0
Argentina Brazil 0-0
1982:
Italy Poland 0-0
Peru Cameroon 0-0
Poland Cameroon 0-0
Serbia Northern Ireland 0-0
Russia Poland 0-0
Germany England 0-0
Spain England 0-0
1986:
Scotland Uruguay 0-0
Morocco Poland 0-0
1990:
Uruguay Spain 0-0
England Netherlands 0-0
Ireland Egypt 0-0
1994:
South Korea Bolivia 0-0
Ireland Norway 0-0
@ -92,7 +123,7 @@
2002:
France Uruguay 0-0
Nigeria England 0-0
Brazil Turkey replay 1-0
OK Brazil Turkey replay 1-0
2006:
Trinidad Tobago Sweden 0-0
Netherlands Argentina 0-0
@ -112,18 +143,7 @@
Costa Rica England 0-0
Ecuador France 0-0
Iran-Nigeria 0-0
Brazil Chile replay
Costa Rica Greece replay
Netherlands Costa Rica replay
Argentina Netherlands replay
gremlins?
african dictator visualization
update gogs
update drone
tweet it!
</div>
</div> -->
</body>
</html>
`

@ -242,30 +242,9 @@
acc.push(d);
return acc;
// 127/110 Germany 153/137 Switzerland
// if (`${d.source.index},${d.source.subindex}` === "14,10" &&
// `${d.target.index},${d.target.subindex}` === "5,2") {
// // source has to split into 1/5, 4/5
//
// const sourceAngle = d.source.endAngle - d.source.startAngle;
// const targetAngle = d.target.endAngle - d.target.startAngle;
//
// const sourceNew = Object.assign({}, d.source);
// sourceNew.startAngle = d.source.startAngle + sourceAngle * (1/5);
// d.source.endAngle = d.source.startAngle + sourceAngle * (1/5);
//
// const targetNew = Object.assign({}, d.target);
// targetNew.endAngle = d.target.startAngle + targetAngle * (2/3);
// d.target.startAngle = d.target.startAngle + targetAngle * (2/3);
//
// chords.push({ source: sourceNew, target: targetNew });
// }
}, []);
chords.groups = tmp.groups;
//
// console.warn(test)
_diagram2.default.clear();
@ -662,8 +641,6 @@
s2 += " (Extended time)";
}
// console.warn(t1.tId, c1, t2.tId, c2, s1, s2)
return c1 + ': ' + s1 + '\n' + c2 + ': ' + s2 + '\n' + data.rounds[d.game.rId] + '\n \nsource (i,j) val: (' + d.source.index + ', ' + d.source.subindex + ') ' + d.source.value + '\n \ntarget (i,j) val: (' + d.target.index + ', ' + d.target.subindex + ') ' + d.target.value;
});
},

@ -227,8 +227,6 @@ const Diagram = {
s2 += " (Extended time)";
}
// console.warn(t1.tId, c1, t2.tId, c2, s1, s2)
return `${c1}: ${s1}\n${c2}: ${s2}\n${data.rounds[d.game.rId]}
\nsource (i,j) val: (${d.source.index}, ${d.source.subindex}) ${d.source.value}
\ntarget (i,j) val: (${d.target.index}, ${d.target.subindex}) ${d.target.value}`;

@ -177,30 +177,9 @@ const main = {
acc.push(d);
return acc;
// 127/110 Germany 153/137 Switzerland
// if (`${d.source.index},${d.source.subindex}` === "14,10" &&
// `${d.target.index},${d.target.subindex}` === "5,2") {
// // source has to split into 1/5, 4/5
//
// const sourceAngle = d.source.endAngle - d.source.startAngle;
// const targetAngle = d.target.endAngle - d.target.startAngle;
//
// const sourceNew = Object.assign({}, d.source);
// sourceNew.startAngle = d.source.startAngle + sourceAngle * (1/5);
// d.source.endAngle = d.source.startAngle + sourceAngle * (1/5);
//
// const targetNew = Object.assign({}, d.target);
// targetNew.endAngle = d.target.startAngle + targetAngle * (2/3);
// d.target.startAngle = d.target.startAngle + targetAngle * (2/3);
//
// chords.push({ source: sourceNew, target: targetNew });
// }
}, []);
chords.groups = tmp.groups;
//
// console.warn(test)
Diagram.clear();

Loading…
Cancel
Save