Repository navigation
GSGB 2025 gambling participation by sex, age, area and activity, for PolicyEngine/microcosm#1381 - #391
Conversation
…#1381 The Gambling Commission's Gambling Survey for Great Britain, Annual Report 2025 data tables give the share of adults who gambled in the past 12 months and the past four weeks: by sex, age band, country and English region (B.1 to B.4), by activity with online and in-person sub-rows (B.9 and B.10), and the number of activities among people who gambled (B.13), with each table's unweighted bases. 1,024 facts for calendar 2025, covering fieldwork from 13 January 2025 to 22 January 2026. The Commission states no licence for the workbook, so it is stored in R2 only (storage.local: false) and git-ignored. B.9 and B.10's "Any gambling" row restates B.3 and B.4 exactly and is emitted once; every fact carries its source_sheet because the tables' bases differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each table's rows now carry its own text, so B.9 row 6 keeps "Tickets National Lottery draws bought in person" beside B.10's "Tickets for ..."; the bundle reports that row as one groupby-label warning (133). B.2 and B.4's rows are named by area on their own axis. B.13's bases say they are the table's denominator, B.9 and B.10's that they belong to any gambling activity, and the window notes no longer mention interviews: GSGB is self-completed. The harness doc now allows R2-only storage when the publisher states no licence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@juaristi22 thanks, this is my review at Verdict. The facts are right. Every cell I checked against a workbook I downloaded myself matches, and the generator rebuilds the package byte for byte from scratch. The geography, period, population and licence records are accurate. I found nothing at must level. There are three shoulds. Two are about what the package tells microcosm#1381, and they matter more than anything in the code. The third is a repository policy question for us, not a change for you. Before this leaves draft it needs the bundle job green at this head (still running when I looked) and an answer to finding 3. What I ran
Findings
What looks right
🤖 Generated with Claude Code |
B.1 to B.4's measures now carry footnote i, which defines "excluding lottery draw only" (only people whose sole gambling was lottery draws are left out), and the non-response footnotes, and their rows guard those cells. Every fact carries an age >= 18 constraint, and each age band its bounds, as the ASHE packages do. The docs say what the tables can and can't answer for PolicyEngine/microcosm#1381, with the Commission's caveats, and the attribution names NatCen, the University of Glasgow and the authors. Values and counts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@vahid-ahmadi thanks. Items 1, 2, 4, 5 and 6 are addressed in Should
Nits
CI and the artifact. The run at 🤖 Generated with Claude Code |
|
@juaristi22 thanks, this is round 2 at Verdict. Items 1, 2, 4, 5 and 6 are done. I have two new nits on the docs page, and neither blocks. The values haven't moved. Only item 3 now keeps this in draft, and that decision is ours. The other condition is CI. At 16:04Z the bundle and surface jobs at this head were still running, after 65 minutes, so neither has passed yet. Round 1's run was cancelled before it finished, so neither job has gone green on this PR. Round 1 items
New nits
What I ran at
|
…m#1359) The stage-health check gambling_participation becomes the release-blocking gate uk_stage_lcfs_consumption_gambling_participation: gates.json, the spine gate scope, the microcosm-data contract mirrors and the battery's parameter vocabulary (maximum_stratum_shortfall), with the gate digests re-pinned. The kind joins the source manifest and the sources schema, and the vendor selection names gambling_participation_facts.json: the 426 Great Britain rows of the Gambling Commission's GSGB 2025 participation concept (PolicyEngine/chronicle#391). The step is declared once the feed carries them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bles (microcosm#1359) PolicyEngine/chronicle#391 adds the Gambling Commission's Gambling Survey for Great Britain 2025 tables (1,024 facts; 1,503,315 rows). The merge commit's tree is the pull request head's, merged onto an unmoved base, so the artifact was built from that head's bundle and carries the merge commit's digests. The new vendored gambling_participation_facts.json holds the 426 Great Britain participation rows the LCFS top-up reads, and the package declares it. The other vendored resources keep their rows under the new feed identity. The national and local reference files are byte-identical, the membership moves only its feed label, the local census restates the pin, and both compile-parity receipts are unchanged; both surfaces were regenerated from the national and local cuts. The pin tests restate the new identity, and the runbook records the re-pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
PolicyEngine/microcosm#1381 tops up gambling incidence on the frame to the share of adults who gamble, which the LCFS diary under-records. This PR adds the Gambling Commission's published participation rates:
gambling-commission-gsgb-annual-report-2025, 1,024 facts from the Gambling Survey for Great Britain, Annual Report 2025 data tables (published 16 July 2026; 20,775 adults; fieldwork 13 January 2025 to 22 January 2026).scripts/build_uk_excise_packages.py(build_gsgb_participation) regenerates it, anddocs/data-sources/uk-gambling-participation-gsgb-2025.mdsets out every choice.Bundle
Against
mainat66114a6:The full bundle test (53 minutes, 15 GB) was not run locally; CI's bundle job checks the pins. The UK suite was built at
d3a11d0the way Microcosm re-pins, withbuild-bundle --suite ukand thenbuild-consumer-artifact:200bf6d(Microcosm's current pin) plus these 1,024;d953306d…);sex=maleandsex=femalelabel warnings.Review notes
storage.local: false,.gitignorekeeps the bytes out of the repository, and the licence, attribution and evidence are recorded. Builds read the file from the source-artifact cache, or withLEDGER_SOURCE_ARTIFACT_FETCH=1, as CI sets, fromsource_url.survey_referencecoverage from 13 January 2025 to 22 January 2026; the windows count back from each interview.unit: share), and bases with the file's floating-point noise (for example 1231.999999999998).gambling_commission.gsgb.unweighted_basefacts with the row's dimensions.source_sheeton every fact. B.9 and B.10's bases differ from B.3 and B.4's by one in three cells, so each table keeps its own, told apart bysource_sheet(as the Consumer Trends package does).-cells, of which these tables have none.age >= 18constraint, and each age band its bounds, as the ASHE packages state theirs.age_band: allkeeps the shared "All ages" label.sex,age_bandandsource_sheetreuse the existing dimension and value labels; the other dimensions are new.docs/agent-source-package-harness.mdallowed R2-only storage only for files too large to commit. It now also allows it when the publisher states no licence that lets Chronicle redistribute the file.Chronicle Governance
ledger-source-ingestor, for the package.chronicle/source_package.pyandchronicle/bundle.py(registration),db/data/**,.gitignore,scripts/build_uk_excise_packages.py,docs/**andchangelog.d/gsgb-participation-2025.added.md.validate-packageandbuild-suite: valid, 0 agent-acceptance errors; the only warning isconcept_alignment_validation_skipped.publish-raw, thenverify-raw: the R2 object matches its pin.inventory-artifactsoverdb/data: valid, 493 artifacts, 41 R2-only, no checksum mismatches.687996c):ledger-source-fidelityPASS,ledger-boundaryPASS.d3a11d0:6269a88, came after this review. They add notes, docs, universe constraints and the attribution, and change no value or count.Tests
tests/test_source_gambling_commission_gsgb_2025.py, 7 tests. They cover registration, R2-only storage and the licence record; validity, labels and unique keys; values against the cells for every table; the area codes; the restated rows and bases; and B.13. They skip when the workbook is neither cached nor fetched.6269a88.ruff check: passed.🤖 Generated with Claude Code