Skip to content

Canonicalise country, platform, sensor_modality and license in hf_datasets.json - #89

Merged
js2552 merged 1 commit into
mainfrom
fix/registry-vocabulary-2
Oct 20, 2026
Merged

js2552 merged 1 commit into
mainfrom
fix/registry-vocabulary-2

Conversation

@masonearles

Copy link
Copy Markdown
Contributor

Data-only companion to AgML-Journal-Ingestion #10, same shape as #87: the ingestion repo's python src/registry_vocabulary.py static/data/hf_datasets.json run over the current file, plus regenerated embeddings. No site code changes.

What changes (221 records)

field records before → after
country 57 USA / United States of America → United States (46 datasets); UK → United Kingdom; Perú → Peru, México → Mexico; 21 multi-country strings ("Slovakia, Czech Republic", "Canada; United Kingdom; United States") → lists. Location filter: 92 → 80 options
platform 55 drone → uav; aircraft/airborne → aerial; smartphone/mobile → handheld; ground_fixed/time-lapse/phenocam → fixed; spaceborne → satellite; handheld/ground → handheld, ground; 10 list values → comma-joined; handhled typo. Platform filter: 23 → 9 options (aerial, fixed, ground, handheld, mixed, robot, satellite, tripod, uav)
sensor_modality 58 RGB → rgb (50); thermal-rgb → rgb, thermal; 6 list values → comma-joined. 12 → 9 distinct
license 51 CC BY 4.0 → cc-by-4.0, Apache 2.0 → apache-2.0, MIT → mit, cc-0/cc0 1.0/CC0: Public Domain → cc0-1.0, gpl-3.0+ → gpl-3.0, cc-by-Nnc-nd-4.0 → cc-by-nc-nd-4.0. 35 → 19 distinct

Multi-country datasets become a list rather than one joined string because Dataset.country is already typed string | string[], useDatasetOptions flattens lists, and 3 records already used that form, so each country gets its own Location option. parsePlatform and display_modality already split on commas. environment (9 greenhouse vs the LLM path's field) is intentionally not touched; see the ingestion PR for why.

Verified locally

  • npm run generate-datasets and npm run generate-embeddings (6647 records); global.json unchanged.
  • npm run test:unit: 23/23 pass.
  • npm run build: success; built hf_datasets.json has no USA, drone, RGB, CC BY 4.0 or handheld/ground values left.

🤖 Generated with Claude Code

…asets.json

Output of `python src/registry_vocabulary.py static/data/hf_datasets.json`
from AgML-Journal-Ingestion PR #10, which extends the registry vocabulary from
crop_types/agricultural_task to the remaining categorical fields. 221 records
change: 57 country, 55 platform, 58 sensor_modality, 51 license.

- country: USA / United States of America -> United States (46 datasets),
  UK -> United Kingdom, Perú -> Peru, México -> Mexico; datasets spanning
  several countries become a list instead of a ", "/"; " joined string, so
  the Location filter lists each country once. 92 -> 80 distinct options.
- platform: drone -> uav, aircraft/airborne -> aerial, smartphone/mobile ->
  handheld, ground_fixed/time-lapse/phenocam -> fixed, spaceborne -> satellite,
  "handheld/ground" -> "handheld, ground", lists -> comma-joined, typo fixed.
  23 -> 9 distinct Platform filter options.
- sensor_modality: RGB -> rgb, thermal-rgb -> "rgb, thermal", lists ->
  comma-joined. 12 -> 9 distinct.
- license: CC BY 4.0 -> cc-by-4.0, Apache 2.0 -> apache-2.0, MIT -> mit,
  cc-0 / cc0 1.0 / "CC0: Public Domain" -> cc0-1.0, gpl-3.0+ -> gpl-3.0,
  cc-by-Nnc-nd-4.0 -> cc-by-nc-nd-4.0. 35 -> 19 distinct.

embeddings/meta.json + vectors.bin regenerated (npm run generate-embeddings)
since the embedded text includes these fields; global.json is unchanged.
No site code changes: Dataset.country is already string | string[] and
parsePlatform / display_modality already split on commas.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@masonearles
masonearles requested a review from js2552 October 20, 2026 23:30
@js2552
js2552 merged commit 5d62a2d into main Oct 20, 2026
1 check passed
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