chartcoach
Catalog exploration

Evidence mix

Count source types by label so a query can include papers, standards, posts, reports, and other source material deliberately.

Catalog source records include source_type. Use that field to ask whether a label is grounded mostly in papers, standards, posts, reports, or a mix of sources.

MIN_GUIDELINES=${MIN_GUIDELINES:-10}
MIN_SOURCES=${MIN_SOURCES:-5}
ORDER=${ORDER:-asc}

Inspect source types

uvx chartcoach@latest catalog values references.source_type --format table

Output:

Source typeReferences
article112
misc111
inproceedings38
incollection1

Rank labels by source mix

uvx chartcoach@latest catalog sql "
with label_sources as (
  select
    gl.label,
    count(distinct gl.guideline_id) as guidelines,
    count(distinct gs.reference_id) as sources,
    count(distinct case
      when gs.source_type in ('article', 'inproceedings', 'incollection')
      then gs.reference_id
    end) as published_sources,
    count(distinct case
      when gs.source_type = 'misc'
      then gs.reference_id
    end) as misc_sources
  from guideline_labels gl
  left join guideline_sources gs on gs.guideline_id = gl.guideline_id
  group by gl.label
), scored as (
  select
    label,
    guidelines,
    sources,
    published_sources,
    misc_sources,
    round(published_sources::double / nullif(sources, 0), 2) as published_share
  from label_sources
  where guidelines >= ${MIN_GUIDELINES}
    and sources >= ${MIN_SOURCES}
)
select *
from scored
order by published_share ${ORDER}, guidelines desc, label
limit 5
" --format table

Output with ORDER=asc:

LabelGuidelinesSourcesPublished sourcesMisc sourcesPublished share
basis:heuristic206360360.00
access:contrast:use10141130.07
access:keyboard:use10182160.11
quality:accessibility668010700.13
basis:accessibility508010700.13

Use ORDER=desc to list labels with the largest published-source share:

ORDER=desc

The published bucket includes article, inproceedings, and incollection. Keep misc in scope when the answer should include standards, practitioner posts, reports, and other curated material.

On this page