doxa-research-atlas / queries.sql
Giuliocc's picture
Publish source-audited political research Atlas with licensed context and citation graph
6086594 verified
Raw History Blame Contribute Delete
993 Bytes
-- Replace read_parquet paths with downloaded local files or your viewer table name.
-- Text availability: metadata records are not full texts.
SELECT text_status, count(*) AS documents
FROM read_parquet('metadata/documents.parquet') GROUP BY text_status;
-- Inspect a mechanism retrieval membership, not a bias label.
SELECT id, title, doi, text_status, scope_review.transfer_scope
FROM read_parquet('metadata/documents.parquet')
WHERE list_contains(topic_candidates, 'antisemitism');
-- Find original licensed evidence with hierarchy and citation pointers.
SELECT id, document_id, section_title, text, source_url, source_xpath, license
FROM read_parquet('data/passages.parquet')
WHERE annotation_primary_occurrence AND contains(lower(text), 'collective blame');
-- Queue readiness must stay false until real task-specific annotations exist.
SELECT task_family, count(*) AS candidates, count(gold_label) AS nonnull_gold
FROM read_parquet('data/review_queue.parquet') GROUP BY task_family;