Add replication connections for Internet Archive and Zenodo

This commit is contained in:
Diego Ripley
2026-02-12 16:52:26 -05:00
parent 24fdc4d28a
commit 68a3482ddc
+24
View File
@@ -185,6 +185,12 @@ sidebar:
} }
]; ];
// Connections between nodes
const connections = [
{ source: 'san-francisco', target: 'vancouver', color: '#002147' },
{ source: 'geneva', target: 'budapest', color: '#FFFFFF' }
];
const width = 960; const width = 960;
const height = 600; const height = 600;
@@ -209,6 +215,7 @@ sidebar:
.attr('class', 'graticule') .attr('class', 'graticule')
.attr('d', path); .attr('d', path);
// Group nodes by location to handle overlapping // Group nodes by location to handle overlapping
const nodesByLocation = {}; const nodesByLocation = {};
nodes.forEach(node => { nodes.forEach(node => {
@@ -271,6 +278,23 @@ sidebar:
.enter().append('path') .enter().append('path')
.attr('class', 'land') .attr('class', 'land')
.attr('d', path); .attr('d', path);
// Draw connections
const connectionGroup = g.append('g');
connections.forEach(conn => {
const source = nodes.find(n => n.id === conn.source);
const target = nodes.find(n => n.id === conn.target);
if (source && target) {
connectionGroup.append('path')
.datum({
type: 'LineString',
coordinates: [source.coords, target.coords]
})
.attr('class', 'connection')
.attr('d', path)
.attr('stroke', conn.color);
}
});
// Draw nodes with offsets for overlapping positions // Draw nodes with offsets for overlapping positions
const nodeGroup = g.append('g'); const nodeGroup = g.append('g');