glam/data/wikidata/GLAMORCUBEPSXHFN/G/QUICK_START.md
2025-11-19 23:25:22 +01:00

3.8 KiB

G-Class (Gallery) Query - Quick Start Guide

Status: Query ready for execution
Last updated: 2025-11-16T10:45:06Z


Quick Execute

Step 1: Copy the query

cat data/wikidata/GLAMORCUBEPSXHFN/G/queries/gallery_query_updated_20251116T104506.sparql

Step 2: Go to Wikidata Query Service

Visit: https://query.wikidata.org

Step 3: Paste and run

  • Paste the query into the editor
  • Click "Execute" (blue triangle button)
  • Wait ~10-30 seconds for results

Step 4: Download results

  • Click "Download" → "CSV"
  • Save as: gallery_hyponyms_20251116.csv

What This Query Does

Finds: All Wikidata entities that are subclasses of 14 verified gallery types

Excludes: 1,819 Q-numbers already in hyponyms_curated.yaml

Returns: Up to 10,000 results with:

  • Q-number (e.g., Q123456)
  • Primary label (English + 38 other languages)
  • Alternative labels

Base Classes Included (14 total)

Core Types (4)

  1. Q1007870 - Art gallery (space/building)
  2. Q98818526 - Art gallery (institution/organization)
  3. Q3196771 - Art museum (institution)
  4. Q207694 - Art museum (building/space)

Specialized Types (4)

  1. Q1475403 - Kunsthalle (temporary exhibitions)
  2. Q56856618 - Commercial art gallery
  3. Q16038801 - Contemporary art gallery
  4. Q67165238 - Noncommercial art gallery

Institutional Variants (3)

  1. Q3844310 - National gallery
  2. Q4034417 - Artist-run space
  3. Q16002704 - Alternative exhibition space

Physical Variants (3)

  1. Q1759852 - Sculpture garden
  2. Q108860927 - Contemporary art museum (type)
  3. Q7094057 - Online art gallery

Expected Results

Likely Categories

  • Various gallery subtypes (commercial, non-profit, contemporary, etc.)
  • National/state galleries (Tate, National Gallery, etc.)
  • Regional gallery types (German kunsthalles, French galeries, etc.)
  • Artist-run and alternative spaces
  • Sculpture parks and outdoor exhibition spaces

Potential False Positives

  • ⚠️ Museums with "gallery" in name (check for permanent collections)
  • ⚠️ Personal art collections (not public institutions)
  • ⚠️ Obsolete/historical gallery types

Processing Results

After Download

  1. Open CSV in spreadsheet software
  2. Review first 50 rows - check for obvious false positives
  3. Group by pattern:
    • Gallery types (commercial, non-profit, etc.)
    • Geographic variants (regional gallery types)
    • Specialized galleries (photo, sculpture, design)
  4. Validate against Wikidata:
    • Click Q-number links
    • Read descriptions
    • Check "instance of" (P31) and "subclass of" (P279) properties

Adding to Curated Vocabulary

# Add verified Q-numbers to hyponyms_curated.yaml
# Format:
- label: Q123456
  text: Gallery Type Name
  class: G
  parent_class: Q1007870  # or appropriate parent

Troubleshooting

Query Timeout

  • Problem: Query exceeds 60-second limit
  • Solution: Already optimized with LIMIT 10000

No Results

  • Problem: All hyponyms already excluded
  • Solution: This means vocabulary is complete!

Too Many Results

  • Problem: Over 10,000 matches
  • Solution: Review FILTER chunks, may need to add more exclusions

Documentation

  • Full verification report: VERIFIED_Q_NUMBERS.md
  • Session summary: /docs/sessions/SESSION_SUMMARY_20251116_G_CLASS_VERIFICATION.md
  • Query metadata: gallery_query_updated_20251116T104506.yaml

Next Steps After Execution

  1. Download CSV results
  2. Review for false positives
  3. Add valid Q-numbers to hyponyms_curated.yaml
  4. Regenerate query (will now exclude newly added Q-numbers)
  5. Repeat until no new valid results found

Ready to execute: https://query.wikidata.org
Query file: gallery_query_updated_20251116T104506.sparql