Skip to content

Author dataAvailability and dependencies for one real pathway #947

Description

@jacobvjk

Part of #860; blocks observing #870 and half of #872.

Problem

No pathway in src/data/ carries a dataAvailability field at all, and every one has dependencies: []:

ACE-ATS-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
ACE-BAS-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
ACE-CNS-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
ACE-RAS-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
IEA-APS-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
IEA-NZE-2024     dataAvailability=ABSENT   byMetric rows=0   dependencies=0
IEA-STEPS-2024   dataAvailability=ABSENT   byMetric rows=0   dependencies=0

(Those seven are the only pathways currently loadable — the other 49 files are still schema v1 and skipped.)

So two of the three surfaces built in #936 and scoped in #946 render only their empty states in the running app:

  • the Data Availability table (dataAvailability field + download/link table #870) — its rows, its conditional Sector / Geography scope columns, its scope filtering, its filtered-empty copy
  • the Dependencies table — its rows, its evidence pills, its sector filtering

Both are covered by component tests against fixtures, and testdata/valid/pathwayMetadata_v2_full.json exercises the schema. But nobody has seen either table with real content, so design problems that only appear with real values — column widths, long authored prose, how many rows a real pathway generates — are undiscoverable.

Suggestion

Author dataAvailability (including a few byMetric rows) and dependencies for one real pathway, ideally a multi-sector, multi-geography one so the conditional columns and the scope filtering actually engage. IEA-APS-2024 is the natural candidate: 12 sectors, 15 geography tokens.

testdata/valid/pathwayMetadata_v2_full.json is a working shape to copy from, and npm run schema:check validates the result.

Worth noting while authoring

  • Row uniqueness is (metricName, sector, sectorSegment, geography), enforced by scripts/schema-check-files.ts.
  • byMetric[].geography takes the same scope token as keyFeatures — so it participates in the detail page's geography filter.
  • sectorSegment values changed in Feat/UI tabs #936: Storage → Energy storage, plus a new Fuel extraction and processing.
  • metricName must be one of the pathway's own metric values and a metric of its sector.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions