Skip to content

Commit 7fe7df6

Browse files
committed
Merge branch 'master' of github.com:com-480-data-visualization/scion-babylon
2 parents cbad56f + 5620a1d commit 7fe7df6

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

website/content/visualizations/bar-race/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Even though the United States publishes more books overall, it does not have the
1111

1212
It is interesting to see the top 3 shift between views: scaled it is Iceland, Norway and Spain, unscaled it is the United States, France and Spain. Spain's author count is high enough that it holds its place in the top 3 either way.
1313

14-
*Toggle the button to see the race with data scaled by inhabitants. Please note that the toggle is disabled while the race is running :)*
14+
*Toggle the button to see the race with data scaled by inhabitants.*
1515
<!-- prettier-ignore-start -->
1616
{{< d3 >}}
1717
const n = 10;
@@ -135,7 +135,6 @@ d3.csv("{{< asset-url "data/nat_date.csv" >}}").then(data => {
135135
d.year = +d.year;
136136
});
137137

138-
// Build flag map from raw rows
139138
const natToFlag = new Map();
140139
data.forEach(d => {
141140
if (!natToFlag.has(d.nationality) && d.alpha2) {
@@ -178,7 +177,6 @@ d3.csv("{{< asset-url "data/nat_date.csv" >}}").then(data => {
178177
return arr;
179178
}
180179

181-
// Build keyframes from a given value column
182180
function buildKeyframes(valueCol) {
183181
const datevalues = Array.from(
184182
d3.rollup(data, ([d]) => d[valueCol], d => d.year, d => d.nationality)
@@ -283,7 +281,6 @@ d3.csv("{{< asset-url "data/nat_date.csv" >}}").then(data => {
283281
.attr("opacity", 1));
284282
}
285283

286-
// Value tags: inside bar if wide enough, outside if not
287284
const TAG_MIN_WIDTH = 40;
288285
function valueTags(svg) {
289286
let tag = svg.append("g")

website/content/visualizations/cartogram/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Promise.all([
119119
.filter(d => !problematicIDs.includes(+d.id));
120120

121121
const staticGeometries = topology.objects.countries.geometries
122-
.filter(d => problematicIDs.includes(+d.id)); // Russia yes, Antarctica no
122+
.filter(d => problematicIDs.includes(+d.id));
123123

124124

125125
const values = cartoGeometries.map(d => dataById.get(+d.id)?.counts ?? 0);
@@ -183,7 +183,7 @@ Promise.all([
183183
.data(cartoFeatures)
184184
.enter().append("path")
185185
.attr("class", "carto-country")
186-
.attr("d", (d, i) => staticPath(normalFeatures[i])) // ← use staticPath initially
186+
.attr("d", (d, i) => staticPath(normalFeatures[i]))
187187
.attr("fill", color)
188188
.attr("stroke", congoColors.neutral100)
189189
.attr("stroke-width", 0.5)

0 commit comments

Comments
 (0)