Skip to content

Commit 333695e

Browse files
authored
chore: remove central node and associated code (#45)
Another cleanup to remove some unnecessary code. This used to be a visual element for a center node in the middle of the chart that I removed to make it visually cleaner. From here I think we can start playing with things like font size and filtering to make the visual easier to scan. To test: 1. Make sure chart elements and interactions still function 2. Make sure title still says "Development Seed" <img width="966" height="233" alt="Screenshot 2026-02-09 at 7 54 48 AM" src="https://github.com/user-attachments/assets/496f7508-13cc-4e0a-bfad-b69d734e8fe5" /> <img width="966" height="874" alt="Screenshot 2026-02-09 at 7 54 29 AM" src="https://github.com/user-attachments/assets/59931b00-7bc0-491a-9752-90b27acb002f" />
1 parent 28c6d8c commit 333695e

File tree

18 files changed

+525
-826
lines changed

18 files changed

+525
-826
lines changed

assets/data/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"title": "The Development Seed Contributor Network",
33
"author": "Pete Gadomski",
44
"description": "An interactive visualization of contributors to Development Seed code and their connections to other repositories",
5-
"central_repository": "developmentseed/DevSeed Team",
5+
"organization_name": "Development Seed",
66
"contributor_padding": 20,
77
"contributors": {
88
"AMSCamacho": "Angela Camacho",

assets/data/links.csv

Lines changed: 357 additions & 417 deletions
Large diffs are not rendered by default.

assets/data/repositories.csv

Lines changed: 71 additions & 72 deletions
Large diffs are not rendered by default.

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title = "The Development Seed Contributor Network"
22
author = "Pete Gadomski"
33
description = "An interactive visualization of contributors to Development Seed code and their connections to other repositories"
4-
central_repository = "developmentseed/DevSeed Team"
4+
organization_name = "Development Seed"
55
repositories = [
66
"developmentseed/titiler",
77
"developmentseed/lonboard",

index.html

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ <h1><span id="title-repo-name" class="central-repo">...</span></h1>
7474
// ─── Load configuration ───────────────────────────────────
7575
// In production, config.json is generated by the build command from config.toml.
7676
// For local development, place a config.json in assets/data/ with at minimum:
77-
// { "central_repository": "owner/repo", "contributor_padding": 20, "contributors": {} }
77+
// { "organization_name": "My Org", "contributor_padding": 20, "contributors": {} }
7878
const configResponse = await fetch('assets/data/config.json');
7979
if (!configResponse.ok) {
8080
document.getElementById("chart-container").innerHTML =
@@ -83,7 +83,7 @@ <h1><span id="title-repo-name" class="central-repo">...</span></h1>
8383
}
8484
const config = await configResponse.json();
8585

86-
const REPOSITORY = config.central_repository;
86+
const organizationName = config.organization_name || 'Development Seed';
8787
const contributor_padding = config.contributor_padding || 20;
8888

8989
// Build contributor lookup maps from config
@@ -94,8 +94,7 @@ <h1><span id="title-repo-name" class="central-repo">...</span></h1>
9494
});
9595

9696
// ─── Populate page from config ────────────────────────────
97-
const repoDisplayName = REPOSITORY.includes('/') ? REPOSITORY.split('/').pop() : REPOSITORY;
98-
document.getElementById("title-repo-name").textContent = repoDisplayName;
97+
document.getElementById("title-repo-name").textContent = organizationName;
9998
if (config.title) document.title = config.title;
10099
if (config.description) document.getElementById("chart-description").textContent = config.description;
101100

@@ -118,14 +117,12 @@ <h1><span id="title-repo-name" class="central-repo">...</span></h1>
118117

119118
const contributorNetworkVisual = createContributorNetworkVisual(
120119
container,
121-
REPOSITORY,
122120
contributor_padding,
123121
masterContributors,
124122
displayNameToUsername
125123
)
126124
.width(size)
127-
.height(size)
128-
.repository(REPOSITORY);
125+
.height(size);
129126

130127
// ─── Load CSV data and render ─────────────────────────────
131128
const promises = [
@@ -183,15 +180,9 @@ <h1><span id="title-repo-name" class="central-repo">...</span></h1>
183180
// Render the visualization
184181
contributorNetworkVisual(values);
185182

186-
// Display most recent commit date
183+
// Display most recent commit date across all links
187184
let formatDateLong = d3.utcFormat("%B %-e, %Y");
188-
let links_to_central = values[2].filter(d => {
189-
if (typeof d.target === 'object' && d.target && d.target.data) {
190-
return d.target.data.repo === REPOSITORY;
191-
}
192-
return d.repo === REPOSITORY;
193-
});
194-
let most_recent_commit = d3.max(links_to_central, d => +d.commit_sec_max);
185+
let most_recent_commit = d3.max(values[2], d => +d.commit_sec_max);
195186
if (most_recent_commit) {
196187
let commitDate = new Date(most_recent_commit * 1000);
197188
document.getElementById("last-commit-date").innerHTML =

0 commit comments

Comments
 (0)