Skip to content

feat: add BETYdb public website and static data explorer - #35

Open
ANAMASGARD wants to merge 1 commit into
PecanProject:mainfrom
ANAMASGARD:feat/15-betydb-website-search
Open

ANAMASGARD wants to merge 1 commit into
PecanProject:mainfrom
ANAMASGARD:feat/15-betydb-website-search

Conversation

@ANAMASGARD

@ANAMASGARD ANAMASGARD commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR turns the existing package-focused website into a public landing page for BETYdb. Researchers can discover, search, and download public plant trait and yield observations while continuing to use the existing R package documentation.

The homepage now includes BETYdb branding, a prominent data search, observation-based summary counts, historical sponsor graphics, and clear links to access, explore, download, contribute, use the R package, and report corrections.

A dedicated explorer searches authors, scientific and common species names, variable names, and descriptions. It supports combined filters, pagination, shareable URLs, and browser back/forward navigation. The static search index loads only after a query is submitted, with error messages and retry support when loading fails.

Variable definitions retain their original catalog IDs. Definitions sharing a variable name do not duplicate observations, and their contextual counts are explicitly labelled as shared name-level counts. Matching definitions remain visible even when no observations satisfy the species or author filters.

The complete observation CSV is generated from the packaged public dataset and independently checked against the source access and quality-control rules. Homepage summaries regenerate when data changes. This also repairs existing ID parsing that had converted large database identifiers into missing values.

The implementation uses Quarto, R, plain JavaScript, and CSS, with no new backend.

Related Issue(s)

Addresses #15.

Related follow-up work:

This implementation credits and supersedes the homepage summary work proposed in #33. Recommend closing #33 after this contribution is accepted.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Data update (changes to datasets)
  • Documentation update
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have run devtools::check() with no errors or warnings
  • I have updated NEWS.md if applicable
  • I have updated documentation if applicable
  • I have added/updated tests if applicable

Local verification:

  • 56 R test assertions passed.
  • 6 search unit tests passed.
  • 20 browser tests passed across / and /betydata/.
  • Automated axe accessibility checks reported no violations in the tested page states.
  • Complete Quarto rendering, data-only summary refresh, and local link/resource checks passed.
  • Two clean builds with fresh R execution produced identical generated assets and rendered output.
  • devtools::check(args = "--no-manual") reported zero errors, zero warnings, and one pre-existing NOTE about the missing ORGANIZATION field in the license stub. The unchanged upstream baseline produced the same NOTE.

Data Changes (if applicable)

  • Row counts verified

Only data/traitsview.rda was regenerated using the corrected ID parsing; a complete rebuild of every packaged table was not performed.

Six ID columns now use numeric parsing to preserve identifiers exceeding the signed 32-bit integer range. This restores 12 missing ID values across three observations, including observation IDs 5000000006, 5000000007, and 5000000008.

The dataset retains 43,532 observations. Measurements, column order, and previously nonmissing IDs are unchanged. Raw CSVs and all other packaged datasets are unchanged.

datapackage.json was not modified because this repair does not change the logical schema or row count.

The website export preserves all 35 observation columns, excludes restricted and failed-QC records, and validates CSV round-trip equality and unique observation identities.

Additional Notes

  • Added a read-only PR workflow that builds, tests, and uploads a reviewable site artifact. Production publishing remains restricted to main.
  • Added developer instructions and a legacy URL mapping with unresolved migration dependencies.
  • The rendered site is 29.7 MB; the search index is 7.12 MB uncompressed.
  • Under local Chromium testing with 4× CPU throttling, first search took approximately 1.8–1.9 seconds and cached filtering took 10–20 ms.
  • Human screen-reader testing, native browser zoom, physical-device checks, and hosted CI/deployment verification remain outstanding. Automated 200% reflow checks use CSS zoom.
  • No DNS changes, redirects, API shutdowns, or data-entry service replacements are included.
  • Full local verification details are recorded in docs/issue15-verification.md.

Screenshot From 2026-10-17 23-44-33 --- Screenshot From 2026-10-17 23-44-42 --- Screenshot From 2026-10-17 23-57-08 --- Screenshot From 2026-10-17 23-57-29

Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant