Separate technical data guide from concise dataset card
Browse files- DATA_GUIDE.md +142 -0
- README.md +1 -138
DATA_GUIDE.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# dsa data guide
|
| 2 |
+
|
| 3 |
+
[Back to the dataset overview](README.md).
|
| 4 |
+
|
| 5 |
+
## Folder layout
|
| 6 |
+
|
| 7 |
+
Each top-level dataset folder is a self-contained evaluation pack. There are no version directories in the current layout.
|
| 8 |
+
|
| 9 |
+
| File | Purpose |
|
| 10 |
+
| --- | --- |
|
| 11 |
+
| `pack.json` | Entry point: identifies the database, case export, scoring policy, and their checksums. |
|
| 12 |
+
| `cases.jsonl` | Machine-readable questions, answer schemas, reference answers, and case metadata; one JSON object per line. |
|
| 13 |
+
| `PROBLEMS.md` | Human-readable problem catalog, including calculation conventions and answer fields. |
|
| 14 |
+
| `ATTRIBUTION.md` | Original sources, citations, licensing, and attribution. |
|
| 15 |
+
| `database/<name>.duckdb` | Ready-to-query database; its exact filename is in `pack.json`. |
|
| 16 |
+
| `database/build_report.json` | Dataset-specific build statistics and source provenance. |
|
| 17 |
+
| `reference-queries.jsonl` | Retained reference SQL for the cases recomputed during the revision. Not a complete reference implementation for every case. |
|
| 18 |
+
| `changes.json` | Per-case revision history and provisional difficulty labels. |
|
| 19 |
+
| `source.json` | Identity of the predecessor pack and unchanged source database. |
|
| 20 |
+
| `validation.json` | Export digests, case counts, and revision summary. |
|
| 21 |
+
| `verification.json` | Recorded schema checks, reference replays, and independent-check coverage. |
|
| 22 |
+
|
| 23 |
+
Some files are dataset-specific:
|
| 24 |
+
|
| 25 |
+
- Online Retail II additionally has `database-card.json`, used by the chat application to describe the database.
|
| 26 |
+
- Online Retail II and EEA include `database/schema.sql` and `database/views.sql`, documenting the packaged relations. The DuckDB file is already built; these scripts need not be run to use it.
|
| 27 |
+
- EEA also includes `database/source_manifest.json`, listing the source-request archives and their identities. These archives are provenance references, not additional files bundled here.
|
| 28 |
+
|
| 29 |
+
The root `.gitattributes` file is repository storage configuration, not part of the evaluation contract.
|
| 30 |
+
|
| 31 |
+
## JSON formats
|
| 32 |
+
|
| 33 |
+
All JSON and JSONL files are UTF-8. A `.json` file contains one JSON value; a `.jsonl` file contains one complete object per line and is not wrapped in an array. SHA-256 digests are lowercase hexadecimal strings. File paths in `pack.json` are relative to its dataset folder.
|
| 34 |
+
|
| 35 |
+
### `pack.json`: evaluation manifest
|
| 36 |
+
|
| 37 |
+
The manifest uses the `dsa-evaluation-pack/v1` contract. Its fields are:
|
| 38 |
+
|
| 39 |
+
| Field | Type and meaning |
|
| 40 |
+
| --- | --- |
|
| 41 |
+
| `format` | String, exactly `dsa-evaluation-pack/v1`. |
|
| 42 |
+
| `pack_id` | String identifying the problem set. |
|
| 43 |
+
| `version` | Pack revision as a `major.minor.patch` string; currently `2.0.0`. This is metadata, not a directory name. |
|
| 44 |
+
| `license` | License identifier, currently `CC-BY-4.0`. |
|
| 45 |
+
| `database` | Object with `id`, `path`, `size_bytes`, and `sha256`. Identifies the exact DuckDB file. |
|
| 46 |
+
| `cases` | Object with `path`, `size_bytes`, `sha256`, and `case_count`. Identifies the exact JSONL export. |
|
| 47 |
+
| `scorer` | Object selecting the answer-comparison policy. |
|
| 48 |
+
| `provenance` | Object containing `source_datasets`, an array of export identities with `name`, `version`, `case_count`, and `export_sha256`. These identify case exports, not the original real-world data providers. |
|
| 49 |
+
|
| 50 |
+
All three current packs use `{"name":"exact-json","version":"1"}`. Answers are compared structurally, not by their display formatting: object-key order is irrelevant, but array order and numeric types matter. Follow each question's rounding and ordering requirements.
|
| 51 |
+
|
| 52 |
+
The loader also supports `json-numeric-tolerance` version `1`, with numeric `relative_tolerance` and `absolute_tolerance` fields. That policy allows tolerance for expected floating-point values while preserving exact integer comparisons. It is not selected by the current three manifests; do not silently substitute it when reporting their results.
|
| 53 |
+
|
| 54 |
+
### `cases.jsonl`: one evaluation case per line
|
| 55 |
+
|
| 56 |
+
| Field | Type and meaning |
|
| 57 |
+
| --- | --- |
|
| 58 |
+
| `case_id` | String identifying the case within the pack. |
|
| 59 |
+
| `case_version` | String identifying the case revision. |
|
| 60 |
+
| `question` | Complete natural-language task, including calculation details and data conventions. |
|
| 61 |
+
| `answer_schema` | JSON Schema Draft 2020-12 object defining the required answer shape and constraints. |
|
| 62 |
+
| `expected_answer` | JSON value satisfying `answer_schema`; used only by the evaluator. |
|
| 63 |
+
| `metadata` | Object with string fields `family` (task category) and `source_level` (provisional difficulty). |
|
| 64 |
+
| `derivation` | Optional object `{"format":"dsa-derivation/v1"}` requesting a replay-verified derivation; absent from the current exports. |
|
| 65 |
+
|
| 66 |
+
For example, a one-number answer may use this `answer_schema`:
|
| 67 |
+
|
| 68 |
+
```json
|
| 69 |
+
{
|
| 70 |
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 71 |
+
"type": "object",
|
| 72 |
+
"properties": {"total_mwh": {"type": "number"}},
|
| 73 |
+
"required": ["total_mwh"],
|
| 74 |
+
"additionalProperties": false
|
| 75 |
+
}
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
Schema validation checks answer structure, not factual correctness. Evaluation additionally compares the answer with `expected_answer` using the manifest's scorer. The full task is in `question`; the short opening sentence alone can omit important constraints.
|
| 79 |
+
|
| 80 |
+
The authoritative validated manifest and case contracts are defined in [`dsa.pack`](https://github.com/lschiemanowski/dsa/blob/main/src/dsa/pack.py). Each case carries its own answer schema rather than sharing a single universal answer format.
|
| 81 |
+
|
| 82 |
+
### `database-card.json`: chat presentation
|
| 83 |
+
|
| 84 |
+
Currently provided only for Online Retail II, this object uses `format: "dsa-database-card/v1"` and contains:
|
| 85 |
+
|
| 86 |
+
- `title` and `summary`: strings describing the database;
|
| 87 |
+
- `coverage`: an object containing `period_start` and `period_end` strings, plus integer counts for `transaction_lines`, `invoices`, `identified_customers`, `product_codes`, and `country_values`;
|
| 88 |
+
- `primary_relation`: the schema-qualified name of the recommended table or view;
|
| 89 |
+
- `relations`: an array of objects with `name`, `kind` (`table` or `view`), `row_count`, `description`, and `columns`. Each column has string fields `name`, `data_type`, and `description`;
|
| 90 |
+
- `example_questions`: an array of strings for user orientation;
|
| 91 |
+
- `analysis_notes`: an array of model-facing analytical conventions, separated from the user-facing description.
|
| 92 |
+
|
| 93 |
+
This is a presentation document, not an evaluation-case export. Its current coverage fields are retail-specific. The validated contract is defined in the [chat application's database-card module](https://github.com/lschiemanowski/dsa/blob/main/apps/private_data_chat/database_card.py).
|
| 94 |
+
|
| 95 |
+
### Revision and verification records
|
| 96 |
+
|
| 97 |
+
These are supporting authoring records, not additional model inputs or universally versioned runtime contracts. Their current shapes are:
|
| 98 |
+
|
| 99 |
+
| File | Contents |
|
| 100 |
+
| --- | --- |
|
| 101 |
+
| `reference-queries.jsonl` | Objects with `case_id`, `sql`, `origin`, and `array_key`. The nullable `array_key` controls how query rows are wrapped into an answer object by the authoring code. |
|
| 102 |
+
| `changes.json` | Array of objects with `case_id`, `previous_case_id`, integer `slot`, `action`, `task_type`, `analytical_operation`, `difficulty`, `difficulty_status`, `reference_status`, and booleans `answer_schema_changed` and `answer_changed`. Slots are one-based positions in the revision. |
|
| 103 |
+
| `source.json` | Object with `predecessor`, `database_relative_to_source_root`, `database_sha256`, and `status`. `predecessor` contains `format`, `repo_id`, `revision`, `path`, and `manifest_sha256`, identifying the earlier pack at a pinned repository commit. |
|
| 104 |
+
| `validation.json` | Object with `pack`, `version`, `cases`, four digest fields (`cases_sha256`, `database_sha256`, `manifest_sha256`, `reference_queries_sha256`), counts (`replaced`, `rewritten`, `recomputed_answers`, `pinned_predecessor_answers`), and count mappings `difficulty` and `types`. |
|
| 105 |
+
| `verification.json` | Object with `pack`, `cases_sha256`, `manifest_sha256`, `database_unchanged`, `production_loader`, `schemas_checked`, `reference_queries_replayed`, and an array of `independent_python_case_slots`. |
|
| 106 |
+
|
| 107 |
+
`source.json` is retained from authoring: its `status` may say `unpublished-local-candidate`, and its source path may contain an old version directory. These describe the historical build input, not the current publication status or download path. Use `pack.json` for current file locations.
|
| 108 |
+
|
| 109 |
+
The current revision records 244 replayed reference queries and 11 independent Python checks across the three packs. Another 56 answers were retained from pinned predecessors without new independent recomputation. The `production_loader` receipt records a local-transport check at authoring time; it is not a live service-health report. Difficulty labels are provisional, not calibrated model-performance measurements.
|
| 110 |
+
|
| 111 |
+
### Database provenance records
|
| 112 |
+
|
| 113 |
+
`database/build_report.json` varies by dataset; it does not have a single shared schema:
|
| 114 |
+
|
| 115 |
+
- **Online Retail II:** source archive and SHA-256, build time and tool versions, worksheet/raw/analysis row counts, overlap checks, quality metrics, and build checks.
|
| 116 |
+
- **SMARD:** database identity and SHA-256, region and time coverage, interval count, licensing and attribution, and a `source_files` array. Each source-file record includes its identifier, request JSON string, response filename, retrieval time, byte count, row count, and SHA-256.
|
| 117 |
+
- **EEA:** `format: "dsa-eea-air-quality-build-report/v1"`, database identity/size/SHA-256, source details, licensing, reporting-time coverage, cities, pollutants, sampling-point and relation counts, and a `source_requests` array containing archive/request identities, request JSON strings, checksums, and measurement-coverage statistics.
|
| 118 |
+
|
| 119 |
+
EEA's separate `database/source_manifest.json` uses `format: "dsa-eea-source-manifest/v1"`, with `retrieved_at_utc`, `endpoint`, and `entries`. Each entry identifies a source request and archive using `id`, `archive`, `request`, `city_id`, `city`, `source_city`, `country_code`, `start_utc_plus_1`, `end_utc_plus_1_exclusive`, `size_bytes`, and `sha256`. Historical request strings are preserved as sent; reporting-time conventions are described below.
|
| 120 |
+
|
| 121 |
+
## Working with the databases
|
| 122 |
+
|
| 123 |
+
The `.duckdb` files can be opened directly with DuckDB; using `dsa` is optional. Tables and views are organized into `raw`, `analysis`, and `metadata` schemas. Start with these relations:
|
| 124 |
+
|
| 125 |
+
| Database | Recommended relations | Important conventions |
|
| 126 |
+
| --- | --- | --- |
|
| 127 |
+
| Online Retail II | `analysis.transaction_lines_nonoverlapping` | One transaction line per row; 1,044,848 rows after removing cross-sheet overlap from 1,067,371 raw rows. Quantities are signed, prices are in GBP, and timestamps are timezone-naive. Missing identifiers and within-sheet duplicates remain. Follow the case's eligibility rules. |
|
| 128 |
+
| SMARD | `analysis.quarter_hourly`, `analysis.daily` | 35,136 quarter-hour intervals in the 2024 local year. Use `Europe/Berlin` for calendar dates and UTC for unambiguous interval identities. Missing measurements are not imputed. |
|
| 129 |
+
| EEA | `analysis.valid_measurements`, `analysis.city_hourly`, `analysis.city_daily`, `analysis.city_monthly`, `analysis.city_annual` | Reporting timestamps use fixed UTC+1, not daylight-saving civil time. CO uses mg/m³; the other pollutants use µg/m³. Coverage varies, and missing observations are not imputed; Rome has no PM₁₀ or PM₂.₅ observations in this snapshot. |
|
| 130 |
+
|
| 131 |
+
EEA's valid-measurement relation accepts validity codes 1–4. City-hour means average available valid sampling-point values; longer-period means weight each available city-hour mean equally. The original measurements and metadata remain available for coverage and validity audits.
|
| 132 |
+
|
| 133 |
+
For evaluation, keep `expected_answer`, reference SQL, and verification records out of the model's inputs. Supply the database, complete question, and answer schema; use the remaining material on the evaluator side. Public reference answers make this a transparent demo benchmark, not a contamination-resistant hidden test set.
|
| 134 |
+
|
| 135 |
+
Download one dataset with the standalone Hugging Face CLI:
|
| 136 |
+
|
| 137 |
+
```bash
|
| 138 |
+
uvx --from huggingface-hub hf download lschiemanowski/dsa-datasets \
|
| 139 |
+
--repo-type dataset --include 'online-retail-ii/*' --local-dir data
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
For reproducible experiments, add `--revision <commit-sha>` and retain the selected commit together with the manifest digest. The `main` branch can change; a directory name alone is not a frozen benchmark identity. Existing commit-pinned historical packs remain available through repository history.
|
README.md
CHANGED
|
@@ -44,141 +44,4 @@ The dsa-authored problem sets and accompanying documentation are also distribute
|
|
| 44 |
|
| 45 |
The linked problem lists include the calculation details and required answer fields for each question.
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
Each top-level dataset folder is a self-contained evaluation pack. There are no version directories in the current layout.
|
| 50 |
-
|
| 51 |
-
| File | Purpose |
|
| 52 |
-
| --- | --- |
|
| 53 |
-
| `pack.json` | Entry point: identifies the database, case export, scoring policy, and their checksums. |
|
| 54 |
-
| `cases.jsonl` | Machine-readable questions, answer schemas, reference answers, and case metadata; one JSON object per line. |
|
| 55 |
-
| `PROBLEMS.md` | Human-readable problem catalog, including calculation conventions and answer fields. |
|
| 56 |
-
| `ATTRIBUTION.md` | Original sources, citations, licensing, and attribution. |
|
| 57 |
-
| `database/<name>.duckdb` | Ready-to-query database; its exact filename is in `pack.json`. |
|
| 58 |
-
| `database/build_report.json` | Dataset-specific build statistics and source provenance. |
|
| 59 |
-
| `reference-queries.jsonl` | Retained reference SQL for the cases recomputed during the revision. Not a complete reference implementation for every case. |
|
| 60 |
-
| `changes.json` | Per-case revision history and provisional difficulty labels. |
|
| 61 |
-
| `source.json` | Identity of the predecessor pack and unchanged source database. |
|
| 62 |
-
| `validation.json` | Export digests, case counts, and revision summary. |
|
| 63 |
-
| `verification.json` | Recorded schema checks, reference replays, and independent-check coverage. |
|
| 64 |
-
|
| 65 |
-
Some files are dataset-specific:
|
| 66 |
-
|
| 67 |
-
- Online Retail II additionally has `database-card.json`, used by the chat application to describe the database.
|
| 68 |
-
- Online Retail II and EEA include `database/schema.sql` and `database/views.sql`, documenting the packaged relations. The DuckDB file is already built; these scripts need not be run to use it.
|
| 69 |
-
- EEA also includes `database/source_manifest.json`, listing the source-request archives and their identities. These archives are provenance references, not additional files bundled here.
|
| 70 |
-
|
| 71 |
-
The root `.gitattributes` file is repository storage configuration, not part of the evaluation contract.
|
| 72 |
-
|
| 73 |
-
## JSON formats
|
| 74 |
-
|
| 75 |
-
All JSON and JSONL files are UTF-8. A `.json` file contains one JSON value; a `.jsonl` file contains one complete object per line and is not wrapped in an array. SHA-256 digests are lowercase hexadecimal strings. File paths in `pack.json` are relative to its dataset folder.
|
| 76 |
-
|
| 77 |
-
### `pack.json`: evaluation manifest
|
| 78 |
-
|
| 79 |
-
The manifest uses the `dsa-evaluation-pack/v1` contract. Its fields are:
|
| 80 |
-
|
| 81 |
-
| Field | Type and meaning |
|
| 82 |
-
| --- | --- |
|
| 83 |
-
| `format` | String, exactly `dsa-evaluation-pack/v1`. |
|
| 84 |
-
| `pack_id` | String identifying the problem set. |
|
| 85 |
-
| `version` | Pack revision as a `major.minor.patch` string; currently `2.0.0`. This is metadata, not a directory name. |
|
| 86 |
-
| `license` | License identifier, currently `CC-BY-4.0`. |
|
| 87 |
-
| `database` | Object with `id`, `path`, `size_bytes`, and `sha256`. Identifies the exact DuckDB file. |
|
| 88 |
-
| `cases` | Object with `path`, `size_bytes`, `sha256`, and `case_count`. Identifies the exact JSONL export. |
|
| 89 |
-
| `scorer` | Object selecting the answer-comparison policy. |
|
| 90 |
-
| `provenance` | Object containing `source_datasets`, an array of export identities with `name`, `version`, `case_count`, and `export_sha256`. These identify case exports, not the original real-world data providers. |
|
| 91 |
-
|
| 92 |
-
All three current packs use `{"name":"exact-json","version":"1"}`. Answers are compared structurally, not by their display formatting: object-key order is irrelevant, but array order and numeric types matter. Follow each question's rounding and ordering requirements.
|
| 93 |
-
|
| 94 |
-
The loader also supports `json-numeric-tolerance` version `1`, with numeric `relative_tolerance` and `absolute_tolerance` fields. That policy allows tolerance for expected floating-point values while preserving exact integer comparisons. It is not selected by the current three manifests; do not silently substitute it when reporting their results.
|
| 95 |
-
|
| 96 |
-
### `cases.jsonl`: one evaluation case per line
|
| 97 |
-
|
| 98 |
-
| Field | Type and meaning |
|
| 99 |
-
| --- | --- |
|
| 100 |
-
| `case_id` | String identifying the case within the pack. |
|
| 101 |
-
| `case_version` | String identifying the case revision. |
|
| 102 |
-
| `question` | Complete natural-language task, including calculation details and data conventions. |
|
| 103 |
-
| `answer_schema` | JSON Schema Draft 2020-12 object defining the required answer shape and constraints. |
|
| 104 |
-
| `expected_answer` | JSON value satisfying `answer_schema`; used only by the evaluator. |
|
| 105 |
-
| `metadata` | Object with string fields `family` (task category) and `source_level` (provisional difficulty). |
|
| 106 |
-
| `derivation` | Optional object `{"format":"dsa-derivation/v1"}` requesting a replay-verified derivation; absent from the current exports. |
|
| 107 |
-
|
| 108 |
-
For example, a one-number answer may use this `answer_schema`:
|
| 109 |
-
|
| 110 |
-
```json
|
| 111 |
-
{
|
| 112 |
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 113 |
-
"type": "object",
|
| 114 |
-
"properties": {"total_mwh": {"type": "number"}},
|
| 115 |
-
"required": ["total_mwh"],
|
| 116 |
-
"additionalProperties": false
|
| 117 |
-
}
|
| 118 |
-
```
|
| 119 |
-
|
| 120 |
-
Schema validation checks answer structure, not factual correctness. Evaluation additionally compares the answer with `expected_answer` using the manifest's scorer. The full task is in `question`; the short opening sentence alone can omit important constraints.
|
| 121 |
-
|
| 122 |
-
The authoritative validated manifest and case contracts are defined in [`dsa.pack`](https://github.com/lschiemanowski/dsa/blob/main/src/dsa/pack.py). Each case carries its own answer schema rather than sharing a single universal answer format.
|
| 123 |
-
|
| 124 |
-
### `database-card.json`: chat presentation
|
| 125 |
-
|
| 126 |
-
Currently provided only for Online Retail II, this object uses `format: "dsa-database-card/v1"` and contains:
|
| 127 |
-
|
| 128 |
-
- `title` and `summary`: strings describing the database;
|
| 129 |
-
- `coverage`: an object containing `period_start` and `period_end` strings, plus integer counts for `transaction_lines`, `invoices`, `identified_customers`, `product_codes`, and `country_values`;
|
| 130 |
-
- `primary_relation`: the schema-qualified name of the recommended table or view;
|
| 131 |
-
- `relations`: an array of objects with `name`, `kind` (`table` or `view`), `row_count`, `description`, and `columns`. Each column has string fields `name`, `data_type`, and `description`;
|
| 132 |
-
- `example_questions`: an array of strings for user orientation;
|
| 133 |
-
- `analysis_notes`: an array of model-facing analytical conventions, separated from the user-facing description.
|
| 134 |
-
|
| 135 |
-
This is a presentation document, not an evaluation-case export. Its current coverage fields are retail-specific. The validated contract is defined in the [chat application's database-card module](https://github.com/lschiemanowski/dsa/blob/main/apps/private_data_chat/database_card.py).
|
| 136 |
-
|
| 137 |
-
### Revision and verification records
|
| 138 |
-
|
| 139 |
-
These are supporting authoring records, not additional model inputs or universally versioned runtime contracts. Their current shapes are:
|
| 140 |
-
|
| 141 |
-
| File | Contents |
|
| 142 |
-
| --- | --- |
|
| 143 |
-
| `reference-queries.jsonl` | Objects with `case_id`, `sql`, `origin`, and `array_key`. The nullable `array_key` controls how query rows are wrapped into an answer object by the authoring code. |
|
| 144 |
-
| `changes.json` | Array of objects with `case_id`, `previous_case_id`, integer `slot`, `action`, `task_type`, `analytical_operation`, `difficulty`, `difficulty_status`, `reference_status`, and booleans `answer_schema_changed` and `answer_changed`. Slots are one-based positions in the revision. |
|
| 145 |
-
| `source.json` | Object with `predecessor`, `database_relative_to_source_root`, `database_sha256`, and `status`. `predecessor` contains `format`, `repo_id`, `revision`, `path`, and `manifest_sha256`, identifying the earlier pack at a pinned repository commit. |
|
| 146 |
-
| `validation.json` | Object with `pack`, `version`, `cases`, four digest fields (`cases_sha256`, `database_sha256`, `manifest_sha256`, `reference_queries_sha256`), counts (`replaced`, `rewritten`, `recomputed_answers`, `pinned_predecessor_answers`), and count mappings `difficulty` and `types`. |
|
| 147 |
-
| `verification.json` | Object with `pack`, `cases_sha256`, `manifest_sha256`, `database_unchanged`, `production_loader`, `schemas_checked`, `reference_queries_replayed`, and an array of `independent_python_case_slots`. |
|
| 148 |
-
|
| 149 |
-
`source.json` is retained from authoring: its `status` may say `unpublished-local-candidate`, and its source path may contain an old version directory. These describe the historical build input, not the current publication status or download path. Use `pack.json` for current file locations.
|
| 150 |
-
|
| 151 |
-
The current revision records 244 replayed reference queries and 11 independent Python checks across the three packs. Another 56 answers were retained from pinned predecessors without new independent recomputation. The `production_loader` receipt records a local-transport check at authoring time; it is not a live service-health report. Difficulty labels are provisional, not calibrated model-performance measurements.
|
| 152 |
-
|
| 153 |
-
### Database provenance records
|
| 154 |
-
|
| 155 |
-
`database/build_report.json` varies by dataset; it does not have a single shared schema:
|
| 156 |
-
|
| 157 |
-
- **Online Retail II:** source archive and SHA-256, build time and tool versions, worksheet/raw/analysis row counts, overlap checks, quality metrics, and build checks.
|
| 158 |
-
- **SMARD:** database identity and SHA-256, region and time coverage, interval count, licensing and attribution, and a `source_files` array. Each source-file record includes its identifier, request JSON string, response filename, retrieval time, byte count, row count, and SHA-256.
|
| 159 |
-
- **EEA:** `format: "dsa-eea-air-quality-build-report/v1"`, database identity/size/SHA-256, source details, licensing, reporting-time coverage, cities, pollutants, sampling-point and relation counts, and a `source_requests` array containing archive/request identities, request JSON strings, checksums, and measurement-coverage statistics.
|
| 160 |
-
|
| 161 |
-
EEA's separate `database/source_manifest.json` uses `format: "dsa-eea-source-manifest/v1"`, with `retrieved_at_utc`, `endpoint`, and `entries`. Each entry identifies a source request and archive using `id`, `archive`, `request`, `city_id`, `city`, `source_city`, `country_code`, `start_utc_plus_1`, `end_utc_plus_1_exclusive`, `size_bytes`, and `sha256`. Historical request strings are preserved as sent; reporting-time conventions are described below.
|
| 162 |
-
|
| 163 |
-
## Working with the databases
|
| 164 |
-
|
| 165 |
-
The `.duckdb` files can be opened directly with DuckDB; using `dsa` is optional. Tables and views are organized into `raw`, `analysis`, and `metadata` schemas. Start with these relations:
|
| 166 |
-
|
| 167 |
-
| Database | Recommended relations | Important conventions |
|
| 168 |
-
| --- | --- | --- |
|
| 169 |
-
| Online Retail II | `analysis.transaction_lines_nonoverlapping` | One transaction line per row; 1,044,848 rows after removing cross-sheet overlap from 1,067,371 raw rows. Quantities are signed, prices are in GBP, and timestamps are timezone-naive. Missing identifiers and within-sheet duplicates remain. Follow the case's eligibility rules. |
|
| 170 |
-
| SMARD | `analysis.quarter_hourly`, `analysis.daily` | 35,136 quarter-hour intervals in the 2024 local year. Use `Europe/Berlin` for calendar dates and UTC for unambiguous interval identities. Missing measurements are not imputed. |
|
| 171 |
-
| EEA | `analysis.valid_measurements`, `analysis.city_hourly`, `analysis.city_daily`, `analysis.city_monthly`, `analysis.city_annual` | Reporting timestamps use fixed UTC+1, not daylight-saving civil time. CO uses mg/m³; the other pollutants use µg/m³. Coverage varies, and missing observations are not imputed; Rome has no PM₁₀ or PM₂.₅ observations in this snapshot. |
|
| 172 |
-
|
| 173 |
-
EEA's valid-measurement relation accepts validity codes 1–4. City-hour means average available valid sampling-point values; longer-period means weight each available city-hour mean equally. The original measurements and metadata remain available for coverage and validity audits.
|
| 174 |
-
|
| 175 |
-
For evaluation, keep `expected_answer`, reference SQL, and verification records out of the model's inputs. Supply the database, complete question, and answer schema; use the remaining material on the evaluator side. Public reference answers make this a transparent demo benchmark, not a contamination-resistant hidden test set.
|
| 176 |
-
|
| 177 |
-
Download one dataset with the standalone Hugging Face CLI:
|
| 178 |
-
|
| 179 |
-
```bash
|
| 180 |
-
uvx --from huggingface-hub hf download lschiemanowski/dsa-datasets \
|
| 181 |
-
--repo-type dataset --include 'online-retail-ii/*' --local-dir data
|
| 182 |
-
```
|
| 183 |
-
|
| 184 |
-
For reproducible experiments, add `--revision <commit-sha>` and retain the selected commit together with the manifest digest. The `main` branch can change; a directory name alone is not a frozen benchmark identity. Existing commit-pinned historical packs remain available through repository history.
|
|
|
|
| 44 |
|
| 45 |
The linked problem lists include the calculation details and required answer fields for each question.
|
| 46 |
|
| 47 |
+
See the [data guide](DATA_GUIDE.md) for the folder layout, JSON formats, database conventions, and download instructions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|