Skip to content

Make GH Pages dashboard include newly-added datasets automatically - #11

Merged
RubaGarcia merged 4 commits into
mainfrom
copilot/update-github-pages-dashboard
Sep 2, 2026
Merged

Make GH Pages dashboard include newly-added datasets automatically#11
RubaGarcia merged 4 commits into
mainfrom
copilot/update-github-pages-dashboard

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The GH Pages dashboard only rendered datasets hard-coded in DATASET_INFO, so datasets present in docs/data/all_catalogues.csv but missing from that table were silently omitted. This change makes CSV content the source of truth while preserving DATASET_INFO as an override layer.

  • Dataset discovery now follows catalogue CSV

    • docs/index.html now builds dsNames from Object.keys(datasets) (parsed from all_catalogues.csv) instead of Object.keys(DATASET_INFO).
    • Any dataset in the CSV is eligible for rendering without manual JS edits.
  • DATASET_INFO retained as optional overrides

    • docs/script.js documents DATASET_INFO as optional.
    • Added getDatasetInfo(name, rows):
      • returns override when present;
      • otherwise derives:
        • label: slug → titleized text (- / _ → spaces),
        • type: inferred from first row dataset_type,
        • period: computed from min/max year across earliest_date / latest_date.
  • Validation path normalization for hemispheric variants

    • Replaced static folder map with datasetValidationDir(name) suffix normalization:
      • strips trailing _nh / _sh to resolve shared validation directories.
// Show any dataset available in the CSV. Use DATASET_INFO only as overrides.
const dsNames = Object.keys(datasets).filter(d => datasets[d] && datasets[d].length > 0);

// Use override if present; otherwise derive label/type/period from CSV rows.
const info = getDatasetInfo(name, datasets[name]);

Copilot AI changed the title [WIP] Update GitHub Pages dashboard for automatic dataset listing Make GH Pages dashboard include newly-added datasets automatically Sep 1, 2026
Copilot AI requested a review from RubaGarcia September 1, 2026 11:42
@RubaGarcia
RubaGarcia marked this pull request as ready for review September 2, 2026 08:03
@RubaGarcia
RubaGarcia merged commit e9e8699 into main Sep 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants